Skip to content

Commit

Permalink
improved phpDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 4, 2021
1 parent d4255bb commit de09883
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/Application/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<callable(self): void> 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<callable(self, ?\Throwable): void> 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<callable(self, Request): void> 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<callable(self, IPresenter): void> 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<callable(self, Response): void> 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<callable(self, \Throwable): void> Occurs when an unhandled exception occurs in the application */
public $onError = [];

/** @var Request[] */
Expand Down
2 changes: 1 addition & 1 deletion src/Application/PresenterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Responses/CallbackResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/UI/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<callable(self): void> Occurs when component is attached to presenter */
public $onAnchor = [];

/** @var array */
Expand Down
2 changes: 1 addition & 1 deletion src/Application/UI/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<callable(self): void> Occurs when form is attached to presenter */
public $onAnchor = [];

/** @var bool */
Expand Down
6 changes: 3 additions & 3 deletions src/Application/UI/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<callable(self): void> Occurs when the presenter is starting */
public $onStartup = [];

/** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is rendering after beforeRender */
/** @var array<callable(self): void> 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<callable(self, Application\Response): void> Occurs when the presenter is shutting down */
public $onShutdown = [];

/** @var bool automatically call canonicalize() */
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/ApplicationLatte/TemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<callable(Template): void> Occurs when a new template is created */
public $onCreate = [];

/** @var LatteFactory */
Expand Down

0 comments on commit de09883

Please sign in to comment.