Adjust return value

This commit is contained in:
Dennis Eichhorn 2017-07-24 13:24:03 +02:00 committed by GitHub
parent 9f7627f09e
commit c428cfe7ca

View File

@ -186,7 +186,7 @@ abstract class ViewAbstract implements \Serializable
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) /* : void */
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) : bool
{
if ($overwrite || !isset($this->views[$id])) {
$this->views[$id] = $view;
@ -194,7 +194,11 @@ abstract class ViewAbstract implements \Serializable
if ($order !== 0) {
uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
}
return true;
}
return false;
}
/**