@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @param string $name the field name |
| 78 | 78 | * @param string $title the field label |
| 79 | - * @param string|array $sourceObject The object-type to list in the tree. This could |
|
| 79 | + * @param string $sourceObject The object-type to list in the tree. This could |
|
| 80 | 80 | * be one of the following: |
| 81 | 81 | * - A DataObject class name with the {@link Hierarchy} extension. |
| 82 | 82 | * - An array of key/value pairs, like a {@link DropdownField} source. In |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | - * @return HTMLText |
|
| 207 | + * @return DBField |
|
| 208 | 208 | */ |
| 209 | 209 | public function Field($properties = array()) { |
| 210 | 210 | Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang'); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * If a filter function has been set, that will be called. And if search text is set, |
| 386 | 386 | * filter on that too. Return true if all applicable conditions are true, false otherwise. |
| 387 | 387 | * @param $node |
| 388 | - * @return unknown_type |
|
| 388 | + * @return boolean |
|
| 389 | 389 | */ |
| 390 | 390 | public function filterMarking($node) { |
| 391 | 391 | if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false; |
@@ -436,7 +436,6 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | /** |
| 439 | - * @param String $field |
|
| 440 | 439 | */ |
| 441 | 440 | public function setSourceObject($class) { |
| 442 | 441 | $this->sourceObject = $class; |
@@ -211,7 +211,6 @@ discard block |
||
| 211 | 211 | * @param string $title The field label. |
| 212 | 212 | * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on |
| 213 | 213 | * @link $record}, with the same name as the field name. |
| 214 | - * @param Form $form Reference to the container form |
|
| 215 | 214 | */ |
| 216 | 215 | public function __construct($name, $title = null, SS_List $items = null) { |
| 217 | 216 | |
@@ -1078,7 +1077,7 @@ discard block |
||
| 1078 | 1077 | |
| 1079 | 1078 | /** |
| 1080 | 1079 | * @param SS_HTTPRequest $request |
| 1081 | - * @return UploadField_ItemHandler |
|
| 1080 | + * @return UploadField_SelectHandler |
|
| 1082 | 1081 | */ |
| 1083 | 1082 | public function handleSelect(SS_HTTPRequest $request) { |
| 1084 | 1083 | if(!$this->canAttachExisting()) return $this->httpError(403); |
@@ -1434,7 +1433,7 @@ discard block |
||
| 1434 | 1433 | * Action to handle editing of a single file |
| 1435 | 1434 | * |
| 1436 | 1435 | * @param SS_HTTPRequest $request |
| 1437 | - * @return ViewableData_Customised |
|
| 1436 | + * @return DBField |
|
| 1438 | 1437 | */ |
| 1439 | 1438 | public function edit(SS_HTTPRequest $request) { |
| 1440 | 1439 | // Check form field state |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * @param array $properties |
| 79 | - * @return HTMLText |
|
| 79 | + * @return DBField |
|
| 80 | 80 | */ |
| 81 | 81 | public function Field($properties = array()) { |
| 82 | 82 | Requirements::css(FRAMEWORK_DIR . '/css/CheckboxSetField.css'); |
@@ -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 DBField |
|
| 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; |
@@ -112,6 +112,10 @@ discard block |
||
| 112 | 112 | )); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + /** |
|
| 116 | + * @param DBField $result |
|
| 117 | + * @param string[] $expected |
|
| 118 | + */ |
|
| 115 | 119 | private function assertExpectedStrings($result, $expected) { |
| 116 | 120 | foreach ($expected as $expectedStr) { |
| 117 | 121 | $this->assertTrue( |
@@ -718,6 +722,10 @@ discard block |
||
| 718 | 722 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 719 | 723 | } |
| 720 | 724 | |
| 725 | + /** |
|
| 726 | + * @param string $a |
|
| 727 | + * @param string $b |
|
| 728 | + */ |
|
| 721 | 729 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 722 | 730 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 723 | 731 | } |
@@ -1328,6 +1336,11 @@ discard block |
||
| 1328 | 1336 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
| 1329 | 1337 | Config::inst()->update('Director', 'environment_type', $origEnv); |
| 1330 | 1338 | } |
| 1339 | + |
|
| 1340 | + /** |
|
| 1341 | + * @param string $name |
|
| 1342 | + * @param string $expected |
|
| 1343 | + */ |
|
| 1331 | 1344 | private function _renderWithSourceFileComments($name, $expected) { |
| 1332 | 1345 | $viewer = new SSViewer(array($name)); |
| 1333 | 1346 | $data = new ArrayData(array()); |
@@ -338,7 +338,6 @@ discard block |
||
| 338 | 338 | /** |
| 339 | 339 | * Returns the modulus of the numerical position of the item in the data set. |
| 340 | 340 | * The count starts from $startIndex, which defaults to 1. |
| 341 | - * @param int $Mod The number to perform Mod operation to. |
|
| 342 | 341 | * @param int $startIndex Number to start count from. |
| 343 | 342 | * @return int |
| 344 | 343 | */ |
@@ -412,6 +411,10 @@ discard block |
||
| 412 | 411 | $this->underlay = $underlay ? $underlay : array(); |
| 413 | 412 | } |
| 414 | 413 | |
| 414 | + /** |
|
| 415 | + * @param string $interfaceToQuery |
|
| 416 | + * @param string $variableMethod |
|
| 417 | + */ |
|
| 415 | 418 | protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) { |
| 416 | 419 | $implementers = ClassInfo::implementorsOf($interfaceToQuery); |
| 417 | 420 | if($implementers) foreach($implementers as $implementer) { |
@@ -753,7 +756,7 @@ discard block |
||
| 753 | 756 | * |
| 754 | 757 | * @param $className string - valid class name |
| 755 | 758 | * @param $suffix string |
| 756 | - * @param $baseClass string |
|
| 759 | + * @param string $baseClass string |
|
| 757 | 760 | * |
| 758 | 761 | * @return array |
| 759 | 762 | */ |
@@ -1083,7 +1086,7 @@ discard block |
||
| 1083 | 1086 | * @param array|null $arguments - arguments to an included template |
| 1084 | 1087 | * @param Object $inheritedScope - the current scope of a parent template including a sub-template |
| 1085 | 1088 | * |
| 1086 | - * @return HTMLText Parsed template output. |
|
| 1089 | + * @return DBField Parsed template output. |
|
| 1087 | 1090 | */ |
| 1088 | 1091 | public function process($item, $arguments = null, $inheritedScope = null) { |
| 1089 | 1092 | SSViewer::$topLevel[] = $item; |
@@ -1158,7 +1161,7 @@ discard block |
||
| 1158 | 1161 | * @param string $template Template name |
| 1159 | 1162 | * @param mixed $data Data context |
| 1160 | 1163 | * @param array $arguments Additional arguments |
| 1161 | - * @return string Evaluated result |
|
| 1164 | + * @return DBField Evaluated result |
|
| 1162 | 1165 | */ |
| 1163 | 1166 | public static function execute_template($template, $data, $arguments = null, $scope = null) { |
| 1164 | 1167 | $v = new SSViewer($template); |
@@ -1184,6 +1187,9 @@ discard block |
||
| 1184 | 1187 | return $v->process($data, $arguments); |
| 1185 | 1188 | } |
| 1186 | 1189 | |
| 1190 | + /** |
|
| 1191 | + * @param string $content |
|
| 1192 | + */ |
|
| 1187 | 1193 | public function parseTemplateContent($content, $template="") { |
| 1188 | 1194 | return $this->getParser()->compileString( |
| 1189 | 1195 | $content, |
@@ -1212,7 +1218,7 @@ discard block |
||
| 1212 | 1218 | * Return an appropriate base tag for the given template. |
| 1213 | 1219 | * It will be closed on an XHTML document, and unclosed on an HTML document. |
| 1214 | 1220 | * |
| 1215 | - * @param $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1221 | + * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1216 | 1222 | * the DOCTYPE declaration. |
| 1217 | 1223 | */ |
| 1218 | 1224 | public static function get_base_tag($contentGeneratedSoFar) { |
@@ -1253,6 +1259,9 @@ discard block |
||
| 1253 | 1259 | */ |
| 1254 | 1260 | protected $cacheTemplate; |
| 1255 | 1261 | |
| 1262 | + /** |
|
| 1263 | + * @param string $content |
|
| 1264 | + */ |
|
| 1256 | 1265 | public function __construct($content, TemplateParser $parser = null) { |
| 1257 | 1266 | if ($parser) { |
| 1258 | 1267 | $this->setParser($parser); |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | ] |
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $root |
|
| 42 | + */ |
|
| 40 | 43 | public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) { |
| 41 | 44 | // Get root path |
| 42 | 45 | $root = $this->findRoot($root); |
@@ -117,7 +120,7 @@ discard block |
||
| 117 | 120 | * Render server configuration file from a template file |
| 118 | 121 | * |
| 119 | 122 | * @param string $template |
| 120 | - * @return \HTMLText Rendered results |
|
| 123 | + * @return string Rendered results |
|
| 121 | 124 | */ |
| 122 | 125 | protected function renderTemplate($template) { |
| 123 | 126 | // Build allowed extensions |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * Provide secure downloadable |
| 43 | 43 | * |
| 44 | 44 | * @param string $path |
| 45 | - * @return string|null |
|
| 45 | + * @return string |
|
| 46 | 46 | */ |
| 47 | 47 | public function getProtectedUrl($path) { |
| 48 | 48 | // Public URLs are handled via a request handler within /assets. |
@@ -21,6 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Create a new ValidationResult. |
| 23 | 23 | * By default, it is a successful result. Call $this->error() to record errors. |
| 24 | + * @param string $message |
|
| 24 | 25 | */ |
| 25 | 26 | public function __construct($valid = true, $message = null) { |
| 26 | 27 | $this->isValid = $valid; |