@@ -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) { |
@@ -718,7 +718,7 @@ |
||
| 718 | 718 | * @param boolean $create Flag indicating whether the database should be created |
| 719 | 719 | * if it doesn't exist. If $create is false and the database doesn't exist |
| 720 | 720 | * then an error will be raised |
| 721 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 721 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 722 | 722 | * should be raised |
| 723 | 723 | * @return boolean Flag indicating success |
| 724 | 724 | */ |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * Return the IDs of all the marked nodes. |
| 381 | 381 | * |
| 382 | - * @return array |
|
| 382 | + * @return integer[] |
|
| 383 | 383 | */ |
| 384 | 384 | public function markedNodeIDs() { |
| 385 | 385 | return array_keys($this->markedNodes); |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
| 757 | 757 | * then search the parents. |
| 758 | 758 | * @param string $className Class name of the node to find. |
| 759 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
| 759 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
| 760 | 760 | * @param DataObject $afterNode Used for recursive calls to this function |
| 761 | 761 | * @return DataObject |
| 762 | 762 | */ |