@@ -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 | */ |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $action |
|
| 57 | + */ |
|
| 55 | 58 | public function Link($action = null) { |
| 56 | 59 | /** @skipUpgrade */ |
| 57 | 60 | return Controller::join_links(Director::baseURL(), "CMSSecurity", $action); |
@@ -68,6 +71,9 @@ discard block |
||
| 68 | 71 | } |
| 69 | 72 | } |
| 70 | 73 | |
| 74 | + /** |
|
| 75 | + * @param string $title |
|
| 76 | + */ |
|
| 71 | 77 | public function getResponseController($title) { |
| 72 | 78 | // Use $this to prevent use of Page to render underlying templates |
| 73 | 79 | return $this; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | * Check if this file can be modified |
| 409 | 409 | * |
| 410 | 410 | * @param Member $member |
| 411 | - * @return boolean |
|
| 411 | + * @return boolean|string |
|
| 412 | 412 | */ |
| 413 | 413 | public function canEdit($member = null) { |
| 414 | 414 | if(!$member) { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | * |
| 429 | 429 | * @param Member $member |
| 430 | 430 | * @param array $context |
| 431 | - * @return boolean |
|
| 431 | + * @return boolean|string |
|
| 432 | 432 | */ |
| 433 | 433 | public function canCreate($member = null, $context = array()) { |
| 434 | 434 | if(!$member) { |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | * Check if this file can be deleted |
| 448 | 448 | * |
| 449 | 449 | * @param Member $member |
| 450 | - * @return boolean |
|
| 450 | + * @return boolean|string |
|
| 451 | 451 | */ |
| 452 | 452 | public function canDelete($member = null) { |
| 453 | 453 | if(!$member) { |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | * |
| 644 | 644 | * @param string $condition The PHP condition to be evaluated. The page will be called $item |
| 645 | 645 | * @param array $collator An array, passed by reference, to collect all of the matching descendants. |
| 646 | - * @return true|null |
|
| 646 | + * @return boolean|null |
|
| 647 | 647 | */ |
| 648 | 648 | public function collateDescendants($condition, &$collator) { |
| 649 | 649 | if($children = $this->Children()) { |
@@ -1016,6 +1016,7 @@ discard block |
||
| 1016 | 1016 | * |
| 1017 | 1017 | * @param String File extension, without dot prefix. Use an asterisk ('*') |
| 1018 | 1018 | * to specify a generic fallback if no mapping is found for an extension. |
| 1019 | + * @param string $ext |
|
| 1019 | 1020 | * @return String Classname for a subclass of {@link File} |
| 1020 | 1021 | */ |
| 1021 | 1022 | public static function get_class_for_file_extension($ext) { |
@@ -1159,7 +1160,6 @@ discard block |
||
| 1159 | 1160 | * Note that the result will not have a leading slash, and should not be used |
| 1160 | 1161 | * with local file paths. |
| 1161 | 1162 | * |
| 1162 | - * @param string $part,... Parts |
|
| 1163 | 1163 | * @return string |
| 1164 | 1164 | */ |
| 1165 | 1165 | public static function join_paths($part = null) { |