@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | * |
281 | 281 | * @deprecated 4.0 Use the "Session.timeout_ips" config setting instead |
282 | 282 | * |
283 | - * @param array $session_ips Array of IPv4 rules. |
|
284 | 283 | */ |
285 | 284 | public static function set_timeout_ips($ips) { |
286 | 285 | Deprecation::notice('4.0', 'Use the "Session.timeout_ips" config setting instead'); |
@@ -417,6 +416,9 @@ discard block |
||
417 | 416 | } |
418 | 417 | } |
419 | 418 | |
419 | + /** |
|
420 | + * @param string $name |
|
421 | + */ |
|
420 | 422 | public function inst_set($name, $val) { |
421 | 423 | // Quicker execution path for "."-free names |
422 | 424 | if(strpos($name, '.') === false) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Returns the {@link Session} object for this test |
70 | 70 | * |
71 | - * @return Session |
|
71 | + * @return Session|null |
|
72 | 72 | */ |
73 | 73 | public function session() { |
74 | 74 | return $this->mainSession->session(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * @param Session $session |
145 | 145 | * @param array $headers |
146 | 146 | * @param array $cookies |
147 | - * @return SS_HTTPResponse |
|
147 | + * @return SilverStripe\Control\SS_HTTPResponse|null |
|
148 | 148 | */ |
149 | 149 | public function get($url, $session = null, $headers = null, $cookies = null) { |
150 | 150 | $this->cssParser = null; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * @param Session $session |
166 | 166 | * @param string $body |
167 | 167 | * @param array $cookies |
168 | - * @return SS_HTTPResponse |
|
168 | + * @return SilverStripe\Control\SS_HTTPResponse|null |
|
169 | 169 | */ |
170 | 170 | public function post($url, $data, $headers = null, $session = null, $body = null, $cookies = null) { |
171 | 171 | $this->cssParser = null; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * @param string $formID HTML 'id' attribute of a form (loaded through a previous response) |
194 | 194 | * @param string $button HTML 'name' attribute of the button (NOT the 'id' attribute) |
195 | 195 | * @param array $data Map of GET/POST data. |
196 | - * @return SS_HTTPResponse |
|
196 | + * @return SilverStripe\Control\SS_HTTPResponse|null |
|
197 | 197 | */ |
198 | 198 | public function submitForm($formID, $button = null, $data = array()) { |
199 | 199 | $this->cssParser = null; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * Find an attribute in a SimpleXMLElement object by name. |
218 | 218 | * @param SimpleXMLElement $object |
219 | 219 | * @param string $attribute Name of attribute to find |
220 | - * @return SimpleXMLElement object of the attribute |
|
220 | + * @return boolean object of the attribute |
|
221 | 221 | */ |
222 | 222 | public function findAttribute($object, $attribute) { |
223 | 223 | $found = false; |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * Note: characters are stripped from the content; make sure that your assertions take this into account. |
248 | 248 | * |
249 | 249 | * @param string $selector A basic CSS selector, e.g. 'li.jobs h3' |
250 | - * @param array|string $expectedMatches The content of at least one of the matched tags |
|
250 | + * @param string[] $expectedMatches The content of at least one of the matched tags |
|
251 | 251 | * @throws PHPUnit_Framework_AssertionFailedError |
252 | 252 | * @return boolean |
253 | 253 | */ |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | * @param string $selector A basic CSS selector, e.g. 'li.jobs h3' |
345 | 345 | * @param array|string $expectedMatches The content of *all* matched tags as an array |
346 | 346 | * @throws PHPUnit_Framework_AssertionFailedError |
347 | - * @return boolean |
|
347 | + * @return boolean|null |
|
348 | 348 | */ |
349 | 349 | public function assertExactHTMLMatchBySelector($selector, $expectedMatches) { |
350 | 350 | $items = $this->cssParser()->getBySelector($selector); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * @param string $formID HTML 'id' attribute of a form (loaded through a previous response) |
133 | 133 | * @param string $button HTML 'name' attribute of the button (NOT the 'id' attribute) |
134 | 134 | * @param array $data Map of GET/POST data. |
135 | - * @return SS_HTTPResponse |
|
135 | + * @return SilverStripe\Control\SS_HTTPResponse|null |
|
136 | 136 | */ |
137 | 137 | public function submitForm($formID, $button = null, $data = array()) { |
138 | 138 | $page = $this->lastPage(); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | /** |
169 | 169 | * If the last request was a 3xx response, then follow the redirection |
170 | 170 | * |
171 | - * @return SS_HTTPResponse The response given, or null if no redirect occurred |
|
171 | + * @return SilverStripe\Control\SS_HTTPResponse|null The response given, or null if no redirect occurred |
|
172 | 172 | */ |
173 | 173 | public function followRedirection() { |
174 | 174 | if($this->lastResponse->getHeader('Location')) { |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | * Generate an {@see SS_HTTPResponse} for the given file from the source filesystem |
813 | 813 | * @param FilesystemInterface $flysystem |
814 | 814 | * @param string $fileID |
815 | - * @return SS_HTTPResponse |
|
815 | + * @return HTTPResponse |
|
816 | 816 | */ |
817 | 817 | protected function createResponseFor(FilesystemInterface $flysystem, $fileID) { |
818 | 818 | // Build response body |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | /** |
834 | 834 | * Generate a response for requests to a denied protected file |
835 | 835 | * |
836 | - * @return SS_HTTPResponse |
|
836 | + * @return HTTPResponse |
|
837 | 837 | */ |
838 | 838 | protected function createDeniedResponse() { |
839 | 839 | $code = (int)Config::inst()->get(get_class($this), 'denied_response_code'); |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | /** |
844 | 844 | * Generate a response for missing file requests |
845 | 845 | * |
846 | - * @return SS_HTTPResponse |
|
846 | + * @return HTTPResponse |
|
847 | 847 | */ |
848 | 848 | protected function createMissingResponse() { |
849 | 849 | $code = (int)Config::inst()->get(get_class($this), 'missing_response_code'); |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | * Create a response with the given error code |
855 | 855 | * |
856 | 856 | * @param int $code |
857 | - * @return SS_HTTPResponse |
|
857 | + * @return HTTPResponse |
|
858 | 858 | */ |
859 | 859 | protected function createErrorResponse($code) { |
860 | 860 | $response = new HTTPResponse('', $code); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * Provide a response for the given file request |
49 | 49 | * |
50 | - * @param \SS_HTTPRequest $request |
|
50 | + * @param HTTPRequest $request |
|
51 | 51 | * @return \SS_HTTPResponse |
52 | 52 | */ |
53 | 53 | public function handleFile(HTTPRequest $request) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * Get the file component from the request |
79 | 79 | * |
80 | - * @param \SS_HTTPRequest $request |
|
80 | + * @param HTTPRequest $request |
|
81 | 81 | * @return string |
82 | 82 | */ |
83 | 83 | protected function parseFilename(HTTPRequest $request) { |
@@ -151,7 +151,6 @@ discard block |
||
151 | 151 | * |
152 | 152 | * @param string $name The internal field name, passed to forms. |
153 | 153 | * @param string $title The field label. |
154 | - * @param Form $form Reference to the container form |
|
155 | 154 | */ |
156 | 155 | public function __construct($name, $title = null) { |
157 | 156 | $this->addExtraClass('ss-upload'); // class, used by js |
@@ -263,6 +262,10 @@ discard block |
||
263 | 262 | return $this->record; |
264 | 263 | } |
265 | 264 | |
265 | + /** |
|
266 | + * @param null|DataObject $value |
|
267 | + * @param DataObject $record |
|
268 | + */ |
|
266 | 269 | public function setValue($value, $record = null) { |
267 | 270 | // Extract value from underlying record |
268 | 271 | if(empty($value) && $this->getName() && $record instanceof DataObject) { |
@@ -700,8 +703,8 @@ discard block |
||
700 | 703 | /** |
701 | 704 | * Action to handle upload of a single file |
702 | 705 | * |
703 | - * @param SS_HTTPRequest $request |
|
704 | - * @return SS_HTTPResponse |
|
706 | + * @param HTTPRequest $request |
|
707 | + * @return HTTPResponse |
|
705 | 708 | */ |
706 | 709 | public function upload(HTTPRequest $request) { |
707 | 710 | if($this->isDisabled() || $this->isReadonly() || !$this->canUpload()) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
201 | - * @return ArrayList |
|
201 | + * @return SilverStripe\Model\ArrayList |
|
202 | 202 | */ |
203 | 203 | public function getComponents() { |
204 | 204 | return $this->config->getComponents(); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @todo refactor this into GridFieldComponent |
211 | 211 | * |
212 | - * @param mixed $value |
|
212 | + * @param string $value |
|
213 | 213 | * @param string|array $castingDefinition |
214 | 214 | * |
215 | 215 | * @return mixed |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * |
297 | 297 | * @param array $properties |
298 | 298 | * |
299 | - * @return HTMLText |
|
299 | + * @return DBField |
|
300 | 300 | */ |
301 | 301 | public function FieldHolder($properties = array()) { |
302 | 302 | Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | /** |
611 | 611 | * @param array $properties |
612 | 612 | * |
613 | - * @return HTMLText |
|
613 | + * @return DBField |
|
614 | 614 | */ |
615 | 615 | public function Field($properties = array()) { |
616 | 616 | $this->extend('onBeforeRender', $this); |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | * |
850 | 850 | * @param array $data |
851 | 851 | * @param Form $form |
852 | - * @param SS_HTTPRequest $request |
|
852 | + * @param HTTPRequest $request |
|
853 | 853 | * |
854 | 854 | * @return string |
855 | 855 | */ |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | * |
944 | 944 | * @todo copy less code from RequestHandler. |
945 | 945 | * |
946 | - * @param SS_HTTPRequest $request |
|
946 | + * @param HTTPRequest $request |
|
947 | 947 | * @param DataModel $model |
948 | 948 | * |
949 | 949 | * @return array|RequestHandler|SS_HTTPResponse|string|void |
@@ -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; |