From de09883a530ca97eb8567422f5f26cac9b3715c8 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 4 Feb 2021 04:37:25 +0100 Subject: [PATCH] improved phpDoc --- src/Application/Application.php | 12 ++++++------ src/Application/PresenterFactory.php | 2 +- src/Application/Responses/CallbackResponse.php | 2 +- src/Application/UI/Component.php | 2 +- src/Application/UI/Form.php | 2 +- src/Application/UI/Presenter.php | 6 +++--- src/Bridges/ApplicationLatte/TemplateFactory.php | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Application/Application.php b/src/Application/Application.php index 4cdefbaaa..ed26eb5a3 100644 --- a/src/Application/Application.php +++ b/src/Application/Application.php @@ -30,22 +30,22 @@ class Application /** @var string|null */ public $errorPresenter; - /** @var callable[]&(callable(Application $sender): void)[]; Occurs before the application loads presenter */ + /** @var array Occurs before the application loads presenter */ public $onStartup = []; - /** @var callable[]&(callable(Application $sender, \Throwable|null $e): void)[]; Occurs before the application shuts down */ + /** @var array Occurs before the application shuts down */ public $onShutdown = []; - /** @var callable[]&(callable(Application $sender, Request $request): void)[]; Occurs when a new request is received */ + /** @var array Occurs when a new request is received */ public $onRequest = []; - /** @var callable[]&(callable(Application $sender, IPresenter $presenter): void)[]; Occurs when a presenter is created */ + /** @var array Occurs when a presenter is created */ public $onPresenter = []; - /** @var callable[]&(callable(Application $sender, Response $response): void)[]; Occurs when a new response is ready for dispatch */ + /** @var array Occurs when a new response is ready for dispatch */ public $onResponse = []; - /** @var callable[]&(callable(Application $sender, \Throwable $e): void)[]; Occurs when an unhandled exception occurs in the application */ + /** @var array Occurs when an unhandled exception occurs in the application */ public $onError = []; /** @var Request[] */ diff --git a/src/Application/PresenterFactory.php b/src/Application/PresenterFactory.php index 629400322..45bad8b9c 100644 --- a/src/Application/PresenterFactory.php +++ b/src/Application/PresenterFactory.php @@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory /** - * @param callable&callable(string): IPresenter $factory + * @param callable(string): IPresenter $factory */ public function __construct(callable $factory = null) { diff --git a/src/Application/Responses/CallbackResponse.php b/src/Application/Responses/CallbackResponse.php index 11e5ce62f..84bc33e88 100644 --- a/src/Application/Responses/CallbackResponse.php +++ b/src/Application/Responses/CallbackResponse.php @@ -24,7 +24,7 @@ final class CallbackResponse implements Nette\Application\Response /** - * @param callable&callable(Nette\Http\IRequest $httpRequest, Nette\Http\Response $httpResponse): void $callback + * @param callable(Nette\Http\IRequest, Nette\Http\Response): void $callback */ public function __construct(callable $callback) { diff --git a/src/Application/UI/Component.php b/src/Application/UI/Component.php index 864ae69b3..02f70bba5 100644 --- a/src/Application/UI/Component.php +++ b/src/Application/UI/Component.php @@ -26,7 +26,7 @@ abstract class Component extends Nette\ComponentModel\Container implements Signa { use Nette\ComponentModel\ArrayAccess; - /** @var callable[]&(callable(Component $sender): void)[]; Occurs when component is attached to presenter */ + /** @var array Occurs when component is attached to presenter */ public $onAnchor = []; /** @var array */ diff --git a/src/Application/UI/Form.php b/src/Application/UI/Form.php index 518e2a25a..4544dffd6 100644 --- a/src/Application/UI/Form.php +++ b/src/Application/UI/Form.php @@ -17,7 +17,7 @@ */ class Form extends Nette\Forms\Form implements SignalReceiver { - /** @var callable[]&(callable(Form $sender): void)[]; Occurs when form is attached to presenter */ + /** @var array Occurs when form is attached to presenter */ public $onAnchor = []; /** @var bool */ diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 34b5a85c3..87f8e0f64 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -49,13 +49,13 @@ abstract class Presenter extends Control implements Application\IPresenter /** @var int */ public $invalidLinkMode; - /** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is starting */ + /** @var array Occurs when the presenter is starting */ public $onStartup = []; - /** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is rendering after beforeRender */ + /** @var array Occurs when the presenter is rendering after beforeRender */ public $onRender = []; - /** @var callable[]&(callable(Presenter $sender, Response $response): void)[]; Occurs when the presenter is shutting down */ + /** @var array Occurs when the presenter is shutting down */ public $onShutdown = []; /** @var bool automatically call canonicalize() */ diff --git a/src/Bridges/ApplicationLatte/TemplateFactory.php b/src/Bridges/ApplicationLatte/TemplateFactory.php index 2b11503a9..90d8adbb2 100644 --- a/src/Bridges/ApplicationLatte/TemplateFactory.php +++ b/src/Bridges/ApplicationLatte/TemplateFactory.php @@ -21,7 +21,7 @@ class TemplateFactory implements UI\TemplateFactory { use Nette\SmartObject; - /** @var callable[]&(callable(Template $template): void)[]; Occurs when a new template is created */ + /** @var array Occurs when a new template is created */ public $onCreate = []; /** @var LatteFactory */