@@ -50,6 +50,7 @@ |
||
50 | 50 | * |
51 | 51 | * @param DataObject (Optional) |
52 | 52 | * @param DataObject |
53 | + * @param DataObject|null $fromRecord |
|
53 | 54 | */ |
54 | 55 | public function __construct($fromRecord, DataObject $toRecord) { |
55 | 56 | if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING); |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | */ |
29 | 29 | private static $currency_symbol = '$'; |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $name |
|
33 | + */ |
|
31 | 34 | public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) { |
32 | 35 | parent::__construct($name, $wholeSize, $decimalSize, $defaultValue); |
33 | 36 | } |
@@ -51,6 +54,9 @@ discard block |
||
51 | 54 | else return $val; |
52 | 55 | } |
53 | 56 | |
57 | + /** |
|
58 | + * @param string $value |
|
59 | + */ |
|
54 | 60 | public function setValue($value, $record = null, $markChanged = true) { |
55 | 61 | $matches = null; |
56 | 62 | if(is_numeric($value)) { |
@@ -31,6 +31,9 @@ discard block |
||
31 | 31 | */ |
32 | 32 | class DBDate extends DBField { |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $value |
|
36 | + */ |
|
34 | 37 | public function setValue($value, $record = null, $markChanged = true) { |
35 | 38 | if($value === false || $value === null || (is_string($value) && !strlen($value))) { |
36 | 39 | // don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be |
@@ -113,7 +116,7 @@ discard block |
||
113 | 116 | |
114 | 117 | /** |
115 | 118 | * Returns the day of the month. |
116 | - * @param boolean $includeOrdinals Include ordinal suffix to day, e.g. "th" or "rd" |
|
119 | + * @param boolean $includeOrdinal Include ordinal suffix to day, e.g. "th" or "rd" |
|
117 | 120 | * @return string |
118 | 121 | */ |
119 | 122 | public function DayOfMonth($includeOrdinal = false) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param string $name |
22 | 22 | * @param int $wholeSize |
23 | 23 | * @param int $decimalSize |
24 | - * @param float $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); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * @return float |
|
89 | + * @return integer |
|
90 | 90 | */ |
91 | 91 | public function nullValue() { |
92 | 92 | return 0; |
@@ -47,6 +47,9 @@ |
||
47 | 47 | |
48 | 48 | protected $whitelist = false; |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $name |
|
52 | + */ |
|
50 | 53 | public function __construct($name = null, $options = array()) { |
51 | 54 | if(is_string($options)) { |
52 | 55 | $options = array('whitelist' => $options); |
@@ -64,6 +64,9 @@ |
||
64 | 64 | if($this->value) return date($format, strtotime($this->value)); |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param string[] $parts |
|
69 | + */ |
|
67 | 70 | public function TwelveHour( $parts ) { |
68 | 71 | $hour = $parts[1]; |
69 | 72 | $min = $parts[2]; |
@@ -24,6 +24,9 @@ |
||
24 | 24 | DB::require_field($this->tableName, $this->name, $values); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $title |
|
29 | + */ |
|
27 | 30 | public function scaffoldFormField($title = null, $params = null) { |
28 | 31 | $selectBox = new DropdownField($this->name, $title); |
29 | 32 | $selectBox->setSource($this->getDefaultOptions()); |
@@ -20,7 +20,6 @@ discard block |
||
20 | 20 | abstract public function setContent($fragment); |
21 | 21 | |
22 | 22 | /** |
23 | - * @param string $content |
|
24 | 23 | * @return string |
25 | 24 | */ |
26 | 25 | public function getContent() { |
@@ -140,7 +139,7 @@ discard block |
||
140 | 139 | /** |
141 | 140 | * Make an xpath query against this HTML |
142 | 141 | * |
143 | - * @param $query string - The xpath query string |
|
142 | + * @param string $query string - The xpath query string |
|
144 | 143 | * @return DOMNodeList |
145 | 144 | */ |
146 | 145 | public function query($query) { |
@@ -41,6 +41,7 @@ discard block |
||
41 | 41 | * Set the key field for this map. |
42 | 42 | * |
43 | 43 | * @var string $keyField |
44 | + * @param string $keyField |
|
44 | 45 | */ |
45 | 46 | public function setKeyField($keyField) { |
46 | 47 | $this->keyField = $keyField; |
@@ -50,6 +51,7 @@ discard block |
||
50 | 51 | * Set the value field for this map. |
51 | 52 | * |
52 | 53 | * @var string $valueField |
54 | + * @param string $valueField |
|
53 | 55 | */ |
54 | 56 | public function setValueField($valueField) { |
55 | 57 | $this->valueField = $valueField; |
@@ -95,6 +97,7 @@ discard block |
||
95 | 97 | * |
96 | 98 | * @var string $key |
97 | 99 | * @var mixed $value |
100 | + * @param string $value |
|
98 | 101 | */ |
99 | 102 | public function unshift($key, $value) { |
100 | 103 | $oldItems = $this->firstItems; |
@@ -114,6 +117,7 @@ discard block |
||
114 | 117 | * |
115 | 118 | * @var string $key |
116 | 119 | * @var mixed $value |
120 | + * @param string $value |
|
117 | 121 | */ |
118 | 122 | public function push($key, $value) { |
119 | 123 | $oldItems = $this->lastItems; |
@@ -286,7 +290,7 @@ discard block |
||
286 | 290 | * @param Iterator $items The iterator to build this map from |
287 | 291 | * @param string $keyField The field to use for the keys |
288 | 292 | * @param string $titleField The field to use for the values |
289 | - * @param array $fristItems An optional map of items to show first |
|
293 | + * @param array $firstItems An optional map of items to show first |
|
290 | 294 | * @param array $lastItems An optional map of items to show last |
291 | 295 | */ |
292 | 296 | public function __construct(Iterator $items, $keyField, $titleField, $firstItems = null, $lastItems = null) { |