@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * Returns a new DataList instance with the specified query parameter assigned |
158 | 158 | * |
159 | 159 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
160 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
160 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
161 | 161 | * @return DataList |
162 | 162 | */ |
163 | 163 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | * Check if the given field specification could be interpreted as an unquoted relation name |
521 | 521 | * |
522 | 522 | * @param string $field |
523 | - * @return bool |
|
523 | + * @return integer |
|
524 | 524 | */ |
525 | 525 | protected function isValidRelationName($field) { |
526 | 526 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
636 | 636 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
637 | 637 | * ORM have a value of 10. |
638 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
638 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
639 | 639 | * @return DataList |
640 | 640 | */ |
641 | 641 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
654 | 654 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
655 | 655 | * ORM have a value of 10. |
656 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
656 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
657 | 657 | * @return DataList |
658 | 658 | */ |
659 | 659 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | * Return the maximum value of the given field in this DataList |
781 | 781 | * |
782 | 782 | * @param string $fieldName |
783 | - * @return mixed |
|
783 | + * @return string |
|
784 | 784 | */ |
785 | 785 | public function max($fieldName) { |
786 | 786 | return $this->dataQuery->max($fieldName); |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | * Return the minimum value of the given field in this DataList |
791 | 791 | * |
792 | 792 | * @param string $fieldName |
793 | - * @return mixed |
|
793 | + * @return string |
|
794 | 794 | */ |
795 | 795 | public function min($fieldName) { |
796 | 796 | return $this->dataQuery->min($fieldName); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | * Return the average value of the given field in this DataList |
801 | 801 | * |
802 | 802 | * @param string $fieldName |
803 | - * @return mixed |
|
803 | + * @return string |
|
804 | 804 | */ |
805 | 805 | public function avg($fieldName) { |
806 | 806 | return $this->dataQuery->avg($fieldName); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | * Return the sum of the values of the given field in this DataList |
811 | 811 | * |
812 | 812 | * @param string $fieldName |
813 | - * @return mixed |
|
813 | + * @return string |
|
814 | 814 | */ |
815 | 815 | public function sum($fieldName) { |
816 | 816 | return $this->dataQuery->sum($fieldName); |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | /** |
863 | 863 | * Restrict the columns to fetch into this DataList |
864 | 864 | * |
865 | - * @param array $queriedColumns |
|
865 | + * @param string[] $queriedColumns |
|
866 | 866 | * @return DataList |
867 | 867 | */ |
868 | 868 | public function setQueriedColumns($queriedColumns) { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | /** |
1136 | 1136 | * Returns item stored in list with index $key |
1137 | 1137 | * |
1138 | - * @param mixed $key |
|
1138 | + * @param integer $key |
|
1139 | 1139 | * @return DataObject |
1140 | 1140 | */ |
1141 | 1141 | public function offsetGet($key) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * Remove a filter from the query |
102 | 102 | * |
103 | - * @param string|array $fieldExpression The predicate of the condition to remove |
|
103 | + * @param string|null $fieldExpression The predicate of the condition to remove |
|
104 | 104 | * (ignoring parameters). The expression will be considered a match if it's |
105 | 105 | * contained within any other predicate. |
106 | 106 | * @return DataQuery Self reference |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | /** |
180 | 180 | * Ensure that the query is ready to execute. |
181 | 181 | * |
182 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
182 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
183 | 183 | * @return SQLSelect The finalised sql query |
184 | 184 | */ |
185 | 185 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | /** |
388 | 388 | * Execute the query and return the result as {@link SS_Query} object. |
389 | 389 | * |
390 | - * @return SS_Query |
|
390 | + * @return Connect\SS_Query |
|
391 | 391 | */ |
392 | 392 | public function execute() { |
393 | 393 | return $this->getFinalisedQuery()->execute(); |
@@ -1039,6 +1039,9 @@ discard block |
||
1039 | 1039 | */ |
1040 | 1040 | protected $whereQuery; |
1041 | 1041 | |
1042 | + /** |
|
1043 | + * @param string $connective |
|
1044 | + */ |
|
1042 | 1045 | public function __construct(DataQuery $base, $connective) { |
1043 | 1046 | parent::__construct($base->dataClass); |
1044 | 1047 | $this->query = $base->query; |
@@ -1048,6 +1051,9 @@ discard block |
||
1048 | 1051 | $base->where($this); |
1049 | 1052 | } |
1050 | 1053 | |
1054 | + /** |
|
1055 | + * @param string $filter |
|
1056 | + */ |
|
1051 | 1057 | public function where($filter) { |
1052 | 1058 | if($filter) { |
1053 | 1059 | $this->whereQuery->addWhere($filter); |
@@ -186,6 +186,9 @@ |
||
186 | 186 | return $classNames; |
187 | 187 | } |
188 | 188 | |
189 | + /** |
|
190 | + * @param \DBClassNameTest_ObjectSubClass $record |
|
191 | + */ |
|
189 | 192 | public function setValue($value, $record = null, $markChanged = true) { |
190 | 193 | parent::setValue($value, $record, $markChanged); |
191 | 194 |
@@ -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)) { |
@@ -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'; |
@@ -36,6 +36,9 @@ |
||
36 | 36 | |
37 | 37 | protected $whitelist = false; |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $name |
|
41 | + */ |
|
39 | 42 | public function __construct($name = null, $options = array()) { |
40 | 43 | if(is_string($options)) { |
41 | 44 | $options = array('whitelist' => $options); |
@@ -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]; |