@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * Remove a previously registered authenticator |
129 | 129 | * |
130 | 130 | * @param string $authenticator Name of the authenticator class to register |
131 | - * @return bool Returns TRUE on success, FALSE otherwise. |
|
131 | + * @return boolean|null Returns TRUE on success, FALSE otherwise. |
|
132 | 132 | */ |
133 | 133 | public static function unregister_authenticator($authenticator) { |
134 | 134 | if(call_user_func(array($authenticator, 'on_unregister')) === true) { |
@@ -171,6 +171,7 @@ discard block |
||
171 | 171 | * Set a default authenticator (shows first in tabs) |
172 | 172 | * |
173 | 173 | * @param string |
174 | + * @param string $authenticator |
|
174 | 175 | */ |
175 | 176 | public static function set_default_authenticator($authenticator) { |
176 | 177 | self::$default_authenticator = $authenticator; |
@@ -331,6 +331,7 @@ |
||
331 | 331 | * Overloaded to ensure the code is always descent. |
332 | 332 | * |
333 | 333 | * @param string |
334 | + * @param string $val |
|
334 | 335 | */ |
335 | 336 | public function setCode($val){ |
336 | 337 | $this->setField("Code", Convert::raw2url($val)); |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use SilverStripe\ORM\Hierarchy\Hierarchy; |
31 | 31 | use SilverStripe\ORM\ManyManyList; |
32 | 32 | use SilverStripe\ORM\UnsavedRelationList; |
33 | -use SilverStripe\View\Requirements; |
|
34 | 33 | |
35 | 34 | /** |
36 | 35 | * A security group. |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | * This is likely to be customized for social sites etc. with a looser permission model. |
1562 | 1562 | * |
1563 | 1563 | * @param Member $member |
1564 | - * @return bool |
|
1564 | + * @return boolean|string |
|
1565 | 1565 | */ |
1566 | 1566 | public function canView($member = null) { |
1567 | 1567 | //get member |
@@ -1591,7 +1591,7 @@ discard block |
||
1591 | 1591 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
1592 | 1592 | * |
1593 | 1593 | * @param Member $member |
1594 | - * @return bool |
|
1594 | + * @return boolean|string |
|
1595 | 1595 | */ |
1596 | 1596 | public function canEdit($member = null) { |
1597 | 1597 | //get member |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
1626 | 1626 | * |
1627 | 1627 | * @param Member $member |
1628 | - * @return bool |
|
1628 | + * @return boolean|string |
|
1629 | 1629 | */ |
1630 | 1630 | public function canDelete($member = null) { |
1631 | 1631 | if(!($member instanceof Member)) { |
@@ -147,7 +147,7 @@ |
||
147 | 147 | * @param Form $form Optional: If passed, better error messages can be |
148 | 148 | * produced by using |
149 | 149 | * {@link Form::sessionMessage()} |
150 | - * @return bool|Member Returns FALSE if authentication fails, otherwise |
|
150 | + * @return Member|null Returns FALSE if authentication fails, otherwise |
|
151 | 151 | * the member object |
152 | 152 | * @see Security::setDefaultAdmin() |
153 | 153 | */ |
@@ -87,6 +87,9 @@ |
||
87 | 87 | return $this->token; |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $token |
|
92 | + */ |
|
90 | 93 | public function setToken($token) { |
91 | 94 | $this->token = $token; |
92 | 95 | } |
@@ -843,6 +843,10 @@ discard block |
||
843 | 843 | * Assist with testing of specific protected methods |
844 | 844 | */ |
845 | 845 | class i18nTextCollectorTest_Collector extends i18nTextCollector implements TestOnly { |
846 | + |
|
847 | + /** |
|
848 | + * @param string $directory |
|
849 | + */ |
|
846 | 850 | public function getModules_Test($directory) { |
847 | 851 | return $this->getModules($directory); |
848 | 852 | } |
@@ -851,6 +855,9 @@ discard block |
||
851 | 855 | return $this->resolveDuplicateConflicts($entitiesByModule); |
852 | 856 | } |
853 | 857 | |
858 | + /** |
|
859 | + * @param string $module |
|
860 | + */ |
|
854 | 861 | public function getFileListForModule_Test($module) { |
855 | 862 | return $this->getFileListForModule($module); |
856 | 863 | } |
@@ -859,6 +866,9 @@ discard block |
||
859 | 866 | return $this->getConflicts($entitiesByModule); |
860 | 867 | } |
861 | 868 | |
869 | + /** |
|
870 | + * @param string $class |
|
871 | + */ |
|
862 | 872 | public function findModuleForClass_Test($class) { |
863 | 873 | return $this->findModuleForClass($class); |
864 | 874 | } |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | /** |
731 | 731 | * All custom objects with the same number. E.g. 'Page 1' owns 'Custom 1' |
732 | 732 | * |
733 | - * @return DataList |
|
733 | + * @return SilverStripe\ORM\DataList |
|
734 | 734 | */ |
735 | 735 | public function Custom() { |
736 | 736 | $title = str_replace('Page', 'Custom', $this->Title); |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | /** |
785 | 785 | * All pages with the same number. E.g. 'Page 1' owns 'Custom 1' |
786 | 786 | * |
787 | - * @return DataList |
|
787 | + * @return SilverStripe\ORM\DataList |
|
788 | 788 | */ |
789 | 789 | public function Pages() { |
790 | 790 | $title = str_replace('Custom', 'Page', $this->Title); |
@@ -128,6 +128,10 @@ discard block |
||
128 | 128 | )); |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param DBHTMLText $result |
|
133 | + * @param string[] $expected |
|
134 | + */ |
|
131 | 135 | private function assertExpectedStrings($result, $expected) { |
132 | 136 | foreach ($expected as $expectedStr) { |
133 | 137 | $this->assertTrue( |
@@ -787,6 +791,10 @@ discard block |
||
787 | 791 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
788 | 792 | } |
789 | 793 | |
794 | + /** |
|
795 | + * @param string $a |
|
796 | + * @param string $b |
|
797 | + */ |
|
790 | 798 | public function assertEqualIgnoringWhitespace($a, $b) { |
791 | 799 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
792 | 800 | } |
@@ -1375,6 +1383,11 @@ discard block |
||
1375 | 1383 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
1376 | 1384 | Config::inst()->update('Director', 'environment_type', $origEnv); |
1377 | 1385 | } |
1386 | + |
|
1387 | + /** |
|
1388 | + * @param string $name |
|
1389 | + * @param string $expected |
|
1390 | + */ |
|
1378 | 1391 | private function _renderWithSourceFileComments($name, $expected) { |
1379 | 1392 | $viewer = new SSViewer(array($name)); |
1380 | 1393 | $data = new ArrayData(array()); |
@@ -477,7 +477,7 @@ |
||
477 | 477 | } |
478 | 478 | |
479 | 479 | /** |
480 | - * @param array $value |
|
480 | + * @param string $value |
|
481 | 481 | * @return $this |
482 | 482 | */ |
483 | 483 | public function setArrayValue($value) { |