Completed
Push — fix-2494 ( 3153ee )
by Sam
07:19
created
src/Security/Member.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -889,9 +889,9 @@  discard block
 block discarded – undo
889 889
      * });
890 890
      * </code>
891 891
      *
892
-     * @param Member|null|int $member Member or member ID to log in as.
892
+     * @param null|Member $member Member or member ID to log in as.
893 893
      * Set to null or 0 to act as a logged out user.
894
-     * @param $callback
894
+     * @param \Closure $callback
895 895
      */
896 896
     public static function actAs($member, $callback)
897 897
     {
@@ -1661,7 +1661,7 @@  discard block
 block discarded – undo
1661 1661
      * This is likely to be customized for social sites etc. with a looser permission model.
1662 1662
      *
1663 1663
      * @param Member $member
1664
-     * @return bool
1664
+     * @return boolean|string
1665 1665
      */
1666 1666
     public function canView($member = null)
1667 1667
     {
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
      * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1693 1693
      *
1694 1694
      * @param Member $member
1695
-     * @return bool
1695
+     * @return boolean|string
1696 1696
      */
1697 1697
     public function canEdit($member = null)
1698 1698
     {
@@ -1727,7 +1727,7 @@  discard block
 block discarded – undo
1727 1727
      * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1728 1728
      *
1729 1729
      * @param Member $member
1730
-     * @return bool
1730
+     * @return boolean|string
1731 1731
      */
1732 1732
     public function canDelete($member = null)
1733 1733
     {
Please login to merge, or discard this patch.
src/Forms/DatetimeField.php 1 patch
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     /**
141
-     * @param $bool
141
+     * @param boolean $bool
142 142
      * @return $this
143 143
      */
144 144
     public function setHTML5($bool)
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * Assign value posted from form submission, based on {@link $datetimeFormat}.
152 152
      * When $html5=true, this needs to be normalised ISO format (with "T" separator).
153 153
      *
154
-     * @param mixed $value
154
+     * @param string $value
155 155
      * @param mixed $data
156 156
      * @return $this
157 157
      */
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      * When $html5=true, assign value from ISO 8601 normalised string (with a "T" separator).
318 318
      * Falls back to an ISO 8601 string (with a whitespace separator).
319 319
      *
320
-     * @param mixed $value
320
+     * @param string $value
321 321
      * @param mixed $data
322 322
      * @return $this
323 323
      */
@@ -492,6 +492,9 @@  discard block
 block discarded – undo
492 492
         return $this;
493 493
     }
494 494
 
495
+    /**
496
+     * @param boolean $bool
497
+     */
495 498
     public function setReadonly($bool)
496 499
     {
497 500
         parent::setReadonly($bool);
Please login to merge, or discard this patch.
src/Security/InheritedPermissions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     /**
112 112
      * Global permissions required to edit
113 113
      *
114
-     * @param array $permissions
114
+     * @param string[] $permissions
115 115
      * @return $this
116 116
      */
117 117
     public function setGlobalEditPermissions($permissions)
Please login to merge, or discard this patch.
src/View/Parsers/Diff.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
     }
162 162
 
163 163
     /**
164
-     * @param string|bool|array $content If passed as an array, values will be concatenated with a comma.
164
+     * @param string $content If passed as an array, values will be concatenated with a comma.
165 165
      * @return array
166 166
      */
167 167
     public static function getHTMLChunks($content)
Please login to merge, or discard this patch.
tests/behat/src/CmsUiContext.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -479,6 +479,7 @@
 block discarded – undo
479 479
      *
480 480
      * @When /^(?:|I )fill in the "(?P<field>(?:[^"]|\\")*)" dropdown with "(?P<value>(?:[^"]|\\")*)"$/
481 481
      * @When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for the "(?P<field>(?:[^"]|\\")*)" dropdown$/
482
+     * @param string $field
482 483
      */
483 484
     public function theIFillInTheDropdownWith($field, $value)
484 485
     {
Please login to merge, or discard this patch.
tests/php/Forms/GridField/GridFieldAddNewButtonTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -88,6 +88,9 @@
 block discarded – undo
88 88
         $this->mockButtonFragments($list, null);
89 89
     }
90 90
 
91
+    /**
92
+     * @param \SilverStripe\ORM\DataObject $parent
93
+     */
91 94
     protected function mockButtonFragments(SS_List $list, $parent = null)
92 95
     {
93 96
         $form = Form::create(
Please login to merge, or discard this patch.
tests/php/Security/InheritedPermissionsTest/TestPermissionNode.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@
 block discarded – undo
42 42
         return Injector::inst()->get(PermissionChecker::class.'.testpermissions');
43 43
     }
44 44
 
45
+    /**
46
+     * @param DataObject $member
47
+     */
45 48
     public function canEdit($member = null)
46 49
     {
47 50
         if (!$member) {
Please login to merge, or discard this patch.
tests/php/View/SSViewerTest.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -159,6 +159,10 @@  discard block
 block discarded – undo
159 159
         ]);
160 160
     }
161 161
 
162
+    /**
163
+     * @param \SilverStripe\ORM\FieldType\DBHTMLText $result
164
+     * @param string[] $expected
165
+     */
162 166
     private function assertExpectedStrings($result, $expected)
163 167
     {
164 168
         foreach ($expected as $expectedStr) {
@@ -1089,6 +1093,10 @@  discard block
 block discarded – undo
1089 1093
         $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult);
1090 1094
     }
1091 1095
 
1096
+    /**
1097
+     * @param string $a
1098
+     * @param string $b
1099
+     */
1092 1100
     public function assertEqualIgnoringWhitespace($a, $b, $message = '')
1093 1101
     {
1094 1102
         $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b), $message);
@@ -1817,6 +1825,11 @@  discard block
 block discarded – undo
1817 1825
             $this->_renderWithSourceFileComments('SSViewerTestComments/'.$template['name'], $template['expected']);
1818 1826
         }
1819 1827
     }
1828
+
1829
+    /**
1830
+     * @param string $name
1831
+     * @param string $expected
1832
+     */
1820 1833
     private function _renderWithSourceFileComments($name, $expected)
1821 1834
     {
1822 1835
         $viewer = new SSViewer(array($name));
Please login to merge, or discard this patch.
src/ORM/DataObject.php 1 patch
Doc Comments   +9 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2176,7 +2176,7 @@  discard block
 block discarded – undo
2176 2176
      * Called by {@link __get()} and any getFieldName() methods you might create.
2177 2177
      *
2178 2178
      * @param string $field The name of the field
2179
-     * @return mixed The field value
2179
+     * @return string|null The field value
2180 2180
      */
2181 2181
     public function getField($field)
2182 2182
     {
@@ -2458,6 +2458,7 @@  discard block
 block discarded – undo
2458 2458
 
2459 2459
     /**
2460 2460
      * {@inheritdoc}
2461
+     * @param string $field
2461 2462
      */
2462 2463
     public function castingHelper($field)
2463 2464
     {
@@ -2563,7 +2564,7 @@  discard block
 block discarded – undo
2563 2564
      * </code>
2564 2565
      *
2565 2566
      * @param string $methodName Method on the same object, e.g. {@link canEdit()}
2566
-     * @param Member|int $member
2567
+     * @param null|Member $member
2567 2568
      * @param array $context Optional context
2568 2569
      * @return boolean|null
2569 2570
      */
@@ -2586,7 +2587,7 @@  discard block
 block discarded – undo
2586 2587
 
2587 2588
     /**
2588 2589
      * @param Member $member
2589
-     * @return boolean
2590
+     * @return boolean|string
2590 2591
      */
2591 2592
     public function canView($member = null)
2592 2593
     {
@@ -2599,7 +2600,7 @@  discard block
 block discarded – undo
2599 2600
 
2600 2601
     /**
2601 2602
      * @param Member $member
2602
-     * @return boolean
2603
+     * @return boolean|string
2603 2604
      */
2604 2605
     public function canEdit($member = null)
2605 2606
     {
@@ -2612,7 +2613,7 @@  discard block
 block discarded – undo
2612 2613
 
2613 2614
     /**
2614 2615
      * @param Member $member
2615
-     * @return boolean
2616
+     * @return boolean|string
2616 2617
      */
2617 2618
     public function canDelete($member = null)
2618 2619
     {
@@ -2627,7 +2628,7 @@  discard block
 block discarded – undo
2627 2628
      * @param Member $member
2628 2629
      * @param array $context Additional context-specific data which might
2629 2630
      * affect whether (or where) this object could be created.
2630
-     * @return boolean
2631
+     * @return boolean|string
2631 2632
      */
2632 2633
     public function canCreate($member = null, $context = array())
2633 2634
     {
@@ -2742,7 +2743,7 @@  discard block
 block discarded – undo
2742 2743
      * Traverses to a field referenced by relationships between data objects, returning the value
2743 2744
      * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
2744 2745
      *
2745
-     * @param $fieldName string
2746
+     * @param string $fieldName string
2746 2747
      * @return string | null - will return null on a missing value
2747 2748
      */
2748 2749
     public function relField($fieldName)
@@ -2820,7 +2821,7 @@  discard block
 block discarded – undo
2820 2821
      * @param string $callerClass The class of objects to be returned
2821 2822
      * @param string|array $filter A filter to be inserted into the WHERE clause.
2822 2823
      * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
2823
-     * @param string|array $sort A sort expression to be inserted into the ORDER
2824
+     * @param string $sort A sort expression to be inserted into the ORDER
2824 2825
      * BY clause.  If omitted, self::$default_sort will be used.
2825 2826
      * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
2826 2827
      * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
Please login to merge, or discard this patch.