@@ -192,6 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | /** |
194 | 194 | * @param String |
195 | + * @param string $class |
|
195 | 196 | */ |
196 | 197 | public function setItemRequestClass($class) { |
197 | 198 | $this->itemRequestClass = $class; |
@@ -299,6 +300,9 @@ discard block |
||
299 | 300 | parent::__construct(); |
300 | 301 | } |
301 | 302 | |
303 | + /** |
|
304 | + * @param string $action |
|
305 | + */ |
|
302 | 306 | public function Link($action = null) { |
303 | 307 | return Controller::join_links($this->gridField->Link('item'), |
304 | 308 | $this->record->ID ? $this->record->ID : 'new', $action); |
@@ -524,6 +528,9 @@ discard block |
||
524 | 528 | return $c; |
525 | 529 | } |
526 | 530 | |
531 | + /** |
|
532 | + * @return string |
|
533 | + */ |
|
527 | 534 | protected function getBackLink(){ |
528 | 535 | // TODO Coupling with CMS |
529 | 536 | $backlink = ''; |
@@ -625,6 +632,9 @@ discard block |
||
625 | 632 | } |
626 | 633 | } |
627 | 634 | |
635 | + /** |
|
636 | + * @param integer $errorCode |
|
637 | + */ |
|
628 | 638 | public function httpError($errorCode, $errorMessage = null) { |
629 | 639 | $controller = $this->getToplevelController(); |
630 | 640 | return $controller->httpError($errorCode, $errorMessage); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param string $name the field name |
82 | 82 | * @param string $title the field label |
83 | - * @param string|array $sourceObject The object-type to list in the tree. This could |
|
83 | + * @param string $sourceObject The object-type to list in the tree. This could |
|
84 | 84 | * be one of the following: |
85 | 85 | * - A DataObject class name with the {@link Hierarchy} extension. |
86 | 86 | * - An array of key/value pairs, like a {@link DropdownField} source. In |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
211 | - * @return HTMLText |
|
211 | + * @return DBField |
|
212 | 212 | */ |
213 | 213 | public function Field($properties = array()) { |
214 | 214 | Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang'); |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | /** |
263 | 263 | * Get the whole tree of a part of the tree via an AJAX request. |
264 | 264 | * |
265 | - * @param SS_HTTPRequest $request |
|
265 | + * @param HTTPRequest $request |
|
266 | 266 | * @return string |
267 | 267 | */ |
268 | 268 | public function tree(HTTPRequest $request) { |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | * If a filter function has been set, that will be called. And if search text is set, |
390 | 390 | * filter on that too. Return true if all applicable conditions are true, false otherwise. |
391 | 391 | * @param $node |
392 | - * @return unknown_type |
|
392 | + * @return boolean |
|
393 | 393 | */ |
394 | 394 | public function filterMarking($node) { |
395 | 395 | if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false; |
@@ -440,7 +440,6 @@ discard block |
||
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
443 | - * @param String $field |
|
444 | 443 | */ |
445 | 444 | public function setSourceObject($class) { |
446 | 445 | $this->sourceObject = $class; |
@@ -1066,7 +1066,7 @@ discard block |
||
1066 | 1066 | /** |
1067 | 1067 | * Find objects in the given relationships, merging them into the given list |
1068 | 1068 | * |
1069 | - * @param array $source Config property to extract relationships from |
|
1069 | + * @param string $source Config property to extract relationships from |
|
1070 | 1070 | * @param bool $recursive True if recursive |
1071 | 1071 | * @param ArrayList $list Optional list to add items to |
1072 | 1072 | * @return ArrayList The list |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | /** |
1187 | 1187 | * Check if the current user can delete this record from live |
1188 | 1188 | * |
1189 | - * @param null $member |
|
1189 | + * @param Member|null $member |
|
1190 | 1190 | * @return mixed |
1191 | 1191 | */ |
1192 | 1192 | public function canUnpublish($member = null) { |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | * If extended, ensure that both canDelete and canUnpublish are extended also |
1220 | 1220 | * |
1221 | 1221 | * @param Member $member |
1222 | - * @return bool |
|
1222 | + * @return null|boolean |
|
1223 | 1223 | */ |
1224 | 1224 | public function canArchive($member = null) { |
1225 | 1225 | // Skip if invoked by extendedCan() |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | * Extend permissions to include additional security for objects that are not published to live. |
1297 | 1297 | * |
1298 | 1298 | * @param Member $member |
1299 | - * @return bool|null |
|
1299 | + * @return false|null |
|
1300 | 1300 | */ |
1301 | 1301 | public function canView($member = null) { |
1302 | 1302 | // Invoke default version-gnostic canView |
@@ -1918,7 +1918,7 @@ discard block |
||
1918 | 1918 | /** |
1919 | 1919 | * Determine if the current user is able to set the given site stage / archive |
1920 | 1920 | * |
1921 | - * @param SS_HTTPRequest $request |
|
1921 | + * @param SilverStripe\Control\HTTPRequest $request |
|
1922 | 1922 | * @return bool |
1923 | 1923 | */ |
1924 | 1924 | public static function can_choose_site_stage($request) { |
@@ -2422,7 +2422,7 @@ discard block |
||
2422 | 2422 | /** |
2423 | 2423 | * Returns an array of possible stages. |
2424 | 2424 | * |
2425 | - * @return array |
|
2425 | + * @return string[] |
|
2426 | 2426 | */ |
2427 | 2427 | public function getVersionedStages() { |
2428 | 2428 | if($this->hasStages()) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * Constructor |
15 | 15 | * |
16 | - * @param Controller $controller The parent controller, necessary to |
|
16 | + * @param Controller|null $controller The parent controller, necessary to |
|
17 | 17 | * create the appropriate form action tag. |
18 | 18 | * @param string $name The method on the controller that will return this |
19 | 19 | * form object. |
@@ -188,7 +188,7 @@ |
||
188 | 188 | * |
189 | 189 | * @param int $code HTTP code |
190 | 190 | * @param string $body Body expected for 200 responses |
191 | - * @param SS_HTTPResponse $response |
|
191 | + * @param HTTPResponse $response |
|
192 | 192 | */ |
193 | 193 | protected function assertResponseEquals($code, $body, HTTPResponse $response) { |
194 | 194 | $this->assertEquals($code, $response->getStatusCode()); |
@@ -68,6 +68,7 @@ discard block |
||
68 | 68 | * while automatically busting this cache every time the file is changed. |
69 | 69 | * |
70 | 70 | * @param bool |
71 | + * @param boolean $var |
|
71 | 72 | */ |
72 | 73 | public static function set_suffix_requirements($var) { |
73 | 74 | self::backend()->setSuffixRequirements($var); |
@@ -276,7 +277,7 @@ discard block |
||
276 | 277 | * Attach requirements inclusion to X-Include-JS and X-Include-CSS headers on the given |
277 | 278 | * HTTP Response |
278 | 279 | * |
279 | - * @param SS_HTTPResponse $response |
|
280 | + * @param HTTPResponse $response |
|
280 | 281 | */ |
281 | 282 | public static function include_in_response(HTTPResponse $response) { |
282 | 283 | self::backend()->includeInResponse($response); |
@@ -339,7 +340,7 @@ discard block |
||
339 | 340 | * </code> |
340 | 341 | * |
341 | 342 | * @param string $combinedFileName Filename of the combined file relative to docroot |
342 | - * @param array $files Array of filenames relative to docroot |
|
343 | + * @param string[] $files Array of filenames relative to docroot |
|
343 | 344 | * @param string $media |
344 | 345 | * |
345 | 346 | * @return bool|void |
@@ -764,6 +765,7 @@ discard block |
||
764 | 765 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
765 | 766 | * |
766 | 767 | * @param bool |
768 | + * @param boolean $var |
|
767 | 769 | * @return $this |
768 | 770 | */ |
769 | 771 | public function setForceJSToBottom($var) { |
@@ -1263,7 +1265,7 @@ discard block |
||
1263 | 1265 | * Attach requirements inclusion to X-Include-JS and X-Include-CSS headers on the given |
1264 | 1266 | * HTTP Response |
1265 | 1267 | * |
1266 | - * @param SS_HTTPResponse $response |
|
1268 | + * @param HTTPResponse $response |
|
1267 | 1269 | */ |
1268 | 1270 | public function includeInResponse(HTTPResponse $response) { |
1269 | 1271 | $this->processCombinedFiles(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | /** |
195 | 195 | * REST endpoint to get a list of campaigns. |
196 | 196 | * |
197 | - * @param SS_HTTPRequest $request |
|
197 | + * @param HTTPRequest $request |
|
198 | 198 | * |
199 | 199 | * @return HTTPResponse |
200 | 200 | */ |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | /** |
336 | 336 | * Gets viewable list of campaigns |
337 | 337 | * |
338 | - * @return SS_List |
|
338 | + * @return SilverStripe\Model\ArrayList |
|
339 | 339 | */ |
340 | 340 | protected function getListItems() { |
341 | 341 | return ChangeSet::get() |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | /** |
350 | 350 | * REST endpoint to get a campaign. |
351 | 351 | * |
352 | - * @param SS_HTTPRequest $request |
|
352 | + * @param HTTPRequest $request |
|
353 | 353 | * |
354 | 354 | * @return HTTPResponse |
355 | 355 | */ |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | /** |
383 | 383 | * REST endpoint to delete a campaign. |
384 | 384 | * |
385 | - * @param SS_HTTPRequest $request |
|
385 | + * @param HTTPRequest $request |
|
386 | 386 | * |
387 | 387 | * @return HTTPResponse |
388 | 388 | */ |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | /** |
410 | 410 | * REST endpoint to publish a {@link ChangeSet} and all of its items. |
411 | 411 | * |
412 | - * @param SS_HTTPRequest $request |
|
412 | + * @param HTTPRequest $request |
|
413 | 413 | * |
414 | 414 | * @return HTTPResponse |
415 | 415 | */ |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * $this->pushCurrent() and end the method with $this->popCurrent(). Failure to do this will create |
144 | 144 | * weird session errors. |
145 | 145 | * |
146 | - * @param SS_HTTPRequest $request |
|
146 | + * @param HTTPRequest $request |
|
147 | 147 | * @param DataModel $model |
148 | 148 | * |
149 | 149 | * @return HTTPResponse |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | /** |
282 | 282 | * Sets the SS_HTTPResponse object that this controller is building up. |
283 | 283 | * |
284 | - * @param SS_HTTPResponse $response |
|
284 | + * @param HTTPResponse $response |
|
285 | 285 | * |
286 | 286 | * @return $this |
287 | 287 | */ |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | * |
323 | 323 | * @param string $action |
324 | 324 | * |
325 | - * @return HTMLText |
|
325 | + * @return \SilverStripe\Model\FieldType\DBField |
|
326 | 326 | */ |
327 | 327 | public function defaultAction($action) { |
328 | 328 | return $this->getViewer($action)->process($this); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | * |
459 | 459 | * @param array $params |
460 | 460 | * |
461 | - * @return string |
|
461 | + * @return \SilverStripe\Model\FieldType\DBField |
|
462 | 462 | */ |
463 | 463 | public function render($params = null) { |
464 | 464 | $template = $this->getViewer($this->getAction()); |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
624 | 624 | * the URL redirected to. Otherwise, it will return null. |
625 | 625 | * |
626 | - * @return null|string |
|
626 | + * @return boolean |
|
627 | 627 | */ |
628 | 628 | public function redirectedTo() { |
629 | 629 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * @param array|Cookie_Backend $cookies to populate $_COOKIE. |
279 | 279 | * @param HTTP_Request $request The {@see HTTP_Request} object generated as a part of this request. |
280 | 280 | * |
281 | - * @return SilverStripe\Control\HTTPResponse |
|
281 | + * @return HTTPResponse |
|
282 | 282 | * |
283 | 283 | * @throws SilverStripe\Control\HTTPResponse_Exception |
284 | 284 | */ |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | /** |
415 | 415 | * Handle an HTTP request, defined with a SS_HTTPRequest object. |
416 | 416 | * |
417 | - * @param SS_HTTPRequest $request |
|
417 | + * @param HTTPRequest $request |
|
418 | 418 | * @param Session $session |
419 | 419 | * @param DataModel $model |
420 | 420 | * |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | * Returns the domain part of the URL 'http://www.mysite.com'. Returns FALSE is this environment |
561 | 561 | * variable isn't set. |
562 | 562 | * |
563 | - * @return bool|string |
|
563 | + * @return string|false |
|
564 | 564 | */ |
565 | 565 | public static function protocolAndHost() { |
566 | 566 | $alternate = Config::inst()->get('SilverStripe\Control\Director', 'alternate_base_url'); |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | /** |
894 | 894 | * Returns true if the given file exists. Filename should be relative to the site root. |
895 | 895 | * |
896 | - * @param $file |
|
896 | + * @param string $file |
|
897 | 897 | * |
898 | 898 | * @return bool |
899 | 899 | */ |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | * Can also be checked with {@link Director::isDev()}, {@link Director::isTest()}, and |
1112 | 1112 | * {@link Director::isLive()}. |
1113 | 1113 | * |
1114 | - * @return bool|string |
|
1114 | + * @return string|false |
|
1115 | 1115 | */ |
1116 | 1116 | public static function get_environment_type() { |
1117 | 1117 | if (Director::isLive()) { |