@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @param string $name |
20 | - * @param DataOject $object The object that this is primary key for (should have a relation with $name) |
|
20 | + * @param DataObject $object The object that this is primary key for (should have a relation with $name) |
|
21 | 21 | */ |
22 | 22 | public function __construct($name = null, $object) { |
23 | 23 | $this->object = $object; |
@@ -71,8 +71,8 @@ |
||
71 | 71 | /** |
72 | 72 | * resizeRatio |
73 | 73 | * |
74 | - * @param int $width |
|
75 | - * @param int $height |
|
74 | + * @param integer $maxWidth |
|
75 | + * @param integer $maxHeight |
|
76 | 76 | * @return Image_Backend |
77 | 77 | */ |
78 | 78 | public function resizeRatio($maxWidth, $maxHeight, $useAsMinimum = false); |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @deprecated since version 4.0 |
36 | + * @param boolean $value |
|
36 | 37 | */ |
37 | 38 | public function setDelete($value) { |
38 | 39 | Deprecation::notice('4.0', 'SQLQuery::setDelete is deprecated. Use toDelete instead'); |
@@ -47,6 +48,9 @@ discard block |
||
47 | 48 | return $this->isDelete; |
48 | 49 | } |
49 | 50 | |
51 | + /** |
|
52 | + * @return string |
|
53 | + */ |
|
50 | 54 | public function sql(&$parameters = array()) { |
51 | 55 | return $this->toAppropriateExpression()->sql($parameters); |
52 | 56 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * column. Can contain a relation name in dot notation, which will automatically join |
48 | 48 | * the necessary tables (e.g. "Comments.Name" to join the "Comments" has-many relationship and |
49 | 49 | * search the "Name" column when applying this filter to a SiteTree class). |
50 | - * @param mixed $value |
|
50 | + * @param boolean|string $value |
|
51 | 51 | * @param array $modifiers |
52 | 52 | */ |
53 | 53 | public function __construct($fullName, $value = false, array $modifiers = array()) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | /** |
288 | 288 | * Determines case sensitivity based on {@link getModifiers()}. |
289 | 289 | * |
290 | - * @return Mixed TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
290 | + * @return boolean|null TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
291 | 291 | */ |
292 | 292 | protected function getCaseSensitive() { |
293 | 293 | $modifiers = $this->getModifiers(); |
@@ -304,6 +304,10 @@ |
||
304 | 304 | // Delete files in the default uploads directory that match the name pattern. |
305 | 305 | // @param String $namePattern A regular expression applied to files in the directory. If the name matches |
306 | 306 | // the pattern, it is deleted. Directories, . and .. are excluded. |
307 | + |
|
308 | + /** |
|
309 | + * @param string $namePattern |
|
310 | + */ |
|
307 | 311 | public function deleteTestUploadFiles($namePattern) { |
308 | 312 | $tmpFolder = ASSETS_PATH . "/" . Config::inst()->get('Upload', 'uploads_folder'); |
309 | 313 | $files = scandir($tmpFolder); |
@@ -5,10 +5,16 @@ |
||
5 | 5 | return parent::viewfile_getLocalFileByID($id); |
6 | 6 | } |
7 | 7 | |
8 | + /** |
|
9 | + * @param string $fileUrl |
|
10 | + */ |
|
8 | 11 | public function viewfile_getLocalFileByURL($fileUrl) { |
9 | 12 | return parent::viewfile_getLocalFileByURL($fileUrl); |
10 | 13 | } |
11 | 14 | |
15 | + /** |
|
16 | + * @param string $fileUrl |
|
17 | + */ |
|
12 | 18 | public function viewfile_getRemoteFileByURL($fileUrl) { |
13 | 19 | return parent::viewfile_getRemoteFileByURL($fileUrl); |
14 | 20 | } |
@@ -119,6 +119,10 @@ discard block |
||
119 | 119 | )); |
120 | 120 | } |
121 | 121 | |
122 | + /** |
|
123 | + * @param HTMLText $result |
|
124 | + * @param string[] $expected |
|
125 | + */ |
|
122 | 126 | private function assertExpectedStrings($result, $expected) { |
123 | 127 | foreach ($expected as $expectedStr) { |
124 | 128 | $this->assertTrue( |
@@ -739,6 +743,10 @@ discard block |
||
739 | 743 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
740 | 744 | } |
741 | 745 | |
746 | + /** |
|
747 | + * @param string $a |
|
748 | + * @param string $b |
|
749 | + */ |
|
742 | 750 | public function assertEqualIgnoringWhitespace($a, $b) { |
743 | 751 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
744 | 752 | } |
@@ -1353,6 +1361,11 @@ discard block |
||
1353 | 1361 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
1354 | 1362 | Config::inst()->update('Director', 'environment_type', $origEnv); |
1355 | 1363 | } |
1364 | + |
|
1365 | + /** |
|
1366 | + * @param string $name |
|
1367 | + * @param string $expected |
|
1368 | + */ |
|
1356 | 1369 | private function _renderWithSourceFileComments($name, $expected) { |
1357 | 1370 | $viewer = new SSViewer(array($name)); |
1358 | 1371 | $data = new ArrayData(array()); |
@@ -49,6 +49,7 @@ discard block |
||
49 | 49 | * while automatically busting this cache every time the file is changed. |
50 | 50 | * |
51 | 51 | * @param bool |
52 | + * @param boolean $var |
|
52 | 53 | */ |
53 | 54 | public static function set_suffix_requirements($var) { |
54 | 55 | self::backend()->set_suffix_requirements($var); |
@@ -109,7 +110,7 @@ discard block |
||
109 | 110 | /** |
110 | 111 | * Return all registered custom scripts |
111 | 112 | * |
112 | - * @return array |
|
113 | + * @return string |
|
113 | 114 | */ |
114 | 115 | public static function get_custom_scripts() { |
115 | 116 | return self::backend()->get_custom_scripts(); |
@@ -517,7 +518,7 @@ discard block |
||
517 | 518 | /** |
518 | 519 | * Enable or disable the combination of CSS and JavaScript files |
519 | 520 | * |
520 | - * @param $enable |
|
521 | + * @param boolean $enable |
|
521 | 522 | */ |
522 | 523 | public function set_combined_files_enabled($enable) { |
523 | 524 | $this->combined_files_enabled = (bool) $enable; |
@@ -585,6 +586,7 @@ discard block |
||
585 | 586 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
586 | 587 | * |
587 | 588 | * @param bool |
589 | + * @param boolean $var |
|
588 | 590 | */ |
589 | 591 | public function set_force_js_to_bottom($var) { |
590 | 592 | $this->force_js_to_bottom = $var; |
@@ -624,7 +626,7 @@ discard block |
||
624 | 626 | /** |
625 | 627 | * Return all registered custom scripts |
626 | 628 | * |
627 | - * @return array |
|
629 | + * @return string |
|
628 | 630 | */ |
629 | 631 | public function get_custom_scripts() { |
630 | 632 | $requirements = ""; |
@@ -1037,7 +1039,7 @@ discard block |
||
1037 | 1039 | * @param array $files Array of filenames relative to docroot |
1038 | 1040 | * @param string $media |
1039 | 1041 | * |
1040 | - * @return bool|void |
|
1042 | + * @return false|null |
|
1041 | 1043 | */ |
1042 | 1044 | public function combine_files($combinedFileName, $files, $media = null) { |
1043 | 1045 | // duplicate check |
@@ -189,8 +189,6 @@ discard block |
||
189 | 189 | /** |
190 | 190 | * Method to facilitate deprecation of underscore-prefixed methods automatically being cached. |
191 | 191 | * |
192 | - * @param string $field |
|
193 | - * @param array $arguments |
|
194 | 192 | * @param string $identifier an optional custom cache identifier |
195 | 193 | * @return unknown |
196 | 194 | */ |
@@ -252,7 +250,7 @@ discard block |
||
252 | 250 | * - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)") |
253 | 251 | * |
254 | 252 | * @param string $field |
255 | - * @return array |
|
253 | + * @return string |
|
256 | 254 | */ |
257 | 255 | public function castingHelperPair($field) { |
258 | 256 | Deprecation::notice('2.5', 'use castingHelper() instead'); |
@@ -504,6 +502,7 @@ discard block |
||
504 | 502 | |
505 | 503 | /** |
506 | 504 | * Return the value of a field in an SQL-safe format. |
505 | + * @param string $field |
|
507 | 506 | */ |
508 | 507 | public function SQL_val($field, $arguments = null, $cache = true) { |
509 | 508 | return Convert::raw2sql($this->RAW_val($field, $arguments, $cache)); |
@@ -511,6 +510,7 @@ discard block |
||
511 | 510 | |
512 | 511 | /** |
513 | 512 | * Return the value of a field in a JavaScript-save format. |
513 | + * @param string $field |
|
514 | 514 | */ |
515 | 515 | public function JS_val($field, $arguments = null, $cache = true) { |
516 | 516 | return Convert::raw2js($this->RAW_val($field, $arguments, $cache)); |
@@ -518,6 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | /** |
520 | 520 | * Return the value of a field escaped suitable to be inserted into an XML node attribute. |
521 | + * @param string $field |
|
521 | 522 | */ |
522 | 523 | public function ATT_val($field, $arguments = null, $cache = true) { |
523 | 524 | return Convert::raw2att($this->RAW_val($field, $arguments, $cache)); |
@@ -528,7 +529,6 @@ discard block |
||
528 | 529 | /** |
529 | 530 | * Get an array of XML-escaped values by field name |
530 | 531 | * |
531 | - * @param array $elements an array of field names |
|
532 | 532 | * @return array |
533 | 533 | */ |
534 | 534 | public function getXMLValues($fields) { |