@@ -260,6 +260,9 @@ discard block |
||
| 260 | 260 | return $this; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | + /** |
|
| 264 | + * @param string $type |
|
| 265 | + */ |
|
| 263 | 266 | protected function invokeCallbacks($type, $args = array()) { |
| 264 | 267 | foreach($this->callbacks[$type] as $callback) { |
| 265 | 268 | call_user_func_array($callback, $args); |
@@ -299,6 +302,9 @@ discard block |
||
| 299 | 302 | $obj->$name = $this->parseValue($value, $fixtures); |
| 300 | 303 | } |
| 301 | 304 | |
| 305 | + /** |
|
| 306 | + * @param string $fieldName |
|
| 307 | + */ |
|
| 302 | 308 | protected function overrideField($obj, $fieldName, $value, $fixtures = null) { |
| 303 | 309 | $class = get_class($obj); |
| 304 | 310 | $table = DataObject::getSchema()->tableForField($class, $fieldName); |
@@ -223,6 +223,7 @@ |
||
| 223 | 223 | * via the standard template inclusion process. |
| 224 | 224 | * |
| 225 | 225 | * @param string |
| 226 | + * @param string $template |
|
| 226 | 227 | */ |
| 227 | 228 | public function setTemplate($template) { |
| 228 | 229 | $this->template = $template; |
@@ -133,6 +133,7 @@ discard block |
||
| 133 | 133 | * {@inheritdoc} |
| 134 | 134 | * |
| 135 | 135 | * Also set the URLParams |
| 136 | + * @param SS_HTTPRequest $request |
|
| 136 | 137 | */ |
| 137 | 138 | public function setRequest($request) { |
| 138 | 139 | $return = parent::setRequest($request); |
@@ -509,7 +510,7 @@ discard block |
||
| 509 | 510 | * |
| 510 | 511 | * @param array $params |
| 511 | 512 | * |
| 512 | - * @return string |
|
| 513 | + * @return DBHTMLText |
|
| 513 | 514 | */ |
| 514 | 515 | public function render($params = null) { |
| 515 | 516 | $template = $this->getViewer($this->getAction()); |
@@ -674,7 +675,7 @@ discard block |
||
| 674 | 675 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
| 675 | 676 | * the URL redirected to. Otherwise, it will return null. |
| 676 | 677 | * |
| 677 | - * @return null|string |
|
| 678 | + * @return boolean |
|
| 678 | 679 | */ |
| 679 | 680 | public function redirectedTo() { |
| 680 | 681 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -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) { |
@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | ] |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $root |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) { |
| 42 | 45 | // Get root path |
| 43 | 46 | $root = $this->findRoot($root); |
@@ -118,7 +121,7 @@ discard block |
||
| 118 | 121 | * Render server configuration file from a template file |
| 119 | 122 | * |
| 120 | 123 | * @param string $template |
| 121 | - * @return DBHTMLText Rendered results |
|
| 124 | + * @return string Rendered results |
|
| 122 | 125 | */ |
| 123 | 126 | protected function renderTemplate($template) { |
| 124 | 127 | // Build allowed extensions |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * Which columns are handled by this component |
| 56 | 56 | * |
| 57 | 57 | * @param GridField $gridField |
| 58 | - * @return array |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public function getColumnsHandled($gridField) { |
| 61 | 61 | return array('Actions'); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param DataObject $record |
| 77 | 77 | * @param string $columnName |
| 78 | 78 | * |
| 79 | - * @return string - the HTML for the column |
|
| 79 | + * @return DBHTMLText - the HTML for the column |
|
| 80 | 80 | */ |
| 81 | 81 | public function getColumnContent($gridField, $record, $columnName) { |
| 82 | 82 | // No permission checks, handled through GridFieldDetailForm, |
@@ -123,6 +123,10 @@ discard block |
||
| 123 | 123 | )); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param DBHTMLText $result |
|
| 128 | + * @param string[] $expected |
|
| 129 | + */ |
|
| 126 | 130 | private function assertExpectedStrings($result, $expected) { |
| 127 | 131 | foreach ($expected as $expectedStr) { |
| 128 | 132 | $this->assertTrue( |
@@ -756,6 +760,10 @@ discard block |
||
| 756 | 760 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 757 | 761 | } |
| 758 | 762 | |
| 763 | + /** |
|
| 764 | + * @param string $a |
|
| 765 | + * @param string $b |
|
| 766 | + */ |
|
| 759 | 767 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 760 | 768 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 761 | 769 | } |
@@ -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()); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * |
| 212 | 212 | * @todo Mix in custom column mappings |
| 213 | 213 | * |
| 214 | - * @return array |
|
| 214 | + * @return string |
|
| 215 | 215 | **/ |
| 216 | 216 | public function getImportSpec() { |
| 217 | 217 | $spec = array(); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * so this is mainly a customization method. |
| 238 | 238 | * |
| 239 | 239 | * @param mixed $val |
| 240 | - * @param string $field Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 240 | + * @param string $fieldName Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 241 | 241 | * @return boolean |
| 242 | 242 | */ |
| 243 | 243 | protected function isNullValue($val, $fieldName = null) { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | 363 | * @param $obj DataObject |
| 364 | - * @param $message string |
|
| 364 | + * @param string $message string |
|
| 365 | 365 | */ |
| 366 | 366 | public function addCreated($obj, $message = null) { |
| 367 | 367 | $this->created[] = $this->lastChange = array( |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | /** |
| 376 | 376 | * @param $obj DataObject |
| 377 | - * @param $message string |
|
| 377 | + * @param string $message string |
|
| 378 | 378 | */ |
| 379 | 379 | public function addUpdated($obj, $message = null) { |
| 380 | 380 | $this->updated[] = $this->lastChange = array( |
@@ -386,8 +386,8 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
| 389 | - * @param $obj DataObject |
|
| 390 | - * @param $message string |
|
| 389 | + * @param DataObject|null $obj DataObject |
|
| 390 | + * @param string $message string |
|
| 391 | 391 | */ |
| 392 | 392 | public function addDeleted($obj, $message = null) { |
| 393 | 393 | $data = $obj->toMap(); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @param array|string $val String to escape, or array of strings |
| 52 | 52 | * |
| 53 | - * @return array|string |
|
| 53 | + * @return string |
|
| 54 | 54 | */ |
| 55 | 55 | public static function raw2htmlname($val) { |
| 56 | 56 | if(is_array($val)) { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * table, or column name. Supports encoding of multi identfiers separated by |
| 177 | 177 | * a delimiter (e.g. ".") |
| 178 | 178 | * |
| 179 | - * @param string|array $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers |
|
| 179 | + * @param string $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers |
|
| 180 | 180 | * to be joined via the separator. |
| 181 | 181 | * @param string $separator The string that delimits subsequent identifiers |
| 182 | 182 | * @return string The escaped identifier. E.g. '"SiteTree"."Title"' |
@@ -257,6 +257,7 @@ discard block |
||
| 257 | 257 | * call this function directly, Please use {@link Convert::xml2array()} |
| 258 | 258 | * |
| 259 | 259 | * @param SimpleXMLElement |
| 260 | + * @param SimpleXMLElement $xml |
|
| 260 | 261 | * |
| 261 | 262 | * @return mixed |
| 262 | 263 | */ |
@@ -450,7 +451,7 @@ discard block |
||
| 450 | 451 | * - IDField => idField |
| 451 | 452 | * - iDField => iDField |
| 452 | 453 | * |
| 453 | - * @param $str |
|
| 454 | + * @param string $str |
|
| 454 | 455 | * @return string |
| 455 | 456 | */ |
| 456 | 457 | public static function upperCamelToLowerCamel($str) { |