Completed
Pull Request — master (#6394)
by Ed
10:36
created
src/Dev/Deprecation.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      * greater than or equal to this version, a message will be raised
76 76
      *
77 77
      * @static
78
-     * @param $ver string -
78
+     * @param string $ver string -
79 79
      *     A php standard version string, see http://php.net/manual/en/function.version-compare.php for details.
80 80
      * @param null $forModule string -
81 81
      *    The name of a module. The passed version will be used as the check value for
Please login to merge, or discard this patch.
src/Dev/FixtureBlueprint.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -304,6 +304,9 @@  discard block
 block discarded – undo
304 304
         return $this;
305 305
     }
306 306
 
307
+    /**
308
+     * @param string $type
309
+     */
307 310
     protected function invokeCallbacks($type, $args = array())
308 311
     {
309 312
         foreach ($this->callbacks[$type] as $callback) {
@@ -346,6 +349,9 @@  discard block
 block discarded – undo
346 349
         $obj->$name = $this->parseValue($value, $fixtures);
347 350
     }
348 351
 
352
+    /**
353
+     * @param string $fieldName
354
+     */
349 355
     protected function overrideField($obj, $fieldName, $value, $fixtures = null)
350 356
     {
351 357
         $class = get_class($obj);
Please login to merge, or discard this patch.
src/Dev/SapphireTest.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -632,10 +632,10 @@  discard block
 block discarded – undo
632 632
     /**
633 633
      * Assert that the matching email was sent since the last call to clearEmails()
634 634
      * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression.
635
-     * @param $to
635
+     * @param string $to
636 636
      * @param $from
637
-     * @param $subject
638
-     * @param $content
637
+     * @param string $subject
638
+     * @param string $content
639 639
      * @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles',
640 640
      *               'customHeaders', 'htmlContent', inlineImages'
641 641
      */
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
      * @param string $expectedSQL
869 869
      * @param string $actualSQL
870 870
      * @param string $message
871
-     * @param float|int $delta
871
+     * @param integer $delta
872 872
      * @param integer $maxDepth
873 873
      * @param boolean $canonicalize
874 874
      * @param boolean $ignoreCase
Please login to merge, or discard this patch.
src/Dev/SapphireTestReporter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      *
369 369
      * @param PHPUnit_Framework_Test $test current test that is being run
370 370
      * @param Exception $e PHPUnit error
371
-     * @return array
371
+     * @return string
372 372
      */
373 373
     private function getTestException(PHPUnit_Framework_Test $test, Exception $e)
374 374
     {
@@ -483,6 +483,9 @@  discard block
 block discarded – undo
483 483
         echo "</div>";
484 484
     }
485 485
 
486
+    /**
487
+     * @param string $name
488
+     */
486 489
     protected function testNameToPhrase($name)
487 490
     {
488 491
         return ucfirst(preg_replace("/([a-z])([A-Z])/", "$1 $2", $name));
Please login to merge, or discard this patch.
src/Forms/AssetField.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     /**
205 205
      * Determine if the target folder for new uploads in is visible the field UI.
206 206
      *
207
-     * @return boolean
207
+     * @return boolean|string
208 208
      */
209 209
     public function canPreviewFolder()
210 210
     {
@@ -279,6 +279,10 @@  discard block
 block discarded – undo
279 279
         return $this->record;
280 280
     }
281 281
 
282
+    /**
283
+     * @param null|DataObject $value
284
+     * @param DataObject $record
285
+     */
282 286
     public function setValue($value, $record = null)
283 287
     {
284 288
         // Extract value from underlying record
@@ -392,7 +396,7 @@  discard block
 block discarded – undo
392 396
     /**
393 397
      * Determine if the user has permission to upload.
394 398
      *
395
-     * @return boolean
399
+     * @return boolean|string
396 400
      */
397 401
     public function canUpload()
398 402
     {
Please login to merge, or discard this patch.
src/Forms/CompositeField.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -261,6 +261,9 @@  discard block
 block discarded – undo
261 261
 
262 262
 
263 263
 
264
+    /**
265
+     * @param boolean $disabled
266
+     */
264 267
     public function setDisabled($disabled)
265 268
     {
266 269
         parent::setDisabled($disabled);
@@ -270,6 +273,9 @@  discard block
 block discarded – undo
270 273
         return $this;
271 274
     }
272 275
 
276
+    /**
277
+     * @param boolean $readonly
278
+     */
273 279
     public function setReadonly($readonly)
274 280
     {
275 281
         parent::setReadonly($readonly);
@@ -362,6 +368,10 @@  discard block
 block discarded – undo
362 368
         $this->children->removeByName($fieldName, $dataFieldOnly);
363 369
     }
364 370
 
371
+    /**
372
+     * @param string $fieldName
373
+     * @param FormField $newField
374
+     */
365 375
     public function replaceField($fieldName, $newField)
366 376
     {
367 377
         return $this->children->replaceField($fieldName, $newField);
@@ -437,6 +447,9 @@  discard block
 block discarded – undo
437 447
         return $clone;
438 448
     }
439 449
 
450
+    /**
451
+     * @return boolean
452
+     */
440 453
     public function IsReadonly()
441 454
     {
442 455
         return $this->readonly;
@@ -447,6 +460,7 @@  discard block
 block discarded – undo
447 460
      * the children collection. Doesn't work recursively.
448 461
      *
449 462
      * @param string|FormField
463
+     * @param string $field
450 464
      * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't
451 465
      *             be found.
452 466
      */
Please login to merge, or discard this patch.
src/Forms/DateField.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,6 +103,11 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected $valueObj = null;
105 105
 
106
+    /**
107
+     * @param string $name
108
+     * @param string $title
109
+     * @param string $value
110
+     */
106 111
     public function __construct($name, $title = null, $value = null)
107 112
     {
108 113
         if (!$this->locale) {
@@ -311,7 +316,7 @@  discard block
 block discarded – undo
311 316
     }
312 317
 
313 318
     /**
314
-     * @param mixed $class
319
+     * @param string $class
315 320
      * @return FormField
316 321
      */
317 322
     public function castedCopy($class)
Please login to merge, or discard this patch.
src/Forms/DatetimeField.php 1 patch
Doc Comments   +20 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,6 +70,10 @@  discard block
 block discarded – undo
70 70
      */
71 71
     protected $config;
72 72
 
73
+    /**
74
+     * @param string $name
75
+     * @param string $title
76
+     */
73 77
     public function __construct($name, $title = null, $value = "")
74 78
     {
75 79
         $this->config = $this->config()->default_config;
@@ -81,6 +85,9 @@  discard block
 block discarded – undo
81 85
         parent::__construct($name, $title, $value);
82 86
     }
83 87
 
88
+    /**
89
+     * @param Form $form
90
+     */
84 91
     public function setForm($form)
85 92
     {
86 93
         parent::setForm($form);
@@ -92,6 +99,9 @@  discard block
 block discarded – undo
92 99
         return $this;
93 100
     }
94 101
 
102
+    /**
103
+     * @param string $name
104
+     */
95 105
     public function setName($name)
96 106
     {
97 107
         parent::setName($name);
@@ -105,7 +115,7 @@  discard block
 block discarded – undo
105 115
 
106 116
     /**
107 117
      * @param array $properties
108
-     * @return string
118
+     * @return \SilverStripe\ORM\FieldType\DBHTMLText
109 119
      */
110 120
     public function FieldHolder($properties = array())
111 121
     {
@@ -120,7 +130,7 @@  discard block
 block discarded – undo
120 130
 
121 131
     /**
122 132
      * @param array $properties
123
-     * @return string
133
+     * @return \SilverStripe\ORM\FieldType\DBHTMLText
124 134
      */
125 135
     public function Field($properties = array())
126 136
     {
@@ -254,6 +264,9 @@  discard block
 block discarded – undo
254 264
         return $this;
255 265
     }
256 266
 
267
+    /**
268
+     * @param boolean $bool
269
+     */
257 270
     public function setReadonly($bool)
258 271
     {
259 272
         parent::setReadonly($bool);
@@ -354,7 +367,7 @@  discard block
 block discarded – undo
354 367
      * to set field-specific config options.
355 368
      *
356 369
      * @param string $name
357
-     * @param mixed $val
370
+     * @param string $val
358 371
      * @return $this
359 372
      */
360 373
     public function setConfig($name, $val)
@@ -374,7 +387,7 @@  discard block
 block discarded – undo
374 387
      * to get field-specific config options.
375 388
      *
376 389
      * @param String $name Optional, returns the whole configuration array if empty
377
-     * @return mixed
390
+     * @return string|null
378 391
      */
379 392
     public function getConfig($name = null)
380 393
     {
@@ -385,6 +398,9 @@  discard block
 block discarded – undo
385 398
         }
386 399
     }
387 400
 
401
+    /**
402
+     * @param RequiredFields $validator
403
+     */
388 404
     public function validate($validator)
389 405
     {
390 406
         $dateValid = $this->dateField->validate($validator);
Please login to merge, or discard this patch.
src/Forms/FieldList.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,6 +86,9 @@  discard block
 block discarded – undo
86 86
         $this->sequentialSaveableSet = null;
87 87
     }
88 88
 
89
+    /**
90
+     * @param FormField[] $list
91
+     */
89 92
     protected function collateDataFields(&$list, $saveableOnly = false)
90 93
     {
91 94
         foreach ($this as $field) {
@@ -191,7 +194,7 @@  discard block
 block discarded – undo
191 194
      * Removes a number of fields from a Tab/TabSet within this FieldList.
192 195
      *
193 196
      * @param string $tabName The name of the Tab or TabSet field
194
-     * @param array $fields A list of fields, e.g. array('Name', 'Email')
197
+     * @param string[] $fields A list of fields, e.g. array('Name', 'Email')
195 198
      */
196 199
     public function removeFieldsFromTab($tabName, $fields)
197 200
     {
@@ -618,7 +621,7 @@  discard block
 block discarded – undo
618 621
     }
619 622
 
620 623
     /**
621
-     * @param $field
624
+     * @param CompositeField $field
622 625
      * @return $this
623 626
      */
624 627
     public function setContainerField($field)
@@ -700,6 +703,7 @@  discard block
 block discarded – undo
700 703
      * the children collection. Doesn't work recursively.
701 704
      *
702 705
      * @param string|FormField
706
+     * @param string $field
703 707
      * @return int Position in children collection (first position starts with 0).
704 708
      * Returns FALSE if the field can't be found.
705 709
      */
Please login to merge, or discard this patch.