@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * column. Can contain a relation name in dot notation, which will automatically join |
| 48 | 48 | * the necessary tables (e.g. "Comments.Name" to join the "Comments" has-many relationship and |
| 49 | 49 | * search the "Name" column when applying this filter to a SiteTree class). |
| 50 | - * @param mixed $value |
|
| 50 | + * @param boolean|string $value |
|
| 51 | 51 | * @param array $modifiers |
| 52 | 52 | */ |
| 53 | 53 | public function __construct($fullName, $value = false, array $modifiers = array()) { |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | /** |
| 288 | 288 | * Determines case sensitivity based on {@link getModifiers()}. |
| 289 | 289 | * |
| 290 | - * @return Mixed TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
| 290 | + * @return boolean|null TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
| 291 | 291 | */ |
| 292 | 292 | protected function getCaseSensitive() { |
| 293 | 293 | $modifiers = $this->getModifiers(); |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | * Combine the given forms into a formset with a tabbed interface |
| 466 | 466 | * |
| 467 | 467 | * @param array $forms List of LoginForm instances |
| 468 | - * @return string |
|
| 468 | + * @return HTMLText |
|
| 469 | 469 | */ |
| 470 | 470 | protected function generateLoginFormSet($forms) { |
| 471 | 471 | $viewData = new ArrayData(array( |
@@ -645,7 +645,6 @@ discard block |
||
| 645 | 645 | * - t: plaintext token |
| 646 | 646 | * |
| 647 | 647 | * @param Member $member Member object associated with this link. |
| 648 | - * @param string $autoLoginHash The auto login token. |
|
| 649 | 648 | */ |
| 650 | 649 | public static function getPasswordResetLink($member, $autologinToken) { |
| 651 | 650 | $autologinToken = urldecode($autologinToken); |
@@ -736,7 +735,7 @@ discard block |
||
| 736 | 735 | /** |
| 737 | 736 | * Factory method for the lost password form |
| 738 | 737 | * |
| 739 | - * @return Form Returns the lost password form |
|
| 738 | + * @return Security Returns the lost password form |
|
| 740 | 739 | */ |
| 741 | 740 | public function ChangePasswordForm() { |
| 742 | 741 | return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm'); |
@@ -746,7 +745,7 @@ discard block |
||
| 746 | 745 | * Gets the template for an include used for security. |
| 747 | 746 | * For use in any subclass. |
| 748 | 747 | * |
| 749 | - * @return string|array Returns the template(s) for rendering |
|
| 748 | + * @return string[] Returns the template(s) for rendering |
|
| 750 | 749 | */ |
| 751 | 750 | public function getIncludeTemplate($name) { |
| 752 | 751 | return array('Security_' . $name); |
@@ -920,7 +919,7 @@ discard block |
||
| 920 | 919 | * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead |
| 921 | 920 | * @param string $algorithm One of the available password encryption |
| 922 | 921 | * algorithms determined by {@link Security::get_encryption_algorithms()} |
| 923 | - * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 922 | + * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 924 | 923 | */ |
| 925 | 924 | public static function set_password_encryption_algorithm($algorithm) { |
| 926 | 925 | Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead'); |
@@ -1075,7 +1074,7 @@ discard block |
||
| 1075 | 1074 | /** |
| 1076 | 1075 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
| 1077 | 1076 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
| 1078 | - * @param $flag True or false |
|
| 1077 | + * @param boolean $flag True or false |
|
| 1079 | 1078 | */ |
| 1080 | 1079 | public static function set_ignore_disallowed_actions($flag) { |
| 1081 | 1080 | self::$ignore_disallowed_actions = $flag; |
@@ -304,6 +304,10 @@ |
||
| 304 | 304 | // Delete files in the default uploads directory that match the name pattern. |
| 305 | 305 | // @param String $namePattern A regular expression applied to files in the directory. If the name matches |
| 306 | 306 | // the pattern, it is deleted. Directories, . and .. are excluded. |
| 307 | + |
|
| 308 | + /** |
|
| 309 | + * @param string $namePattern |
|
| 310 | + */ |
|
| 307 | 311 | public function deleteTestUploadFiles($namePattern) { |
| 308 | 312 | $tmpFolder = ASSETS_PATH . "/" . Config::inst()->get('Upload', 'uploads_folder'); |
| 309 | 313 | $files = scandir($tmpFolder); |
@@ -5,10 +5,16 @@ |
||
| 5 | 5 | return parent::viewfile_getLocalFileByID($id); |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | + /** |
|
| 9 | + * @param string $fileUrl |
|
| 10 | + */ |
|
| 8 | 11 | public function viewfile_getLocalFileByURL($fileUrl) { |
| 9 | 12 | return parent::viewfile_getLocalFileByURL($fileUrl); |
| 10 | 13 | } |
| 11 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $fileUrl |
|
| 17 | + */ |
|
| 12 | 18 | public function viewfile_getRemoteFileByURL($fileUrl) { |
| 13 | 19 | return parent::viewfile_getRemoteFileByURL($fileUrl); |
| 14 | 20 | } |
@@ -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); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * Get the current failover object if set |
| 143 | 143 | * |
| 144 | - * @return ViewableData|null |
|
| 144 | + * @return ViewableData |
|
| 145 | 145 | */ |
| 146 | 146 | public function getFailover() { |
| 147 | 147 | return $this->failover; |
@@ -208,8 +208,6 @@ discard block |
||
| 208 | 208 | /** |
| 209 | 209 | * Method to facilitate deprecation of underscore-prefixed methods automatically being cached. |
| 210 | 210 | * |
| 211 | - * @param string $field |
|
| 212 | - * @param array $arguments |
|
| 213 | 211 | * @param string $identifier an optional custom cache identifier |
| 214 | 212 | * @return unknown |
| 215 | 213 | */ |
@@ -271,7 +269,7 @@ discard block |
||
| 271 | 269 | * - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)") |
| 272 | 270 | * |
| 273 | 271 | * @param string $field |
| 274 | - * @return array |
|
| 272 | + * @return string |
|
| 275 | 273 | */ |
| 276 | 274 | public function castingHelperPair($field) { |
| 277 | 275 | Deprecation::notice('2.5', 'use castingHelper() instead'); |
@@ -523,6 +521,7 @@ discard block |
||
| 523 | 521 | |
| 524 | 522 | /** |
| 525 | 523 | * Return the value of a field in an SQL-safe format. |
| 524 | + * @param string $field |
|
| 526 | 525 | */ |
| 527 | 526 | public function SQL_val($field, $arguments = null, $cache = true) { |
| 528 | 527 | return Convert::raw2sql($this->RAW_val($field, $arguments, $cache)); |
@@ -530,6 +529,7 @@ discard block |
||
| 530 | 529 | |
| 531 | 530 | /** |
| 532 | 531 | * Return the value of a field in a JavaScript-save format. |
| 532 | + * @param string $field |
|
| 533 | 533 | */ |
| 534 | 534 | public function JS_val($field, $arguments = null, $cache = true) { |
| 535 | 535 | return Convert::raw2js($this->RAW_val($field, $arguments, $cache)); |
@@ -537,6 +537,7 @@ discard block |
||
| 537 | 537 | |
| 538 | 538 | /** |
| 539 | 539 | * Return the value of a field escaped suitable to be inserted into an XML node attribute. |
| 540 | + * @param string $field |
|
| 540 | 541 | */ |
| 541 | 542 | public function ATT_val($field, $arguments = null, $cache = true) { |
| 542 | 543 | return Convert::raw2att($this->RAW_val($field, $arguments, $cache)); |
@@ -547,7 +548,6 @@ discard block |
||
| 547 | 548 | /** |
| 548 | 549 | * Get an array of XML-escaped values by field name |
| 549 | 550 | * |
| 550 | - * @param array $elements an array of field names |
|
| 551 | 551 | * @return array |
| 552 | 552 | */ |
| 553 | 553 | public function getXMLValues($fields) { |