diff --git a/src/Forms/Container.php b/src/Forms/Container.php index 9cd4d4915..f84e5f613 100644 --- a/src/Forms/Container.php +++ b/src/Forms/Container.php @@ -128,7 +128,7 @@ public function isValid(): bool /** * Performs the server side validation. - * @param IControl[] + * @param IControl[] $controls */ public function validate(array $controls = null): void { @@ -224,7 +224,7 @@ public function getForm(bool $throw = true): ?Form /** * Adds single-line text input control to the form. - * @param string|object $label + * @param string|object $label */ public function addText(string $name, $label = null, int $cols = null, int $maxLength = null): Controls\TextInput { @@ -235,7 +235,7 @@ public function addText(string $name, $label = null, int $cols = null, int $maxL /** * Adds single-line text input control used for sensitive input such as passwords. - * @param string|object $label + * @param string|object $label */ public function addPassword(string $name, $label = null, int $cols = null, int $maxLength = null): Controls\TextInput { @@ -247,7 +247,7 @@ public function addPassword(string $name, $label = null, int $cols = null, int $ /** * Adds multi-line text input control to the form. - * @param string|object $label + * @param string|object $label */ public function addTextArea(string $name, $label = null, int $cols = null, int $rows = null): Controls\TextArea { @@ -258,7 +258,7 @@ public function addTextArea(string $name, $label = null, int $cols = null, int $ /** * Adds input for email. - * @param string|object $label + * @param string|object $label */ public function addEmail(string $name, $label = null): Controls\TextInput { @@ -270,7 +270,7 @@ public function addEmail(string $name, $label = null): Controls\TextInput /** * Adds input for integer. - * @param string|object $label + * @param string|object $label */ public function addInteger(string $name, $label = null): Controls\TextInput { @@ -283,7 +283,7 @@ public function addInteger(string $name, $label = null): Controls\TextInput /** * Adds control that allows the user to upload files. - * @param string|object $label + * @param string|object $label */ public function addUpload(string $name, $label = null): Controls\UploadControl { @@ -297,7 +297,7 @@ public function addUpload(string $name, $label = null): Controls\UploadControl /** * Adds control that allows the user to upload multiple files. - * @param string|object $label + * @param string|object $label */ public function addMultiUpload(string $name, $label = null): Controls\UploadControl { @@ -317,7 +317,7 @@ public function addHidden(string $name, string $default = null): Controls\Hidden /** * Adds check box control to the form. - * @param string|object $caption + * @param string|object $caption */ public function addCheckbox(string $name, $caption = null): Controls\Checkbox { @@ -327,7 +327,7 @@ public function addCheckbox(string $name, $caption = null): Controls\Checkbox /** * Adds set of radio button controls to the form. - * @param string|object $label + * @param string|object $label */ public function addRadioList(string $name, $label = null, array $items = null): Controls\RadioList { @@ -337,7 +337,7 @@ public function addRadioList(string $name, $label = null, array $items = null): /** * Adds set of checkbox controls to the form. - * @param string|object $label + * @param string|object $label */ public function addCheckboxList(string $name, $label = null, array $items = null): Controls\CheckboxList { @@ -347,7 +347,7 @@ public function addCheckboxList(string $name, $label = null, array $items = null /** * Adds select box control that allows single item selection. - * @param string|object $label + * @param string|object $label */ public function addSelect(string $name, $label = null, array $items = null, int $size = null): Controls\SelectBox { @@ -358,7 +358,7 @@ public function addSelect(string $name, $label = null, array $items = null, int /** * Adds select box control that allows multiple item selection. - * @param string|object $label + * @param string|object $label */ public function addMultiSelect(string $name, $label = null, array $items = null, int $size = null): Controls\MultiSelectBox { @@ -369,7 +369,7 @@ public function addMultiSelect(string $name, $label = null, array $items = null, /** * Adds button used to submit form. - * @param string|object $caption + * @param string|object $caption */ public function addSubmit(string $name, $caption = null): Controls\SubmitButton { @@ -379,7 +379,7 @@ public function addSubmit(string $name, $caption = null): Controls\SubmitButton /** * Adds push buttons with no default behavior. - * @param string|object $caption + * @param string|object $caption */ public function addButton(string $name, $caption = null): Controls\Button { @@ -389,8 +389,8 @@ public function addButton(string $name, $caption = null): Controls\Button /** * Adds graphical button used to submit form. - * @param string $src URI of the image - * @param string $alt alternate text for the image + * @param string $src URI of the image + * @param string $alt alternate text for the image */ public function addImage(string $name, string $src = null, string $alt = null): Controls\ImageButton { @@ -400,7 +400,7 @@ public function addImage(string $name, string $src = null, string $alt = null): /** * Adds naming container to the form. - * @param string|int + * @param string|int $name */ public function addContainer($name): self { diff --git a/src/Forms/Controls/BaseControl.php b/src/Forms/Controls/BaseControl.php index c1bb858ef..156a5353a 100644 --- a/src/Forms/Controls/BaseControl.php +++ b/src/Forms/Controls/BaseControl.php @@ -79,7 +79,7 @@ abstract class BaseControl extends Nette\ComponentModel\Component implements ICo /** - * @param string|object + * @param string|object $caption */ public function __construct($caption = null) { @@ -102,7 +102,7 @@ public function __construct($caption = null) /** * Sets textual caption or label. - * @param object|string + * @param object|string $caption * @return static */ public function setCaption($caption) @@ -274,7 +274,7 @@ public function getControl() /** * Generates label's HTML element. - * @param string|object + * @param string|object $caption * @return Html|string */ public function getLabel($caption = null) @@ -320,7 +320,7 @@ public function getLabelPrototype(): Html /** * Changes control's HTML id. - * @param mixed new ID, or false or null + * @param string|bool|null $id * @return static */ public function setHtmlId($id) @@ -413,8 +413,8 @@ public function translate($value, int $count = null) /** * Adds a validation rule. - * @param mixed - * @param string|object + * @param callable|string $validator + * @param string|object $errorMessage * @return static */ public function addRule($validator, $errorMessage = null, $arg = null) @@ -452,7 +452,7 @@ public function getRules(): Rules /** * Makes control mandatory. - * @param mixed state or error message + * @param boo|string|object $value * @return static */ public function setRequired($value = true) @@ -486,7 +486,7 @@ public function validate(): void /** * Adds error message to the list. - * @param string|object + * @param string|object $message */ public function addError($message, bool $translate = true): void { diff --git a/src/Forms/Controls/Button.php b/src/Forms/Controls/Button.php index 6569d0fdd..ecbdc7020 100644 --- a/src/Forms/Controls/Button.php +++ b/src/Forms/Controls/Button.php @@ -19,7 +19,7 @@ class Button extends BaseControl { /** - * @param string|object + * @param string|object $caption */ public function __construct($caption = null) { @@ -49,7 +49,7 @@ public function getLabel($caption = null): void /** * Generates control's HTML element. - * @param string|object + * @param string|object $caption */ public function getControl($caption = null): Nette\Utils\Html { diff --git a/src/Forms/Controls/Checkbox.php b/src/Forms/Controls/Checkbox.php index 242fc9f4b..ccd635cc6 100644 --- a/src/Forms/Controls/Checkbox.php +++ b/src/Forms/Controls/Checkbox.php @@ -23,7 +23,7 @@ class Checkbox extends BaseControl /** - * @param string|object + * @param string|object $label */ public function __construct($label = null) { diff --git a/src/Forms/Controls/CheckboxList.php b/src/Forms/Controls/CheckboxList.php index 3ef0fb9a2..36b6aa057 100644 --- a/src/Forms/Controls/CheckboxList.php +++ b/src/Forms/Controls/CheckboxList.php @@ -33,7 +33,7 @@ class CheckboxList extends MultiChoiceControl /** - * @param string|object + * @param string|object $label */ public function __construct($label = null, array $items = null) { @@ -74,7 +74,7 @@ public function getControl(): Html /** * Generates label's HTML element. - * @param string|object + * @param string|object $caption */ public function getLabel($caption = null): Html { diff --git a/src/Forms/Controls/ChoiceControl.php b/src/Forms/Controls/ChoiceControl.php index 57a921e56..8ed4f8dac 100644 --- a/src/Forms/Controls/ChoiceControl.php +++ b/src/Forms/Controls/ChoiceControl.php @@ -57,7 +57,7 @@ public function loadHttpData(): void /** * Sets selected item (by key). - * @param string|int + * @param string|int $value * @return static * @internal */ @@ -134,7 +134,7 @@ public function getSelectedItem() /** * Disables or enables control or items. - * @param bool|array + * @param bool|array $value * @return static */ public function setDisabled($value = true) diff --git a/src/Forms/Controls/CsrfProtection.php b/src/Forms/Controls/CsrfProtection.php index a30c73f89..d69865a0f 100644 --- a/src/Forms/Controls/CsrfProtection.php +++ b/src/Forms/Controls/CsrfProtection.php @@ -25,7 +25,7 @@ class CsrfProtection extends HiddenField /** - * @param string|object + * @param string|object $errorMessage */ public function __construct($errorMessage) { diff --git a/src/Forms/Controls/HiddenField.php b/src/Forms/Controls/HiddenField.php index 320244886..8dd898095 100644 --- a/src/Forms/Controls/HiddenField.php +++ b/src/Forms/Controls/HiddenField.php @@ -68,7 +68,7 @@ public function getControl(): Nette\Utils\Html /** * Bypasses label generation. - * @param string|object + * @param string|object $caption */ public function getLabel($caption = null): void { @@ -77,7 +77,7 @@ public function getLabel($caption = null): void /** * Adds error message to the list. - * @param string|object + * @param string|object $message */ public function addError($message, bool $translate = true): void { diff --git a/src/Forms/Controls/ImageButton.php b/src/Forms/Controls/ImageButton.php index cdbb2bdae..f49a4254e 100644 --- a/src/Forms/Controls/ImageButton.php +++ b/src/Forms/Controls/ImageButton.php @@ -17,8 +17,8 @@ class ImageButton extends SubmitButton { /** - * @param string URI of the image - * @param string alternate text for the image + * @param string $src URI of the image + * @param string $alt alternate text for the image */ public function __construct(string $src = null, string $alt = null) { diff --git a/src/Forms/Controls/MultiChoiceControl.php b/src/Forms/Controls/MultiChoiceControl.php index 527fe26f7..30c67bf50 100644 --- a/src/Forms/Controls/MultiChoiceControl.php +++ b/src/Forms/Controls/MultiChoiceControl.php @@ -139,7 +139,7 @@ public function getSelectedItems(): array /** * Disables or enables control or items. - * @param bool|array + * @param bool|bool[] $value * @return static */ public function setDisabled($value = true) diff --git a/src/Forms/Controls/RadioList.php b/src/Forms/Controls/RadioList.php index 0239aa422..ccfd27cad 100644 --- a/src/Forms/Controls/RadioList.php +++ b/src/Forms/Controls/RadioList.php @@ -36,7 +36,7 @@ class RadioList extends ChoiceControl /** - * @param string|object + * @param string|object $label */ public function __construct($label = null, array $items = null) { @@ -81,7 +81,7 @@ public function getControl(): Html /** * Generates label's HTML element. - * @param string|object + * @param string|object $caption */ public function getLabel($caption = null): Html { diff --git a/src/Forms/Controls/SelectBox.php b/src/Forms/Controls/SelectBox.php index f9d6cc763..ebcdfb1c0 100644 --- a/src/Forms/Controls/SelectBox.php +++ b/src/Forms/Controls/SelectBox.php @@ -41,7 +41,7 @@ public function __construct($label = null, array $items = null) /** * Sets first prompt item in select box. - * @param string|object + * @param string|object $prompt * @return static */ public function setPrompt($prompt) diff --git a/src/Forms/Controls/SubmitButton.php b/src/Forms/Controls/SubmitButton.php index e7148d728..e8218d4af 100644 --- a/src/Forms/Controls/SubmitButton.php +++ b/src/Forms/Controls/SubmitButton.php @@ -30,7 +30,7 @@ class SubmitButton extends Button implements Nette\Forms\ISubmitterControl /** - * @param string|object + * @param string|object $caption */ public function __construct($caption = null) { @@ -102,7 +102,7 @@ public function click(): void /** * Generates control's HTML element. - * @param string|object + * @param string|object $caption */ public function getControl($caption = null): Nette\Utils\Html { diff --git a/src/Forms/Controls/TextArea.php b/src/Forms/Controls/TextArea.php index a907ce28d..ec3edab5c 100644 --- a/src/Forms/Controls/TextArea.php +++ b/src/Forms/Controls/TextArea.php @@ -19,7 +19,7 @@ class TextArea extends TextBase { /** - * @param string|object + * @param string|object $label */ public function __construct($label = null) { diff --git a/src/Forms/Controls/TextInput.php b/src/Forms/Controls/TextInput.php index 3f033e4ea..a4c2c5ff2 100644 --- a/src/Forms/Controls/TextInput.php +++ b/src/Forms/Controls/TextInput.php @@ -20,7 +20,7 @@ class TextInput extends TextBase { /** - * @param string|object + * @param string|object $label */ public function __construct($label = null, int $maxLength = null) { diff --git a/src/Forms/Controls/UploadControl.php b/src/Forms/Controls/UploadControl.php index f261fed0f..b9d9ac91e 100644 --- a/src/Forms/Controls/UploadControl.php +++ b/src/Forms/Controls/UploadControl.php @@ -24,7 +24,7 @@ class UploadControl extends BaseControl /** - * @param string|object + * @param string|object $label */ public function __construct($label = null, bool $multiple = false) { diff --git a/src/Forms/Form.php b/src/Forms/Form.php index 45384ce71..0e0e369ac 100644 --- a/src/Forms/Form.php +++ b/src/Forms/Form.php @@ -151,7 +151,7 @@ public function getForm(bool $throw = true): self /** * Sets form's action. - * @param string|object + * @param string|object $url * @return static */ public function setAction($url) @@ -237,7 +237,7 @@ public function addGroup(string $caption = null, bool $setAsCurrent = true): Con /** * Removes fieldset group from form. - * @param string|int|ControlGroup + * @param string|int|ControlGroup $name */ public function removeGroup($name): void { @@ -272,7 +272,7 @@ public function getGroups(): array /** * Returns the specified group. - * @param string|int + * @param string|int $name */ public function getGroup($name): ?ControlGroup { @@ -499,7 +499,7 @@ public function validateMaxPostSize(): void /** * Adds global error message. - * @param string|object + * @param string|object $message */ public function addError($message, bool $translate = true): void { diff --git a/src/Forms/Helpers.php b/src/Forms/Helpers.php index fe1aca2ee..f69c600f5 100644 --- a/src/Forms/Helpers.php +++ b/src/Forms/Helpers.php @@ -29,7 +29,7 @@ class Helpers /** * Extracts and sanitizes submitted form data for single control. - * @param int $type type Form::DATA_TEXT, DATA_LINE, DATA_FILE, DATA_KEYS + * @param int $type type Form::DATA_TEXT, DATA_LINE, DATA_FILE, DATA_KEYS * @return string|string[] * @internal */ diff --git a/src/Forms/IControl.php b/src/Forms/IControl.php index 891c7f127..7c671e520 100644 --- a/src/Forms/IControl.php +++ b/src/Forms/IControl.php @@ -18,7 +18,7 @@ interface IControl /** * Sets control's value. - * @param mixed + * @param mixed $value * @return static */ function setValue($value); diff --git a/src/Forms/Rendering/DefaultFormRenderer.php b/src/Forms/Rendering/DefaultFormRenderer.php index 5b8633b46..310504b7a 100644 --- a/src/Forms/Rendering/DefaultFormRenderer.php +++ b/src/Forms/Rendering/DefaultFormRenderer.php @@ -125,7 +125,7 @@ class DefaultFormRenderer implements Nette\Forms\IFormRenderer /** * Provides complete form rendering. - * @param string $mode 'begin', 'errors', 'ownerrors', 'body', 'end' or empty to render all + * @param string $mode 'begin', 'errors', 'ownerrors', 'body', 'end' or empty to render all */ public function render(Nette\Forms\Form $form, string $mode = null): string { @@ -299,7 +299,7 @@ public function renderBody(): string /** * Renders group of controls. - * @param Nette\Forms\Container|Nette\Forms\ControlGroup + * @param Nette\Forms\Container|Nette\Forms\ControlGroup $parent */ public function renderControls($parent): string { @@ -360,7 +360,7 @@ public function renderPair(Nette\Forms\IControl $control): string /** * Renders single visual row of multiple controls. - * @param Nette\Forms\IControl[] + * @param Nette\Forms\IControl[] $controls */ public function renderPairMulti(array $controls): string { diff --git a/src/Forms/Rules.php b/src/Forms/Rules.php index 89c4aef6c..c949458c2 100644 --- a/src/Forms/Rules.php +++ b/src/Forms/Rules.php @@ -43,7 +43,7 @@ public function __construct(IControl $control) /** * Makes control mandatory. - * @param mixed state or error message + * @param string|bool $value * @return static */ public function setRequired($value = true) @@ -77,8 +77,8 @@ public function isOptional(): bool /** * Adds a validation rule for the current control. - * @param mixed - * @param string|object + * @param callable|string $validator + * @param string|object $errorMessage * @return static */ public function addRule($validator, $errorMessage = null, $arg = null) diff --git a/src/Forms/Validator.php b/src/Forms/Validator.php index bed08b42b..17ddc9c55 100644 --- a/src/Forms/Validator.php +++ b/src/Forms/Validator.php @@ -179,7 +179,7 @@ public static function validateMax(IControl $control, $maximum): bool /** * Count/length validator. Range is array, min and max length pair. - * @param array|int $range + * @param array|int $range */ public static function validateLength(IControl $control, $range): bool { @@ -307,7 +307,7 @@ public static function validateFileSize(Controls\UploadControl $control, $limit) /** * Has file specified mime type? - * @param string|string[] $mimeType + * @param string|string[] $mimeType */ public static function validateMimeType(Controls\UploadControl $control, $mimeType): bool {