@@ -105,6 +105,9 @@ |
||
| 105 | 105 | return $this->descriptionTemplate; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @param string $template |
|
| 110 | + */ |
|
| 108 | 111 | public function setDescriptionTemplate($template) { |
| 109 | 112 | $this->descriptionTemplate = $template; |
| 110 | 113 | } |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * Note that columns may be double quoted as per ANSI sql standard |
| 381 | 381 | * |
| 382 | - * @return DataList |
|
| 382 | + * @return ArrayList |
|
| 383 | 383 | * @see SS_List::sort() |
| 384 | 384 | * @example $list->sort('Name'); // default ASC sorting |
| 385 | 385 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | * $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43))); |
| 516 | 516 | * |
| 517 | 517 | * @param string|array See {@link filter()} |
| 518 | - * @return DataList |
|
| 518 | + * @return ArrayList |
|
| 519 | 519 | */ |
| 520 | 520 | public function filterAny() { |
| 521 | 521 | $keepUs = call_user_func_array(array($this, 'normaliseFilterArgs'), func_get_args()); |
@@ -666,7 +666,6 @@ discard block |
||
| 666 | 666 | /** |
| 667 | 667 | * Returns whether an item with $key exists |
| 668 | 668 | * |
| 669 | - * @param mixed $key |
|
| 670 | 669 | * @return bool |
| 671 | 670 | */ |
| 672 | 671 | public function offsetExists($offset) { |
@@ -676,7 +675,6 @@ discard block |
||
| 676 | 675 | /** |
| 677 | 676 | * Returns item stored in list with index $key |
| 678 | 677 | * |
| 679 | - * @param mixed $key |
|
| 680 | 678 | * @return DataObject |
| 681 | 679 | */ |
| 682 | 680 | public function offsetGet($offset) { |
@@ -686,7 +684,6 @@ discard block |
||
| 686 | 684 | /** |
| 687 | 685 | * Set an item with the key in $key |
| 688 | 686 | * |
| 689 | - * @param mixed $key |
|
| 690 | 687 | * @param mixed $value |
| 691 | 688 | */ |
| 692 | 689 | public function offsetSet($offset, $value) { |
@@ -700,7 +697,6 @@ discard block |
||
| 700 | 697 | /** |
| 701 | 698 | * Unset an item with the key in $key |
| 702 | 699 | * |
| 703 | - * @param mixed $key |
|
| 704 | 700 | */ |
| 705 | 701 | public function offsetUnset($offset) { |
| 706 | 702 | unset($this->items[$offset]); |
@@ -118,6 +118,11 @@ discard block |
||
| 118 | 118 | ); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | + /** |
|
| 122 | + * @param Requirements_Backend $backend |
|
| 123 | + * @param boolean $async |
|
| 124 | + * @param boolean $defer |
|
| 125 | + */ |
|
| 121 | 126 | protected function setupCombinedRequirementsJavascriptAsyncDefer($backend, $async, $defer) { |
| 122 | 127 | $basePath = $this->getCurrentRelativePath(); |
| 123 | 128 | $this->setupRequirements($backend); |
@@ -805,6 +810,10 @@ discard block |
||
| 805 | 810 | } |
| 806 | 811 | } |
| 807 | 812 | |
| 813 | + /** |
|
| 814 | + * @param Requirements_Backend $backend |
|
| 815 | + * @param string $type |
|
| 816 | + */ |
|
| 808 | 817 | public function assertFileNotIncluded($backend, $type, $files) { |
| 809 | 818 | $includedFiles = $this->getBackendFiles($backend, $type); |
| 810 | 819 | if(is_array($files)) { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | - * @return ArrayList |
|
| 196 | + * @return SilverStripe\ORM\ArrayList |
|
| 197 | 197 | */ |
| 198 | 198 | public function getComponents() { |
| 199 | 199 | return $this->config->getComponents(); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * |
| 205 | 205 | * @todo refactor this into GridFieldComponent |
| 206 | 206 | * |
| 207 | - * @param mixed $value |
|
| 207 | + * @param string $value |
|
| 208 | 208 | * @param string|array $castingDefinition |
| 209 | 209 | * |
| 210 | 210 | * @return mixed |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @param int $width |
| 157 | 157 | * @param int $height |
| 158 | 158 | * @param int $transparencyPercent |
| 159 | - * @return Image_Backend |
|
| 159 | + * @return null|ImagickBackend |
|
| 160 | 160 | */ |
| 161 | 161 | public function paddedResize($width, $height, $backgroundColor = "FFFFFF", $transparencyPercent = 0) { |
| 162 | 162 | if(!$this->valid()) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | /** |
| 183 | 183 | * Convert a percentage (or 'true') to a two char hex code to signifiy the level of an alpha channel |
| 184 | 184 | * |
| 185 | - * @param $percent |
|
| 185 | + * @param integer $percent |
|
| 186 | 186 | * @return string |
| 187 | 187 | */ |
| 188 | 188 | public function calculateAlphaHex($percent) { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * |
| 204 | 204 | * @param int $width |
| 205 | 205 | * @param int $height |
| 206 | - * @return Image_Backend |
|
| 206 | + * @return null|ImagickBackend |
|
| 207 | 207 | */ |
| 208 | 208 | public function croppedResize($width, $height) { |
| 209 | 209 | if(!$this->valid()) { |
@@ -14,6 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * allows the value to be set. removes the first character |
| 16 | 16 | * if it is not a number (probably a currency symbol) |
| 17 | + * @param string $val |
|
| 17 | 18 | */ |
| 18 | 19 | public function setValue($val) { |
| 19 | 20 | if(!$val) $val = 0.00; |
@@ -43,6 +44,9 @@ discard block |
||
| 43 | 44 | return $this->castedCopy('CurrencyField_Readonly'); |
| 44 | 45 | } |
| 45 | 46 | |
| 47 | + /** |
|
| 48 | + * @param RequiredFields $validator |
|
| 49 | + */ |
|
| 46 | 50 | public function validate($validator) { |
| 47 | 51 | $currencySymbol = preg_quote(Config::inst()->get('SilverStripe\\ORM\\FieldType\\DBCurrency', 'currency_symbol')); |
| 48 | 52 | $regex = '/^\s*(\-?'.$currencySymbol.'?|'.$currencySymbol.'\-?)?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?\s*$/'; |
@@ -126,6 +126,7 @@ |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * {@inheritdoc} |
| 129 | + * @param RequiredFields $validator |
|
| 129 | 130 | */ |
| 130 | 131 | public function validate($validator) { |
| 131 | 132 | if (!$this->Value()) { |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | 'LIMIT', |
| 28 | 28 | ); |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param string $sql |
|
| 32 | + */ |
|
| 30 | 33 | public function formatPlain($sql) { |
| 31 | 34 | $sql = $this->addNewlines($sql, false); |
| 32 | 35 | |
@@ -63,6 +63,10 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | protected $config; |
| 65 | 65 | |
| 66 | + /** |
|
| 67 | + * @param string $name |
|
| 68 | + * @param string $title |
|
| 69 | + */ |
|
| 66 | 70 | public function __construct($name, $title = null, $value = ""){ |
| 67 | 71 | $this->config = $this->config()->default_config; |
| 68 | 72 | |
@@ -75,6 +79,9 @@ discard block |
||
| 75 | 79 | parent::__construct($name, $title, $value); |
| 76 | 80 | } |
| 77 | 81 | |
| 82 | + /** |
|
| 83 | + * @param Form $form |
|
| 84 | + */ |
|
| 78 | 85 | public function setForm($form) { |
| 79 | 86 | parent::setForm($form); |
| 80 | 87 | |
@@ -85,6 +92,9 @@ discard block |
||
| 85 | 92 | return $this; |
| 86 | 93 | } |
| 87 | 94 | |
| 95 | + /** |
|
| 96 | + * @param string $name |
|
| 97 | + */ |
|
| 88 | 98 | public function setName($name) { |
| 89 | 99 | parent::setName($name); |
| 90 | 100 | |
@@ -97,7 +107,7 @@ discard block |
||
| 97 | 107 | |
| 98 | 108 | /** |
| 99 | 109 | * @param array $properties |
| 100 | - * @return string |
|
| 110 | + * @return DBHTMLText |
|
| 101 | 111 | */ |
| 102 | 112 | public function FieldHolder($properties = array()) { |
| 103 | 113 | $config = array( |
@@ -249,6 +259,7 @@ discard block |
||
| 249 | 259 | |
| 250 | 260 | /** |
| 251 | 261 | * @param FormField |
| 262 | + * @param DateField $field |
|
| 252 | 263 | */ |
| 253 | 264 | public function setDateField($field) { |
| 254 | 265 | $expected = $this->getName() . '[date]'; |
@@ -274,6 +285,7 @@ discard block |
||
| 274 | 285 | |
| 275 | 286 | /** |
| 276 | 287 | * @param FormField |
| 288 | + * @param TimeField $field |
|
| 277 | 289 | */ |
| 278 | 290 | public function setTimeField($field) { |
| 279 | 291 | $expected = $this->getName() . '[time]'; |
@@ -312,7 +324,7 @@ discard block |
||
| 312 | 324 | * to set field-specific config options. |
| 313 | 325 | * |
| 314 | 326 | * @param string $name |
| 315 | - * @param mixed $val |
|
| 327 | + * @param string $val |
|
| 316 | 328 | */ |
| 317 | 329 | public function setConfig($name, $val) { |
| 318 | 330 | $this->config[$name] = $val; |
@@ -330,7 +342,7 @@ discard block |
||
| 330 | 342 | * to get field-specific config options. |
| 331 | 343 | * |
| 332 | 344 | * @param String $name Optional, returns the whole configuration array if empty |
| 333 | - * @return mixed |
|
| 345 | + * @return string|null |
|
| 334 | 346 | */ |
| 335 | 347 | public function getConfig($name = null) { |
| 336 | 348 | if($name) { |
@@ -340,6 +352,9 @@ discard block |
||
| 340 | 352 | } |
| 341 | 353 | } |
| 342 | 354 | |
| 355 | + /** |
|
| 356 | + * @param RequiredFields $validator |
|
| 357 | + */ |
|
| 343 | 358 | public function validate($validator) { |
| 344 | 359 | $dateValid = $this->dateField->validate($validator); |
| 345 | 360 | $timeValid = $this->timeField->validate($validator); |