@@ -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()); |
@@ -306,7 +306,6 @@ discard block |
||
306 | 306 | * Simulates a form post to the test controller with the specified file tuple (Filename, Hash, Variant) |
307 | 307 | * |
308 | 308 | * @param string $fileField Name of field to assign ids to |
309 | - * @param array $ids list of file IDs |
|
310 | 309 | * @return boolean Array with key 'errors' |
311 | 310 | */ |
312 | 311 | protected function mockUploadFileSave($fileField, $filename, $hash, $variant = null) { |
@@ -336,8 +335,8 @@ discard block |
||
336 | 335 | * Simulates a file upload |
337 | 336 | * |
338 | 337 | * @param string $fileField Name of the field to mock upload for |
339 | - * @param array $tmpFileName Name of temporary file to upload |
|
340 | - * @return SS_HTTPResponse form response |
|
338 | + * @param string $tmpFileName Name of temporary file to upload |
|
339 | + * @return SilverStripe\Control\SS_HTTPResponse|null form response |
|
341 | 340 | */ |
342 | 341 | protected function mockFileUpload($fileField, $tmpFileName) { |
343 | 342 | $upload = $this->getUploadFile($tmpFileName); |
@@ -368,6 +367,9 @@ discard block |
||
368 | 367 | return $this->record; |
369 | 368 | } |
370 | 369 | |
370 | + /** |
|
371 | + * @param AssetFieldTest_Controller $controller |
|
372 | + */ |
|
371 | 373 | function __construct($controller = null, $name = 'Form') { |
372 | 374 | if(empty($controller)) { |
373 | 375 | $controller = new AssetFieldTest_Controller(); |
@@ -916,8 +916,8 @@ discard block |
||
916 | 916 | * Simulates a file upload |
917 | 917 | * |
918 | 918 | * @param string $fileField Name of the field to mock upload for |
919 | - * @param array $tmpFileName Name of temporary file to upload |
|
920 | - * @return SS_HTTPResponse form response |
|
919 | + * @param string $tmpFileName Name of temporary file to upload |
|
920 | + * @return SilverStripe\Control\SS_HTTPResponse|null form response |
|
921 | 921 | */ |
922 | 922 | protected function mockFileUpload($fileField, $tmpFileName) { |
923 | 923 | $upload = $this->getUploadFile($tmpFileName); |
@@ -928,6 +928,9 @@ discard block |
||
928 | 928 | ); |
929 | 929 | } |
930 | 930 | |
931 | + /** |
|
932 | + * @param string $fileField |
|
933 | + */ |
|
931 | 934 | protected function mockFileExists($fileField, $fileName) { |
932 | 935 | return $this->get( |
933 | 936 | "UploadFieldTest_Controller/Form/field/{$fileField}/fileexists?filename=".urlencode($fileName) |
@@ -939,7 +942,7 @@ discard block |
||
939 | 942 | * |
940 | 943 | * @param string $fileField Name of the field |
941 | 944 | * @param integer $fileID ID of the file to delete |
942 | - * @return SS_HTTPResponse form response |
|
945 | + * @return SilverStripe\Control\SS_HTTPResponse|null form response |
|
943 | 946 | */ |
944 | 947 | protected function mockFileEditForm($fileField, $fileID) { |
945 | 948 | return $this->get( |
@@ -953,7 +956,7 @@ discard block |
||
953 | 956 | * @param string $fileField Name of the field |
954 | 957 | * @param integer $fileID ID of the file to delete |
955 | 958 | * @param array $fields Fields to update |
956 | - * @return SS_HTTPResponse form response |
|
959 | + * @return SilverStripe\Control\SS_HTTPResponse|null form response |
|
957 | 960 | */ |
958 | 961 | protected function mockFileEdit($fileField, $fileID, $fields = array()) { |
959 | 962 | return $this->post( |
@@ -967,7 +970,7 @@ discard block |
||
967 | 970 | * |
968 | 971 | * @param string $fileField Name of the field |
969 | 972 | * @param integer $fileID ID of the file to delete |
970 | - * @return SS_HTTPResponse form response |
|
973 | + * @return SilverStripe\Control\SS_HTTPResponse|null form response |
|
971 | 974 | */ |
972 | 975 | protected function mockFileDelete($fileField, $fileID) { |
973 | 976 | return $this->post( |
@@ -1084,6 +1087,9 @@ discard block |
||
1084 | 1087 | return $this->record; |
1085 | 1088 | } |
1086 | 1089 | |
1090 | + /** |
|
1091 | + * @param UploadFieldTest_Controller $controller |
|
1092 | + */ |
|
1087 | 1093 | function __construct($controller = null, $name = 'Form') { |
1088 | 1094 | if(empty($controller)) { |
1089 | 1095 | $controller = new UploadFieldTest_Controller(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * @param string $url |
134 | 134 | * @param int $limit Max number of requests |
135 | - * @return SS_HTTPResponse |
|
135 | + * @return SilverStripe\Control\SS_HTTPResponse|null |
|
136 | 136 | */ |
137 | 137 | protected function getRecursive($url, $limit = 10) { |
138 | 138 | $this->cssParser = null; |
@@ -589,6 +589,8 @@ discard block |
||
589 | 589 | /** |
590 | 590 | * Execute a log-in form using Director::test(). |
591 | 591 | * Helper method for the tests above |
592 | + * @param string $email |
|
593 | + * @param string $password |
|
592 | 594 | */ |
593 | 595 | public function doTestLoginForm($email, $password, $backURL = 'test/link') { |
594 | 596 | $this->get(Config::inst()->get('Security', 'logout_url')); |
@@ -609,6 +611,8 @@ discard block |
||
609 | 611 | |
610 | 612 | /** |
611 | 613 | * Helper method to execute a change password form |
614 | + * @param string $oldPassword |
|
615 | + * @param string $newPassword |
|
612 | 616 | */ |
613 | 617 | public function doTestChangepasswordForm($oldPassword, $newPassword) { |
614 | 618 | return $this->submitForm( |
@@ -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(); |