Skip to content
Permalink
Browse files

Use phpstan callable format

  • Loading branch information...
adaamz authored and dg committed Apr 7, 2019
1 parent ab292fb commit b0a56e3836616f244e91095495d5c9fc9b8487c2
@@ -29,22 +29,22 @@ class Application
/** @var string|null */
public $errorPresenter;
/** @var callable[] function (Application $sender): void; Occurs before the application loads presenter */
/** @var callable[]&(callable(Application $sender): void)[]; Occurs before the application loads presenter */
public $onStartup;
/** @var callable[] function (Application $sender, \Throwable $e = null): void; Occurs before the application shuts down */
/** @var callable[]&(callable(Application $sender, \Throwable $e = null): void)[]; Occurs before the application shuts down */
public $onShutdown;
/** @var callable[] function (Application $sender, Request $request): void; Occurs when a new request is received */
/** @var callable[]&(callable(Application $sender, Request $request): void)[]; Occurs when a new request is received */
public $onRequest;
/** @var callable[] function (Application $sender, IPresenter $presenter): void; Occurs when a presenter is created */
/** @var callable[]&(callable(Application $sender, IPresenter $presenter): void)[]; Occurs when a presenter is created */
public $onPresenter;
/** @var callable[] function (Application $sender, IResponse $response): void; Occurs when a new response is ready for dispatch */
/** @var callable[]&(callable(Application $sender, IResponse $response): void)[]; Occurs when a new response is ready for dispatch */
public $onResponse;
/** @var callable[] function (Application $sender, \Throwable $e): void; Occurs when an unhandled exception occurs in the application */
/** @var callable[]&(callable(Application $sender, \Throwable $e): void)[]; Occurs when an unhandled exception occurs in the application */
public $onError;
/** @var Request[] */
@@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory
/**
* @param callable $factory function (string $class): IPresenter
* @param callable&callable(string): IPresenter $factory
*/
public function __construct(callable $factory = null)
{
@@ -24,7 +24,7 @@ final class CallbackResponse implements Nette\Application\IResponse
/**
* @param callable $callback function (Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void
* @param callable&callable(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void $callback
*/
public function __construct(callable $callback)
{
@@ -26,7 +26,7 @@ abstract class Component extends Nette\ComponentModel\Container implements ISign
{
use Nette\ComponentModel\ArrayAccess;
/** @var callable[] function (Component $sender): void; Occurs when component is attached to presenter */
/** @var callable[]&(callable(Component $sender): void)[]; Occurs when component is attached to presenter */
public $onAnchor;
/** @var array */
@@ -17,7 +17,7 @@
*/
class Form extends Nette\Forms\Form implements ISignalReceiver
{
/** @var callable[] function (Form $sender): void; Occurs when form is attached to presenter */
/** @var callable[]&(callable(Form $sender): void)[]; Occurs when form is attached to presenter */
public $onAnchor;
@@ -48,10 +48,10 @@ abstract class Presenter extends Control implements Application\IPresenter
/** @var int */
public $invalidLinkMode;
/** @var callable[] function (Presenter $sender): void; Occurs when the presenter is starting */
/** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is starting */
public $onStartup;
/** @var callable[] function (Presenter $sender, IResponse $response): void; Occurs when the presenter is shutting down */
/** @var callable[]&(callable(Presenter $sender, IResponse $response): void)[]; Occurs when the presenter is shutting down */
public $onShutdown;
/** @var bool automatically call canonicalize() */
@@ -21,7 +21,7 @@ class TemplateFactory implements UI\ITemplateFactory
{
use Nette\SmartObject;
/** @var callable[] function (Template $template): void; Occurs when a new template is created */
/** @var callable[]&(callable(Template $template): void)[]; Occurs when a new template is created */
public $onCreate;
/** @var ILatteFactory */

0 comments on commit b0a56e3

Please sign in to comment.
You can’t perform that action at this time.