Skip to content

Commit

Permalink
phpDoc: added $var name to @param
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 20, 2018
1 parent edfc435 commit 5da3697
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 61 deletions.
36 changes: 18 additions & 18 deletions src/Forms/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand Down
16 changes: 8 additions & 8 deletions src/Forms/Controls/BaseControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Button extends BaseControl
{

/**
* @param string|object
* @param string|object $caption
*/
public function __construct($caption = null)
{
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/Checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Checkbox extends BaseControl


/**
* @param string|object
* @param string|object $label
*/
public function __construct($label = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/CheckboxList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CheckboxList extends MultiChoiceControl


/**
* @param string|object
* @param string|object $label
*/
public function __construct($label = null, array $items = null)
{
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/ChoiceControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function loadHttpData(): void

/**
* Sets selected item (by key).
* @param string|int
* @param string|int $value
* @return static
* @internal
*/
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/CsrfProtection.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CsrfProtection extends HiddenField


/**
* @param string|object
* @param string|object $errorMessage
*/
public function __construct($errorMessage)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/HiddenField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/ImageButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/MultiChoiceControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/RadioList.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RadioList extends ChoiceControl


/**
* @param string|object
* @param string|object $label
*/
public function __construct($label = null, array $items = null)
{
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/SelectBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Controls/SubmitButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SubmitButton extends Button implements Nette\Forms\ISubmitterControl


/**
* @param string|object
* @param string|object $caption
*/
public function __construct($caption = null)
{
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/TextArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TextArea extends TextBase
{

/**
* @param string|object
* @param string|object $label
*/
public function __construct($label = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Controls/TextInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TextInput extends TextBase
{

/**
* @param string|object
* @param string|object $label
*/
public function __construct($label = null, int $maxLength = null)
{
Expand Down

0 comments on commit 5da3697

Please sign in to comment.