Skip to content

Commit a3600d1

Browse files
committed
@return self -> static
1 parent 6c2efb3 commit a3600d1

16 files changed

+52
-52
lines changed

src/Forms/Container.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Container extends Nette\ComponentModel\Container implements \ArrayAccess
3636
* Fill-in with default values.
3737
* @param array|\Traversable values used to fill the form
3838
* @param bool erase other default values?
39-
* @return self
39+
* @return static
4040
*/
4141
public function setDefaults($values, $erase = FALSE)
4242
{
@@ -52,7 +52,7 @@ public function setDefaults($values, $erase = FALSE)
5252
* Fill-in with values.
5353
* @param array|\Traversable values used to fill the form
5454
* @param bool erase other controls?
55-
* @return self
55+
* @return static
5656
* @internal
5757
*/
5858
public function setValues($values, $erase = FALSE)
@@ -169,7 +169,7 @@ public function getErrors()
169169

170170

171171
/**
172-
* @return self
172+
* @return static
173173
*/
174174
public function setCurrentGroup(ControlGroup $group = NULL)
175175
{
@@ -193,7 +193,7 @@ public function getCurrentGroup()
193193
* @param Nette\ComponentModel\IComponent
194194
* @param string
195195
* @param string
196-
* @return self
196+
* @return static
197197
* @throws Nette\InvalidStateException
198198
*/
199199
public function addComponent(Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL)
@@ -448,7 +448,7 @@ public function addImage($name, $src = NULL, $alt = NULL)
448448
/**
449449
* Adds naming container to the form.
450450
* @param string name
451-
* @return Container
451+
* @return self
452452
*/
453453
public function addContainer($name)
454454
{

src/Forms/ControlGroup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct()
3131

3232

3333
/**
34-
* @return self
34+
* @return static
3535
*/
3636
public function add(...$items)
3737
{
@@ -75,7 +75,7 @@ public function getControls()
7575
*
7676
* @param string key
7777
* @param mixed value
78-
* @return self
78+
* @return static
7979
*/
8080
public function setOption($key, $value)
8181
{

src/Forms/Controls/BaseControl.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getHtmlName()
149149

150150
/**
151151
* Sets control's value.
152-
* @return self
152+
* @return static
153153
* @internal
154154
*/
155155
public function setValue($value)
@@ -182,7 +182,7 @@ public function isFilled()
182182

183183
/**
184184
* Sets control's default value.
185-
* @return self
185+
* @return static
186186
*/
187187
public function setDefaultValue($value)
188188
{
@@ -197,7 +197,7 @@ public function setDefaultValue($value)
197197
/**
198198
* Disables or enables control.
199199
* @param bool
200-
* @return self
200+
* @return static
201201
*/
202202
public function setDisabled($value = TRUE)
203203
{
@@ -221,7 +221,7 @@ public function isDisabled()
221221
/**
222222
* Sets whether control value is excluded from $form->getValues() result.
223223
* @param bool
224-
* @return self
224+
* @return static
225225
*/
226226
public function setOmitted($value = TRUE)
227227
{
@@ -316,7 +316,7 @@ public function getLabelPrototype()
316316
/**
317317
* Changes control's HTML id.
318318
* @param string new ID, or FALSE or NULL
319-
* @return self
319+
* @return static
320320
*/
321321
public function setHtmlId($id)
322322
{
@@ -342,7 +342,7 @@ public function getHtmlId()
342342
* Changes control's HTML attribute.
343343
* @param string name
344344
* @param mixed value
345-
* @return self
345+
* @return static
346346
*/
347347
public function setAttribute($name, $value = TRUE)
348348
{
@@ -356,7 +356,7 @@ public function setAttribute($name, $value = TRUE)
356356

357357
/**
358358
* Sets translate adapter.
359-
* @return self
359+
* @return static
360360
*/
361361
public function setTranslator(Nette\Localization\ITranslator $translator = NULL)
362362
{
@@ -406,7 +406,7 @@ public function translate($value, $count = NULL)
406406
* @param mixed rule type
407407
* @param string message to display for invalid data
408408
* @param mixed optional rule arguments
409-
* @return self
409+
* @return static
410410
*/
411411
public function addRule($validator, $message = NULL, $arg = NULL)
412412
{
@@ -452,7 +452,7 @@ public function getRules()
452452
/**
453453
* Makes control mandatory.
454454
* @param mixed state or error message
455-
* @return self
455+
* @return static
456456
*/
457457
public function setRequired($value = TRUE)
458458
{
@@ -549,7 +549,7 @@ public static function enableAutoOptionalMode()
549549

550550
/**
551551
* Sets user-specific option.
552-
* @return self
552+
* @return static
553553
*/
554554
public function setOption($key, $value)
555555
{

src/Forms/Controls/Checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct($label = NULL)
3434
/**
3535
* Sets control's value.
3636
* @param bool
37-
* @return self
37+
* @return static
3838
* @internal
3939
*/
4040
public function setValue($value)

src/Forms/Controls/ChoiceControl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function loadHttpData()
5454
/**
5555
* Sets selected item (by key).
5656
* @param string|int
57-
* @return self
57+
* @return static
5858
* @internal
5959
*/
6060
public function setValue($value)
@@ -102,7 +102,7 @@ public function isFilled()
102102
* Sets items from which to choose.
103103
* @param array
104104
* @param bool
105-
* @return self
105+
* @return static
106106
*/
107107
public function setItems(array $items, $useKeys = TRUE)
108108
{
@@ -135,7 +135,7 @@ public function getSelectedItem()
135135
/**
136136
* Disables or enables control or items.
137137
* @param bool|array
138-
* @return self
138+
* @return static
139139
*/
140140
public function setDisabled($value = TRUE)
141141
{

src/Forms/Controls/CsrfProtection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function attached($parent)
4545

4646

4747
/**
48-
* @return self
48+
* @return static
4949
* @internal
5050
*/
5151
public function setValue($value)

src/Forms/Controls/HiddenField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct($persistentValue = NULL)
3535
/**
3636
* Sets control's value.
3737
* @param string
38-
* @return self
38+
* @return static
3939
* @internal
4040
*/
4141
public function setValue($value)

src/Forms/Controls/MultiChoiceControl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function loadHttpData()
5050
/**
5151
* Sets selected items (by keys).
5252
* @param array
53-
* @return self
53+
* @return static
5454
* @internal
5555
*/
5656
public function setValue($values)
@@ -112,7 +112,7 @@ public function isFilled()
112112
* Sets items from which to choose.
113113
* @param array
114114
* @param bool
115-
* @return self
115+
* @return static
116116
*/
117117
public function setItems(array $items, $useKeys = TRUE)
118118
{
@@ -144,7 +144,7 @@ public function getSelectedItems()
144144
/**
145145
* Disables or enables control or items.
146146
* @param bool|array
147-
* @return self
147+
* @return static
148148
*/
149149
public function setDisabled($value = TRUE)
150150
{

src/Forms/Controls/MultiSelectBox.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct($label = NULL, array $items = NULL)
3131

3232
/**
3333
* Sets options and option groups from which to choose.
34-
* @return self
34+
* @return static
3535
*/
3636
public function setItems(array $items, $useKeys = TRUE)
3737
{
@@ -76,7 +76,7 @@ public function getControl()
7676

7777

7878
/**
79-
* @return self
79+
* @return static
8080
*/
8181
public function addOptionAttributes(array $attributes)
8282
{

src/Forms/Controls/SelectBox.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct($label = NULL, array $items = NULL)
4040
/**
4141
* Sets first prompt item in select box.
4242
* @param string
43-
* @return self
43+
* @return static
4444
*/
4545
public function setPrompt($prompt)
4646
{
@@ -61,7 +61,7 @@ public function getPrompt()
6161

6262
/**
6363
* Sets options and option groups from which to choose.
64-
* @return self
64+
* @return static
6565
*/
6666
public function setItems(array $items, $useKeys = TRUE)
6767
{
@@ -106,7 +106,7 @@ public function getControl()
106106

107107

108108
/**
109-
* @return self
109+
* @return static
110110
*/
111111
public function addOptionAttributes(array $attributes)
112112
{

0 commit comments

Comments
 (0)