diff --git a/lib/ui/widget.php b/lib/ui/widget.php index d185ef384f..d372a32336 100644 --- a/lib/ui/widget.php +++ b/lib/ui/widget.php @@ -1,34 +1,31 @@ . + /** - * StatusNet, the distributed open-source microblogging tool - * * Base class for UI widgets * - * PHP version 5 - * - * LICENCE: This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * * @category Widget - * @package StatusNet + * @package GNUsocial * @author Evan Prodromou * @author Sarven Capadisli - * @copyright 2009 StatusNet, Inc. - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ + * @copyright 2009-2019 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ -if (!defined('GNUSOCIAL')) { exit(1); } +defined('GNUSOCIAL') || die(); /** * Base class for UI widgets @@ -37,14 +34,13 @@ if (!defined('GNUSOCIAL')) { exit(1); } * that's used on different parts of the site. Examples would be profile * lists, notice lists, navigation menus (tabsets) and common forms. * - * @category Widget - * @package StatusNet - * @author Evan Prodromou - * @author Sarven Capadisli - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ + * @category Widget + * @package GNUsocial + * @author Evan Prodromou + * @author Sarven Capadisli + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * - * @see HTMLOutputter + * @see HTMLOutputter */ class Widget @@ -55,7 +51,7 @@ class Widget * Action (HTMLOutputter) to use for output */ - var $out = null; + public $out = null; /** * Prepare the widget for use @@ -63,7 +59,7 @@ class Widget * @param Action $out output helper, defaults to null * @param array $widgetOpts */ - function __construct(Action $out = null, array $widgetOpts = []) + public function __construct(?Action $out = null, array $widgetOpts = []) { $this->out = $out; if (!array_key_exists('scoped', $widgetOpts)) { @@ -80,7 +76,7 @@ class Widget * @return void */ - function show() + public function show() { } @@ -92,7 +88,7 @@ class Widget * @return HTMLOutputter the output helper */ - function getOut() + public function getOut() { return $this->out; } @@ -105,7 +101,7 @@ class Widget * * @return mixed Return value of the method. */ - function __call($name, $arguments) + public function __call($name, $arguments) { return call_user_func_array(array($this->out, $name), $arguments); }