@@ -51,6 +51,9 @@ discard block |
||
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param Requirements_Backend $backend |
|
| 56 | + */ |
|
| 54 | 57 | protected function setupCombinedRequirements($backend) { |
| 55 | 58 | $basePath = $this->getCurrentRelativePath(); |
| 56 | 59 | |
@@ -76,6 +79,9 @@ discard block |
||
| 76 | 79 | ); |
| 77 | 80 | } |
| 78 | 81 | |
| 82 | + /** |
|
| 83 | + * @param Requirements_Backend $backend |
|
| 84 | + */ |
|
| 79 | 85 | protected function setupCombinedNonrequiredRequirements($backend) { |
| 80 | 86 | $basePath = $this->getCurrentRelativePath(); |
| 81 | 87 | |
@@ -452,6 +458,10 @@ discard block |
||
| 452 | 458 | $this->assertNotRegexp('/RequirementsTest_b\.css\?m=[\d]*&foo=bar&bla=blubb"/', $html); |
| 453 | 459 | } |
| 454 | 460 | |
| 461 | + /** |
|
| 462 | + * @param Requirements_Backend $backend |
|
| 463 | + * @param string $type |
|
| 464 | + */ |
|
| 455 | 465 | public function assertFileIncluded($backend, $type, $files) { |
| 456 | 466 | $type = strtolower($type); |
| 457 | 467 | switch (strtolower($type)) { |
@@ -496,6 +506,10 @@ discard block |
||
| 496 | 506 | } |
| 497 | 507 | } |
| 498 | 508 | |
| 509 | + /** |
|
| 510 | + * @param Requirements_Backend $backend |
|
| 511 | + * @param string $type |
|
| 512 | + */ |
|
| 499 | 513 | public function assertFileNotIncluded($backend, $type, $files) { |
| 500 | 514 | $type = strtolower($type); |
| 501 | 515 | switch ($type) { |
@@ -119,6 +119,10 @@ discard block |
||
| 119 | 119 | )); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | + /** |
|
| 123 | + * @param HTMLText $result |
|
| 124 | + * @param string[] $expected |
|
| 125 | + */ |
|
| 122 | 126 | private function assertExpectedStrings($result, $expected) { |
| 123 | 127 | foreach ($expected as $expectedStr) { |
| 124 | 128 | $this->assertTrue( |
@@ -739,6 +743,10 @@ discard block |
||
| 739 | 743 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 740 | 744 | } |
| 741 | 745 | |
| 746 | + /** |
|
| 747 | + * @param string $a |
|
| 748 | + * @param string $b |
|
| 749 | + */ |
|
| 742 | 750 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 743 | 751 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 744 | 752 | } |
@@ -1353,6 +1361,11 @@ discard block |
||
| 1353 | 1361 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
| 1354 | 1362 | Config::inst()->update('Director', 'environment_type', $origEnv); |
| 1355 | 1363 | } |
| 1364 | + |
|
| 1365 | + /** |
|
| 1366 | + * @param string $name |
|
| 1367 | + * @param string $expected |
|
| 1368 | + */ |
|
| 1356 | 1369 | private function _renderWithSourceFileComments($name, $expected) { |
| 1357 | 1370 | $viewer = new SSViewer(array($name)); |
| 1358 | 1371 | $data = new ArrayData(array()); |
@@ -49,6 +49,7 @@ discard block |
||
| 49 | 49 | * while automatically busting this cache every time the file is changed. |
| 50 | 50 | * |
| 51 | 51 | * @param bool |
| 52 | + * @param boolean $var |
|
| 52 | 53 | */ |
| 53 | 54 | public static function set_suffix_requirements($var) { |
| 54 | 55 | self::backend()->set_suffix_requirements($var); |
@@ -109,7 +110,7 @@ discard block |
||
| 109 | 110 | /** |
| 110 | 111 | * Return all registered custom scripts |
| 111 | 112 | * |
| 112 | - * @return array |
|
| 113 | + * @return string |
|
| 113 | 114 | */ |
| 114 | 115 | public static function get_custom_scripts() { |
| 115 | 116 | return self::backend()->get_custom_scripts(); |
@@ -517,7 +518,7 @@ discard block |
||
| 517 | 518 | /** |
| 518 | 519 | * Enable or disable the combination of CSS and JavaScript files |
| 519 | 520 | * |
| 520 | - * @param $enable |
|
| 521 | + * @param boolean $enable |
|
| 521 | 522 | */ |
| 522 | 523 | public function set_combined_files_enabled($enable) { |
| 523 | 524 | $this->combined_files_enabled = (bool) $enable; |
@@ -585,6 +586,7 @@ discard block |
||
| 585 | 586 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
| 586 | 587 | * |
| 587 | 588 | * @param bool |
| 589 | + * @param boolean $var |
|
| 588 | 590 | */ |
| 589 | 591 | public function set_force_js_to_bottom($var) { |
| 590 | 592 | $this->force_js_to_bottom = $var; |
@@ -624,7 +626,7 @@ discard block |
||
| 624 | 626 | /** |
| 625 | 627 | * Return all registered custom scripts |
| 626 | 628 | * |
| 627 | - * @return array |
|
| 629 | + * @return string |
|
| 628 | 630 | */ |
| 629 | 631 | public function get_custom_scripts() { |
| 630 | 632 | $requirements = ""; |
@@ -1037,7 +1039,7 @@ discard block |
||
| 1037 | 1039 | * @param array $files Array of filenames relative to docroot |
| 1038 | 1040 | * @param string $media |
| 1039 | 1041 | * |
| 1040 | - * @return bool|void |
|
| 1042 | + * @return false|null |
|
| 1041 | 1043 | */ |
| 1042 | 1044 | public function combine_files($combinedFileName, $files, $media = null) { |
| 1043 | 1045 | // duplicate check |
@@ -336,7 +336,6 @@ discard block |
||
| 336 | 336 | /** |
| 337 | 337 | * Returns the modulus of the numerical position of the item in the data set. |
| 338 | 338 | * The count starts from $startIndex, which defaults to 1. |
| 339 | - * @param int $Mod The number to perform Mod operation to. |
|
| 340 | 339 | * @param int $startIndex Number to start count from. |
| 341 | 340 | * @return int |
| 342 | 341 | */ |
@@ -410,6 +409,10 @@ discard block |
||
| 410 | 409 | $this->underlay = $underlay ? $underlay : array(); |
| 411 | 410 | } |
| 412 | 411 | |
| 412 | + /** |
|
| 413 | + * @param string $interfaceToQuery |
|
| 414 | + * @param string $variableMethod |
|
| 415 | + */ |
|
| 413 | 416 | protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) { |
| 414 | 417 | $implementers = ClassInfo::implementorsOf($interfaceToQuery); |
| 415 | 418 | if($implementers) foreach($implementers as $implementer) { |
@@ -751,7 +754,7 @@ discard block |
||
| 751 | 754 | * |
| 752 | 755 | * @param $className string - valid class name |
| 753 | 756 | * @param $suffix string |
| 754 | - * @param $baseClass string |
|
| 757 | + * @param string $baseClass string |
|
| 755 | 758 | * |
| 756 | 759 | * @return array |
| 757 | 760 | */ |
@@ -1156,7 +1159,7 @@ discard block |
||
| 1156 | 1159 | * @param string $template Template name |
| 1157 | 1160 | * @param mixed $data Data context |
| 1158 | 1161 | * @param array $arguments Additional arguments |
| 1159 | - * @return string Evaluated result |
|
| 1162 | + * @return HTMLText Evaluated result |
|
| 1160 | 1163 | */ |
| 1161 | 1164 | public static function execute_template($template, $data, $arguments = null, $scope = null) { |
| 1162 | 1165 | $v = new SSViewer($template); |
@@ -1182,6 +1185,9 @@ discard block |
||
| 1182 | 1185 | return $v->process($data, $arguments); |
| 1183 | 1186 | } |
| 1184 | 1187 | |
| 1188 | + /** |
|
| 1189 | + * @param string $content |
|
| 1190 | + */ |
|
| 1185 | 1191 | public function parseTemplateContent($content, $template="") { |
| 1186 | 1192 | return $this->getParser()->compileString( |
| 1187 | 1193 | $content, |
@@ -1210,7 +1216,7 @@ discard block |
||
| 1210 | 1216 | * Return an appropriate base tag for the given template. |
| 1211 | 1217 | * It will be closed on an XHTML document, and unclosed on an HTML document. |
| 1212 | 1218 | * |
| 1213 | - * @param $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1219 | + * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1214 | 1220 | * the DOCTYPE declaration. |
| 1215 | 1221 | */ |
| 1216 | 1222 | public static function get_base_tag($contentGeneratedSoFar) { |
@@ -1251,6 +1257,9 @@ discard block |
||
| 1251 | 1257 | */ |
| 1252 | 1258 | protected $cacheTemplate; |
| 1253 | 1259 | |
| 1260 | + /** |
|
| 1261 | + * @param string $content |
|
| 1262 | + */ |
|
| 1254 | 1263 | public function __construct($content, TemplateParser $parser = null) { |
| 1255 | 1264 | if ($parser) { |
| 1256 | 1265 | $this->setParser($parser); |
@@ -189,8 +189,6 @@ discard block |
||
| 189 | 189 | /** |
| 190 | 190 | * Method to facilitate deprecation of underscore-prefixed methods automatically being cached. |
| 191 | 191 | * |
| 192 | - * @param string $field |
|
| 193 | - * @param array $arguments |
|
| 194 | 192 | * @param string $identifier an optional custom cache identifier |
| 195 | 193 | * @return unknown |
| 196 | 194 | */ |
@@ -252,7 +250,7 @@ discard block |
||
| 252 | 250 | * - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)") |
| 253 | 251 | * |
| 254 | 252 | * @param string $field |
| 255 | - * @return array |
|
| 253 | + * @return string |
|
| 256 | 254 | */ |
| 257 | 255 | public function castingHelperPair($field) { |
| 258 | 256 | Deprecation::notice('2.5', 'use castingHelper() instead'); |
@@ -504,6 +502,7 @@ discard block |
||
| 504 | 502 | |
| 505 | 503 | /** |
| 506 | 504 | * Return the value of a field in an SQL-safe format. |
| 505 | + * @param string $field |
|
| 507 | 506 | */ |
| 508 | 507 | public function SQL_val($field, $arguments = null, $cache = true) { |
| 509 | 508 | return Convert::raw2sql($this->RAW_val($field, $arguments, $cache)); |
@@ -511,6 +510,7 @@ discard block |
||
| 511 | 510 | |
| 512 | 511 | /** |
| 513 | 512 | * Return the value of a field in a JavaScript-save format. |
| 513 | + * @param string $field |
|
| 514 | 514 | */ |
| 515 | 515 | public function JS_val($field, $arguments = null, $cache = true) { |
| 516 | 516 | return Convert::raw2js($this->RAW_val($field, $arguments, $cache)); |
@@ -518,6 +518,7 @@ discard block |
||
| 518 | 518 | |
| 519 | 519 | /** |
| 520 | 520 | * Return the value of a field escaped suitable to be inserted into an XML node attribute. |
| 521 | + * @param string $field |
|
| 521 | 522 | */ |
| 522 | 523 | public function ATT_val($field, $arguments = null, $cache = true) { |
| 523 | 524 | return Convert::raw2att($this->RAW_val($field, $arguments, $cache)); |
@@ -528,7 +529,6 @@ discard block |
||
| 528 | 529 | /** |
| 529 | 530 | * Get an array of XML-escaped values by field name |
| 530 | 531 | * |
| 531 | - * @param array $elements an array of field names |
|
| 532 | 532 | * @return array |
| 533 | 533 | */ |
| 534 | 534 | public function getXMLValues($fields) { |
@@ -44,6 +44,7 @@ discard block |
||
| 44 | 44 | * Create a new DataQuery. |
| 45 | 45 | * |
| 46 | 46 | * @param String The name of the DataObject class that you wish to query |
| 47 | + * @param string $dataClass |
|
| 47 | 48 | */ |
| 48 | 49 | public function __construct($dataClass) { |
| 49 | 50 | $this->dataClass = $dataClass; |
@@ -166,7 +167,7 @@ discard block |
||
| 166 | 167 | /** |
| 167 | 168 | * Ensure that the query is ready to execute. |
| 168 | 169 | * |
| 169 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 170 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 170 | 171 | * @return SQLSelect The finalised sql query |
| 171 | 172 | */ |
| 172 | 173 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -641,7 +642,7 @@ discard block |
||
| 641 | 642 | * mappings to the query object state. This has to be called |
| 642 | 643 | * in any overloaded {@link SearchFilter->apply()} methods manually. |
| 643 | 644 | * |
| 644 | - * @param String|array $relation The array/dot-syntax relation to follow |
|
| 645 | + * @param string $relation The array/dot-syntax relation to follow |
|
| 645 | 646 | * @param bool $linearOnly Set to true to restrict to linear relations only. Set this |
| 646 | 647 | * if this relation will be used for sorting, and should not include duplicate rows. |
| 647 | 648 | * @return The model class of the related item |
@@ -917,6 +918,7 @@ discard block |
||
| 917 | 918 | |
| 918 | 919 | /** |
| 919 | 920 | * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query. |
| 921 | + * @param string $key |
|
| 920 | 922 | */ |
| 921 | 923 | public function getQueryParam($key) { |
| 922 | 924 | if(isset($this->queryParams[$key])) return $this->queryParams[$key]; |
@@ -949,6 +951,9 @@ discard block |
||
| 949 | 951 | */ |
| 950 | 952 | protected $whereQuery; |
| 951 | 953 | |
| 954 | + /** |
|
| 955 | + * @param string $connective |
|
| 956 | + */ |
|
| 952 | 957 | public function __construct(DataQuery $base, $connective) { |
| 953 | 958 | $this->dataClass = $base->dataClass; |
| 954 | 959 | $this->query = $base->query; |
@@ -958,6 +963,9 @@ discard block |
||
| 958 | 963 | $base->where($this); |
| 959 | 964 | } |
| 960 | 965 | |
| 966 | + /** |
|
| 967 | + * @param string $filter |
|
| 968 | + */ |
|
| 961 | 969 | public function where($filter) { |
| 962 | 970 | if($filter) { |
| 963 | 971 | $this->whereQuery->addWhere($filter); |
@@ -608,6 +608,11 @@ |
||
| 608 | 608 | 'ObjectTest_Extending_Extension' |
| 609 | 609 | ); |
| 610 | 610 | |
| 611 | + /** |
|
| 612 | + * @param integer $first |
|
| 613 | + * @param integer $second |
|
| 614 | + * @param integer $third |
|
| 615 | + */ |
|
| 611 | 616 | public function getResults(&$first, &$second, &$third) { |
| 612 | 617 | // Before extending should be invoked second |
| 613 | 618 | $this->beforeExtending('updateResult', function(&$first, &$second, &$third) { |
@@ -192,7 +192,7 @@ |
||
| 192 | 192 | * |
| 193 | 193 | * @todo refactor this into GridFieldComponent |
| 194 | 194 | * |
| 195 | - * @param mixed $value |
|
| 195 | + * @param string $value |
|
| 196 | 196 | * @param string|array $castingDefinition |
| 197 | 197 | * |
| 198 | 198 | * @return mixed |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @param string $name The internal field name, passed to forms. |
| 47 | 47 | * @param string $title The human-readable field label. |
| 48 | - * @param mixed $value The value of the field. |
|
| 48 | + * @param integer $value The value of the field. |
|
| 49 | 49 | * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. |
| 50 | 50 | */ |
| 51 | 51 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -169,6 +169,10 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | protected $controller, $name; |
| 171 | 171 | |
| 172 | + /** |
|
| 173 | + * @param Controller|null $controller |
|
| 174 | + * @param string $name |
|
| 175 | + */ |
|
| 172 | 176 | public function __construct($controller, $name) { |
| 173 | 177 | parent::__construct(); |
| 174 | 178 | |
@@ -197,7 +201,7 @@ discard block |
||
| 197 | 201 | /** |
| 198 | 202 | * Searches the SiteTree for display in the dropdown |
| 199 | 203 | * |
| 200 | - * @return callback |
|
| 204 | + * @return DataList |
|
| 201 | 205 | */ |
| 202 | 206 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
| 203 | 207 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -563,7 +567,7 @@ discard block |
||
| 563 | 567 | /** |
| 564 | 568 | * Find all anchors available on the given page. |
| 565 | 569 | * |
| 566 | - * @return array |
|
| 570 | + * @return string |
|
| 567 | 571 | */ |
| 568 | 572 | public function getanchors() { |
| 569 | 573 | $id = (int)$this->getRequest()->getVar('PageID'); |
@@ -607,6 +611,7 @@ discard block |
||
| 607 | 611 | * not the "master record" in the database - hence there's no form or saving logic. |
| 608 | 612 | * |
| 609 | 613 | * @param String Relative or absolute URL to file |
| 614 | + * @param HtmlEditorField_File $file |
|
| 610 | 615 | * @return FieldList |
| 611 | 616 | */ |
| 612 | 617 | protected function getFieldsForFile($url, $file) { |
@@ -628,6 +633,7 @@ discard block |
||
| 628 | 633 | } |
| 629 | 634 | |
| 630 | 635 | /** |
| 636 | + * @param HtmlEditorField_Embed $file |
|
| 631 | 637 | * @return FieldList |
| 632 | 638 | */ |
| 633 | 639 | protected function getFieldsForOembed($url, $file) { |
@@ -837,6 +843,7 @@ discard block |
||
| 837 | 843 | |
| 838 | 844 | /** |
| 839 | 845 | * @param Int |
| 846 | + * @param integer $parentID |
|
| 840 | 847 | * @return DataList |
| 841 | 848 | */ |
| 842 | 849 | protected function getFiles($parentID = null) { |