@@ -205,6 +205,9 @@ |
||
205 | 205 | return null; |
206 | 206 | } |
207 | 207 | |
208 | + /** |
|
209 | + * @param string $field |
|
210 | + */ |
|
208 | 211 | public function hasField($field) { |
209 | 212 | $fields = $this->compositeDatabaseFields(); |
210 | 213 | return isset($fields[$field]); |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | */ |
24 | 24 | private static $currency_symbol = '$'; |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) { |
27 | 30 | parent::__construct($name, $wholeSize, $decimalSize, $defaultValue); |
28 | 31 | } |
@@ -46,6 +49,9 @@ discard block |
||
46 | 49 | else return $val; |
47 | 50 | } |
48 | 51 | |
52 | + /** |
|
53 | + * @param string $value |
|
54 | + */ |
|
49 | 55 | public function setValue($value, $record = null, $markChanged = true) { |
50 | 56 | $matches = null; |
51 | 57 | if(is_numeric($value)) { |
@@ -38,6 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private static $nice_format = 'd/m/Y'; |
40 | 40 | |
41 | + /** |
|
42 | + * @param string|null $value |
|
43 | + */ |
|
41 | 44 | public function setValue($value, $record = null, $markChanged = true) { |
42 | 45 | if($value === false || $value === null || (is_string($value) && !strlen($value))) { |
43 | 46 | // don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be |
@@ -194,7 +197,7 @@ discard block |
||
194 | 197 | * Return a date formatted as per a CMS user's settings. |
195 | 198 | * |
196 | 199 | * @param Member $member |
197 | - * @return boolean | string A date formatted as per user-defined settings. |
|
200 | + * @return false|string | string A date formatted as per user-defined settings. |
|
198 | 201 | */ |
199 | 202 | public function FormatFromSettings($member = null) { |
200 | 203 | require_once 'Zend/Date.php'; |
@@ -108,7 +108,7 @@ |
||
108 | 108 | * Return a date and time formatted as per a CMS user's settings. |
109 | 109 | * |
110 | 110 | * @param Member $member |
111 | - * @return boolean | string A time and date pair formatted as per user-defined settings. |
|
111 | + * @return false|string | string A time and date pair formatted as per user-defined settings. |
|
112 | 112 | */ |
113 | 113 | public function FormatFromSettings($member = null) { |
114 | 114 | require_once 'Zend/Date.php'; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param string $name |
22 | 22 | * @param int $wholeSize |
23 | 23 | * @param int $decimalSize |
24 | - * @param float|int $defaultValue |
|
24 | + * @param integer $defaultValue |
|
25 | 25 | */ |
26 | 26 | public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) { |
27 | 27 | $this->wholeSize = is_int($wholeSize) ? $wholeSize : 9; |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @return float |
|
36 | + * @return string |
|
37 | 37 | */ |
38 | 38 | public function Nice() { |
39 | 39 | return number_format($this->value, $this->decimalSize); |
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return int |
|
43 | + * @return double |
|
44 | 44 | */ |
45 | 45 | public function Int() { |
46 | 46 | return floor($this->value); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * @return float |
|
86 | + * @return integer |
|
87 | 87 | */ |
88 | 88 | public function nullValue() { |
89 | 89 | return 0; |
@@ -477,7 +477,7 @@ |
||
477 | 477 | } |
478 | 478 | |
479 | 479 | /** |
480 | - * @param array $value |
|
480 | + * @param string $value |
|
481 | 481 | * @return $this |
482 | 482 | */ |
483 | 483 | public function setArrayValue($value) { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | protected $autoIncrement = true; |
22 | 22 | |
23 | + /** |
|
24 | + * @param boolean $autoIncrement |
|
25 | + */ |
|
23 | 26 | public function setAutoIncrement($autoIncrement) { |
24 | 27 | $this->autoIncrement = $autoIncrement; |
25 | 28 | return $this; |
@@ -55,6 +55,9 @@ |
||
55 | 55 | if($this->value) return date($format, strtotime($this->value)); |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param string[] $parts |
|
60 | + */ |
|
58 | 61 | public function TwelveHour( $parts ) { |
59 | 62 | $hour = $parts[1]; |
60 | 63 | $min = $parts[2]; |
@@ -18,6 +18,9 @@ |
||
18 | 18 | DB::require_field($this->tableName, $this->name, $values); |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $title |
|
23 | + */ |
|
21 | 24 | public function scaffoldFormField($title = null, $params = null) { |
22 | 25 | $selectBox = new DropdownField($this->name, $title); |
23 | 26 | $selectBox->setSource($this->getDefaultOptions()); |