@@ -39,6 +39,9 @@ |
||
| 39 | 39 | return $this->can(__FUNCTION__, $member, $context); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $perm |
|
| 44 | + */ |
|
| 42 | 45 | public function can($perm, $member = null, $context = array()) |
| 43 | 46 | { |
| 44 | 47 | $perms = [ |
@@ -670,7 +670,7 @@ |
||
| 670 | 670 | * Get the HTML class attribute from a node in the sitetree |
| 671 | 671 | * |
| 672 | 672 | * @param $html |
| 673 | - * @param $node |
|
| 673 | + * @param DataObject|null $node |
|
| 674 | 674 | * @return string |
| 675 | 675 | */ |
| 676 | 676 | protected function getNodeClassFromTree($html, $node) |
@@ -9,6 +9,10 @@ |
||
| 9 | 9 | class MemberForm extends Form |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | + /** |
|
| 13 | + * @param \SilverStripe\Control\Controller $controller |
|
| 14 | + * @param string $name |
|
| 15 | + */ |
|
| 12 | 16 | public function __construct($controller, $name) |
| 13 | 17 | { |
| 14 | 18 | $fields = TestMember::singleton()->getCMSFields(); |
@@ -16,6 +16,9 @@ |
||
| 16 | 16 | Versioned::class |
| 17 | 17 | ); |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @param string $entropy |
|
| 21 | + */ |
|
| 19 | 22 | public function setEntropy($entropy) |
| 20 | 23 | { |
| 21 | 24 | $this->entropy = $entropy; |
@@ -173,6 +173,10 @@ discard block |
||
| 173 | 173 | ); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | + /** |
|
| 177 | + * @param \SilverStripe\ORM\FieldType\DBHTMLText $result |
|
| 178 | + * @param string[] $expected |
|
| 179 | + */ |
|
| 176 | 180 | private function assertExpectedStrings($result, $expected) |
| 177 | 181 | { |
| 178 | 182 | foreach ($expected as $expectedStr) { |
@@ -1088,6 +1092,10 @@ discard block |
||
| 1088 | 1092 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 1089 | 1093 | } |
| 1090 | 1094 | |
| 1095 | + /** |
|
| 1096 | + * @param string $a |
|
| 1097 | + * @param string $b |
|
| 1098 | + */ |
|
| 1091 | 1099 | public function assertEqualIgnoringWhitespace($a, $b, $message = '') |
| 1092 | 1100 | { |
| 1093 | 1101 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b), $message); |
@@ -1816,6 +1824,11 @@ discard block |
||
| 1816 | 1824 | $this->_renderWithSourceFileComments('SSViewerTestComments/'.$template['name'], $template['expected']); |
| 1817 | 1825 | } |
| 1818 | 1826 | } |
| 1827 | + |
|
| 1828 | + /** |
|
| 1829 | + * @param string $name |
|
| 1830 | + * @param string $expected |
|
| 1831 | + */ |
|
| 1819 | 1832 | private function _renderWithSourceFileComments($name, $expected) |
| 1820 | 1833 | { |
| 1821 | 1834 | $viewer = new SSViewer(array($name)); |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use SilverStripe\Control\HTTPResponse; |
| 9 | 9 | use SilverStripe\Core\Convert; |
| 10 | 10 | use SilverStripe\Core\Injector\Injector; |
| 11 | -use SilverStripe\Dev\Debug; |
|
| 12 | 11 | use SilverStripe\Dev\SapphireTest; |
| 13 | 12 | use SilverStripe\i18n\i18n; |
| 14 | 13 | use SilverStripe\ORM\DataObject; |
@@ -135,12 +135,12 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Email constructor. |
| 138 | - * @param string|array|null $from |
|
| 139 | - * @param string|array|null $to |
|
| 138 | + * @param string $from |
|
| 139 | + * @param string $to |
|
| 140 | 140 | * @param string|null $subject |
| 141 | 141 | * @param string|null $body |
| 142 | - * @param string|array|null $cc |
|
| 143 | - * @param string|array|null $bcc |
|
| 142 | + * @param string $cc |
|
| 143 | + * @param string $bcc |
|
| 144 | 144 | * @param string|null $returnPath |
| 145 | 145 | */ |
| 146 | 146 | public function __construct( |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
| 229 | - * @param string|array $address |
|
| 229 | + * @param string $address |
|
| 230 | 230 | * @param string|null $name |
| 231 | 231 | * @return $this |
| 232 | 232 | */ |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
| 241 | - * @return array |
|
| 241 | + * @return string |
|
| 242 | 242 | */ |
| 243 | 243 | public function getSender() |
| 244 | 244 | { |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /** |
| 306 | - * @param string|array $address |
|
| 306 | + * @param string $address |
|
| 307 | 307 | * @param string|null $name |
| 308 | 308 | * @return $this |
| 309 | 309 | */ |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /** |
| 338 | - * @param string|array $address |
|
| 338 | + * @param string $address |
|
| 339 | 339 | * @param string|null $name |
| 340 | 340 | * @return $this |
| 341 | 341 | */ |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /** |
| 370 | - * @param string|array $address |
|
| 370 | + * @param string $address |
|
| 371 | 371 | * @param string|null $name |
| 372 | 372 | * @return $this |
| 373 | 373 | */ |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | /** |
| 387 | - * @param string|array $address |
|
| 387 | + * @param string $address |
|
| 388 | 388 | * @param string|null $name |
| 389 | 389 | * @return $this |
| 390 | 390 | */ |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | /** |
| 399 | - * @param string|array $address |
|
| 399 | + * @param string $address |
|
| 400 | 400 | * @param string|null $name |
| 401 | 401 | * @return $this |
| 402 | 402 | */ |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | /** |
| 505 | - * @param string|array $name The data name to add or array to names => value |
|
| 505 | + * @param string $name The data name to add or array to names => value |
|
| 506 | 506 | * @param string|null $value The value of the data to add |
| 507 | 507 | * @return $this |
| 508 | 508 | */ |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | /** |
| 675 | - * @return array|bool |
|
| 675 | + * @return boolean |
|
| 676 | 676 | */ |
| 677 | 677 | public function sendPlain() |
| 678 | 678 | { |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | } |
| 729 | 729 | |
| 730 | 730 | /** |
| 731 | - * @return Swift_MimePart|false |
|
| 731 | + * @return \Swift_Mime_MimeEntity |
|
| 732 | 732 | */ |
| 733 | 733 | public function findPlainPart() |
| 734 | 734 | { |
@@ -889,9 +889,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -53,7 +53,6 @@ |
||
| 53 | 53 | use SilverStripe\View\ArrayData; |
| 54 | 54 | use ReflectionClass; |
| 55 | 55 | use InvalidArgumentException; |
| 56 | - |
|
| 57 | 56 | use SilverStripe\SiteConfig\SiteConfig; |
| 58 | 57 | |
| 59 | 58 | /** |
@@ -1002,7 +1002,7 @@ discard block |
||
| 1002 | 1002 | * {@link SSViewer::get_templates_by_class()} |
| 1003 | 1003 | * |
| 1004 | 1004 | * @param string $suffix |
| 1005 | - * @return array |
|
| 1005 | + * @return string |
|
| 1006 | 1006 | */ |
| 1007 | 1007 | public function getTemplatesWithSuffix($suffix) |
| 1008 | 1008 | { |
@@ -2154,7 +2154,7 @@ discard block |
||
| 2154 | 2154 | } |
| 2155 | 2155 | |
| 2156 | 2156 | /** |
| 2157 | - * @return String |
|
| 2157 | + * @return DBField |
|
| 2158 | 2158 | */ |
| 2159 | 2159 | public function Locale() |
| 2160 | 2160 | { |
@@ -92,6 +92,9 @@ |
||
| 92 | 92 | return $return; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + /** |
|
| 96 | + * @param boolean $index |
|
| 97 | + */ |
|
| 95 | 98 | function f($index) { |
| 96 | 99 | return stripslashes($this->row[$index]); |
| 97 | 100 | } |