Skip to content
Permalink
Browse files

Use phpstan callable definitions (#216)

  • Loading branch information...
adaamz authored and dg committed Apr 6, 2019
1 parent 7ef0d56 commit d9fc6d621376db9f99dace9373e9044145119cb9
Showing with 7 additions and 7 deletions.
  1. +1 −1 src/Forms/Container.php
  2. +2 −2 src/Forms/Controls/SubmitButton.php
  3. +4 −4 src/Forms/Form.php
@@ -26,7 +26,7 @@ class Container extends Nette\ComponentModel\Container implements \ArrayAccess
private const ARRAY = 'array';
/** @var callable[] function (Container $sender): void; Occurs when the form is validated */
/** @var callable[]&(callable(Container): void)[]; Occurs when the form is validated */
public $onValidate;
/** @var ControlGroup|null */
@@ -19,10 +19,10 @@
*/
class SubmitButton extends Button implements Nette\Forms\ISubmitterControl
{
/** @var callable[] function (SubmitButton $sender): void; Occurs when the button is clicked and form is successfully validated */
/** @var callable[]&(callable(SubmitButton): void)[]; Occurs when the button is clicked and form is successfully validated */
public $onClick;
/** @var callable[] function (SubmitButton $sender): void; Occurs when the button is clicked and form is not validated */
/** @var callable[]&(callable(SubmitButton): void)[]; Occurs when the button is clicked and form is not validated */
public $onInvalidClick;
/** @var array|null */
@@ -81,16 +81,16 @@ class Form extends Container implements Nette\Utils\IHtmlString
/** @internal protection token ID */
public const PROTECTOR_ID = '_token_';
/** @var callable[] function (Form $sender): void; Occurs when the form is submitted and successfully validated */
/** @var callable[]&((callable(Form, array): void)|(callable(Form, ArrayHash): void))[]; Occurs when the form is submitted and successfully validated */
public $onSuccess;
/** @var callable[] function (Form $sender): void; Occurs when the form is submitted and is not valid */
/** @var callable[]&(callable(Form): void)[]; Occurs when the form is submitted and is not valid */
public $onError;
/** @var callable[] function (Form $sender): void; Occurs when the form is submitted */
/** @var callable[]&(callable(Form): void)[]; Occurs when the form is submitted */
public $onSubmit;
/** @var callable[] function (Form $sender): void; Occurs before the form is rendered */
/** @var callable[]&(callable(Form): void)[]; Occurs before the form is rendered */
public $onRender;
/** @var Nette\Http\IRequest used only by standalone form */

0 comments on commit d9fc6d6

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