Skip to content

Commit 2edcd5c

Browse files
committed
improved phpDoc
1 parent 67fa2d5 commit 2edcd5c

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/Application/Application.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ class Application
3030
/** @var string|null */
3131
public $errorPresenter;
3232

33-
/** @var callable[]&(callable(Application $sender): void)[]; Occurs before the application loads presenter */
33+
/** @var array<callable(self): void> Occurs before the application loads presenter */
3434
public $onStartup = [];
3535

36-
/** @var callable[]&(callable(Application $sender, \Throwable|null $e): void)[]; Occurs before the application shuts down */
36+
/** @var array<callable(self, ?\Throwable): void> Occurs before the application shuts down */
3737
public $onShutdown = [];
3838

39-
/** @var callable[]&(callable(Application $sender, Request $request): void)[]; Occurs when a new request is received */
39+
/** @var array<callable(self, Request): void> Occurs when a new request is received */
4040
public $onRequest = [];
4141

42-
/** @var callable[]&(callable(Application $sender, IPresenter $presenter): void)[]; Occurs when a presenter is created */
42+
/** @var array<callable(self, IPresenter): void> Occurs when a presenter is created */
4343
public $onPresenter = [];
4444

45-
/** @var callable[]&(callable(Application $sender, Response $response): void)[]; Occurs when a new response is ready for dispatch */
45+
/** @var array<callable(self, Response): void> Occurs when a new response is ready for dispatch */
4646
public $onResponse = [];
4747

48-
/** @var callable[]&(callable(Application $sender, \Throwable $e): void)[]; Occurs when an unhandled exception occurs in the application */
48+
/** @var array<callable(self, \Throwable): void> Occurs when an unhandled exception occurs in the application */
4949
public $onError = [];
5050

5151
/** @var Request[] */

src/Application/PresenterFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory
3333

3434

3535
/**
36-
* @param callable&callable(string): IPresenter $factory
36+
* @param callable(string): IPresenter $factory
3737
*/
3838
public function __construct(callable $factory = null)
3939
{

src/Application/Responses/CallbackResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class CallbackResponse implements Nette\Application\Response
2424

2525

2626
/**
27-
* @param callable&callable(Nette\Http\IRequest $httpRequest, Nette\Http\Response $httpResponse): void $callback
27+
* @param callable(Nette\Http\IRequest, Nette\Http\Response): void $callback
2828
*/
2929
public function __construct(callable $callback)
3030
{

src/Application/UI/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract class Component extends Nette\ComponentModel\Container implements Signa
2626
{
2727
use Nette\ComponentModel\ArrayAccess;
2828

29-
/** @var callable[]&(callable(Component $sender): void)[]; Occurs when component is attached to presenter */
29+
/** @var array<callable(self): void> Occurs when component is attached to presenter */
3030
public $onAnchor = [];
3131

3232
/** @var array */

src/Application/UI/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class Form extends Nette\Forms\Form implements SignalReceiver
1919
{
20-
/** @var callable[]&(callable(Form $sender): void)[]; Occurs when form is attached to presenter */
20+
/** @var array<callable(self): void> Occurs when form is attached to presenter */
2121
public $onAnchor = [];
2222

2323
/** @var bool */

src/Application/UI/Presenter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ abstract class Presenter extends Control implements Application\IPresenter
4949
/** @var int */
5050
public $invalidLinkMode;
5151

52-
/** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is starting */
52+
/** @var array<callable(self): void> Occurs when the presenter is starting */
5353
public $onStartup = [];
5454

55-
/** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is rendering after beforeRender */
55+
/** @var array<callable(self): void> Occurs when the presenter is rendering after beforeRender */
5656
public $onRender = [];
5757

58-
/** @var callable[]&(callable(Presenter $sender, Response $response): void)[]; Occurs when the presenter is shutting down */
58+
/** @var array<callable(self, Application\Response): void> Occurs when the presenter is shutting down */
5959
public $onShutdown = [];
6060

6161
/** @var bool automatically call canonicalize() */

src/Bridges/ApplicationLatte/TemplateFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TemplateFactory implements UI\TemplateFactory
2121
{
2222
use Nette\SmartObject;
2323

24-
/** @var callable[]&(callable(Template $template): void)[]; Occurs when a new template is created */
24+
/** @var array<callable(Template): void> Occurs when a new template is created */
2525
public $onCreate = [];
2626

2727
/** @var LatteFactory */

0 commit comments

Comments
 (0)