@@ -118,6 +118,11 @@ discard block |
||
| 118 | 118 | ); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | + /** |
|
| 122 | + * @param Requirements_Backend $backend |
|
| 123 | + * @param boolean $async |
|
| 124 | + * @param boolean $defer |
|
| 125 | + */ |
|
| 121 | 126 | protected function setupCombinedRequirementsJavascriptAsyncDefer($backend, $async, $defer) { |
| 122 | 127 | $basePath = $this->getCurrentRelativePath(); |
| 123 | 128 | $this->setupRequirements($backend); |
@@ -805,6 +810,10 @@ discard block |
||
| 805 | 810 | } |
| 806 | 811 | } |
| 807 | 812 | |
| 813 | + /** |
|
| 814 | + * @param Requirements_Backend $backend |
|
| 815 | + * @param string $type |
|
| 816 | + */ |
|
| 808 | 817 | public function assertFileNotIncluded($backend, $type, $files) { |
| 809 | 818 | $includedFiles = $this->getBackendFiles($backend, $type); |
| 810 | 819 | if(is_array($files)) { |
@@ -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); |
@@ -227,6 +227,7 @@ |
||
| 227 | 227 | * via the standard template inclusion process. |
| 228 | 228 | * |
| 229 | 229 | * @param string |
| 230 | + * @param string $template |
|
| 230 | 231 | */ |
| 231 | 232 | public function setTemplate($template) { |
| 232 | 233 | $this->template = $template; |
@@ -137,6 +137,7 @@ discard block |
||
| 137 | 137 | * {@inheritdoc} |
| 138 | 138 | * |
| 139 | 139 | * Also set the URLParams |
| 140 | + * @param SS_HTTPRequest $request |
|
| 140 | 141 | */ |
| 141 | 142 | public function setRequest($request) { |
| 142 | 143 | $return = parent::setRequest($request); |
@@ -513,7 +514,7 @@ discard block |
||
| 513 | 514 | * |
| 514 | 515 | * @param array $params |
| 515 | 516 | * |
| 516 | - * @return string |
|
| 517 | + * @return DBHTMLText |
|
| 517 | 518 | */ |
| 518 | 519 | public function render($params = null) { |
| 519 | 520 | $template = $this->getViewer($this->getAction()); |
@@ -678,7 +679,7 @@ discard block |
||
| 678 | 679 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
| 679 | 680 | * the URL redirected to. Otherwise, it will return null. |
| 680 | 681 | * |
| 681 | - * @return null|string |
|
| 682 | + * @return boolean |
|
| 682 | 683 | */ |
| 683 | 684 | public function redirectedTo() { |
| 684 | 685 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -470,11 +470,17 @@ discard block |
||
| 470 | 470 | |
| 471 | 471 | protected $extraConfigSources = array(); |
| 472 | 472 | |
| 473 | + /** |
|
| 474 | + * @param string $class |
|
| 475 | + */ |
|
| 473 | 476 | public function extraConfigSourcesChanged($class) { |
| 474 | 477 | unset($this->extraConfigSources[$class]); |
| 475 | 478 | $this->cache->clean("__{$class}"); |
| 476 | 479 | } |
| 477 | 480 | |
| 481 | + /** |
|
| 482 | + * @param integer $sourceOptions |
|
| 483 | + */ |
|
| 478 | 484 | protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) { |
| 479 | 485 | $tags[] = "__{$class}"; |
| 480 | 486 | $tags[] = "__{$class}__{$name}"; |
@@ -603,7 +609,7 @@ discard block |
||
| 603 | 609 | * replace the current array value, you'll need to call remove first. |
| 604 | 610 | * |
| 605 | 611 | * @param $class string - The class to update a configuration value for |
| 606 | - * @param $name string - The configuration property name to update |
|
| 612 | + * @param string $name string - The configuration property name to update |
|
| 607 | 613 | * @param $value any - The value to update with |
| 608 | 614 | * |
| 609 | 615 | * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value |
@@ -648,15 +654,6 @@ discard block |
||
| 648 | 654 | * |
| 649 | 655 | * @param string $class The class to remove a configuration value from |
| 650 | 656 | * @param string $name The configuration name |
| 651 | - * @param mixed $key An optional key to filter against. |
|
| 652 | - * If referenced config value is an array, only members of that array that match this key will be removed |
|
| 653 | - * Must also match value if provided to be removed |
|
| 654 | - * @param mixed $value And optional value to filter against. |
|
| 655 | - * If referenced config value is an array, only members of that array that match this value will be removed |
|
| 656 | - * If referenced config value is not an array, value will be removed only if it matches this argument |
|
| 657 | - * Must also match key if provided and referenced config value is an array to be removed |
|
| 658 | - * |
|
| 659 | - * Matching is always by "==", not by "===" |
|
| 660 | 657 | */ |
| 661 | 658 | public function remove($class, $name /*,$key = null*/ /*,$value = null*/) { |
| 662 | 659 | $argc = func_num_args(); |
@@ -735,6 +732,10 @@ discard block |
||
| 735 | 732 | $this->cache = $cloned; |
| 736 | 733 | } |
| 737 | 734 | |
| 735 | + /** |
|
| 736 | + * @param integer $key |
|
| 737 | + * @param integer $val |
|
| 738 | + */ |
|
| 738 | 739 | public function set($key, $val, $tags = array()) { |
| 739 | 740 | // Find an index to set at |
| 740 | 741 | $replacing = null; |
@@ -775,7 +776,7 @@ discard block |
||
| 775 | 776 | * For a more robust cache checking, use {@link checkAndGet()} |
| 776 | 777 | * |
| 777 | 778 | * @param string $key The cache key |
| 778 | - * @return variant Cached value, if hit. False otherwise |
|
| 779 | + * @return boolean Cached value, if hit. False otherwise |
|
| 779 | 780 | */ |
| 780 | 781 | public function get($key) { |
| 781 | 782 | list($hit, $result) = $this->checkAndGet($key); |
@@ -803,6 +804,9 @@ discard block |
||
| 803 | 804 | } |
| 804 | 805 | } |
| 805 | 806 | |
| 807 | + /** |
|
| 808 | + * @param string $tag |
|
| 809 | + */ |
|
| 806 | 810 | public function clean($tag = null) { |
| 807 | 811 | if ($tag) { |
| 808 | 812 | foreach ($this->cache as $i => $v) { |
@@ -841,6 +845,10 @@ discard block |
||
| 841 | 845 | $this->cache = array(); |
| 842 | 846 | } |
| 843 | 847 | |
| 848 | + /** |
|
| 849 | + * @param integer $key |
|
| 850 | + * @param integer $val |
|
| 851 | + */ |
|
| 844 | 852 | public function set($key, $val, $tags = array()) { |
| 845 | 853 | foreach($tags as $t) { |
| 846 | 854 | if(!isset($this->tags[$t])) { |
@@ -859,6 +867,11 @@ discard block |
||
| 859 | 867 | return $this->miss ? ($this->hit / $this->miss) : 0; |
| 860 | 868 | } |
| 861 | 869 | |
| 870 | + /** |
|
| 871 | + * @param integer $key |
|
| 872 | + * |
|
| 873 | + * @return boolean |
|
| 874 | + */ |
|
| 862 | 875 | public function get($key) { |
| 863 | 876 | list($hit, $result) = $this->checkAndGet($key); |
| 864 | 877 | return $hit ? $result : false; |
@@ -878,6 +891,9 @@ discard block |
||
| 878 | 891 | } |
| 879 | 892 | } |
| 880 | 893 | |
| 894 | + /** |
|
| 895 | + * @param string $tag |
|
| 896 | + */ |
|
| 881 | 897 | public function clean($tag = null) { |
| 882 | 898 | if($tag) { |
| 883 | 899 | if(isset($this->tags[$tag])) { |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | /** |
| 145 | 145 | * Get meta-data details on a named method |
| 146 | 146 | * |
| 147 | - * @param array $method |
|
| 147 | + * @param string $method |
|
| 148 | 148 | * @return array List of custom method details, if defined for this method |
| 149 | 149 | */ |
| 150 | 150 | protected function getExtraMethodConfig($method) { |
@@ -39,6 +39,9 @@ discard block |
||
| 39 | 39 | ] |
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $root |
|
| 44 | + */ |
|
| 42 | 45 | public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) { |
| 43 | 46 | // Get root path |
| 44 | 47 | $root = $this->findRoot($root); |
@@ -119,7 +122,7 @@ discard block |
||
| 119 | 122 | * Render server configuration file from a template file |
| 120 | 123 | * |
| 121 | 124 | * @param string $template |
| 122 | - * @return DBHTMLText Rendered results |
|
| 125 | + * @return string Rendered results |
|
| 123 | 126 | */ |
| 124 | 127 | protected function renderTemplate($template) { |
| 125 | 128 | // Build allowed extensions |
@@ -494,7 +494,7 @@ |
||
| 494 | 494 | * |
| 495 | 495 | * @param DataObjectInterface $record |
| 496 | 496 | * |
| 497 | - * @return boolean |
|
| 497 | + * @return false|null |
|
| 498 | 498 | */ |
| 499 | 499 | public function saveInto(DataObjectInterface $record) { |
| 500 | 500 | if(!$this->isSaveable()) { |