@@ -152,7 +152,7 @@ |
||
| 152 | 152 | /** |
| 153 | 153 | * Returns the timestamp of the time that the database was last built |
| 154 | 154 | * |
| 155 | - * @return string Returns the timestamp of the time that the database was |
|
| 155 | + * @return integer|null Returns the timestamp of the time that the database was |
|
| 156 | 156 | * last built |
| 157 | 157 | */ |
| 158 | 158 | public static function lastBuilt() { |
@@ -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) { |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 617 | 617 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 618 | 618 | * ORM have a value of 10. |
| 619 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 619 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 620 | 620 | * @return DataList |
| 621 | 621 | */ |
| 622 | 622 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 635 | 635 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 636 | 636 | * ORM have a value of 10. |
| 637 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 637 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 638 | 638 | * @return DataList |
| 639 | 639 | */ |
| 640 | 640 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -761,7 +761,7 @@ discard block |
||
| 761 | 761 | * Return the maximum value of the given field in this DataList |
| 762 | 762 | * |
| 763 | 763 | * @param string $fieldName |
| 764 | - * @return mixed |
|
| 764 | + * @return string |
|
| 765 | 765 | */ |
| 766 | 766 | public function max($fieldName) { |
| 767 | 767 | return $this->dataQuery->max($fieldName); |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | * Return the minimum value of the given field in this DataList |
| 772 | 772 | * |
| 773 | 773 | * @param string $fieldName |
| 774 | - * @return mixed |
|
| 774 | + * @return string |
|
| 775 | 775 | */ |
| 776 | 776 | public function min($fieldName) { |
| 777 | 777 | return $this->dataQuery->min($fieldName); |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | * Return the average value of the given field in this DataList |
| 782 | 782 | * |
| 783 | 783 | * @param string $fieldName |
| 784 | - * @return mixed |
|
| 784 | + * @return string |
|
| 785 | 785 | */ |
| 786 | 786 | public function avg($fieldName) { |
| 787 | 787 | return $this->dataQuery->avg($fieldName); |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | * Return the sum of the values of the given field in this DataList |
| 792 | 792 | * |
| 793 | 793 | * @param string $fieldName |
| 794 | - * @return mixed |
|
| 794 | + * @return string |
|
| 795 | 795 | */ |
| 796 | 796 | public function sum($fieldName) { |
| 797 | 797 | return $this->dataQuery->sum($fieldName); |
@@ -843,7 +843,7 @@ discard block |
||
| 843 | 843 | /** |
| 844 | 844 | * Restrict the columns to fetch into this DataList |
| 845 | 845 | * |
| 846 | - * @param array $queriedColumns |
|
| 846 | + * @param string[] $queriedColumns |
|
| 847 | 847 | * @return DataList |
| 848 | 848 | */ |
| 849 | 849 | public function setQueriedColumns($queriedColumns) { |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | /** |
| 1117 | 1117 | * Returns item stored in list with index $key |
| 1118 | 1118 | * |
| 1119 | - * @param mixed $key |
|
| 1119 | + * @param integer $key |
|
| 1120 | 1120 | * @return DataObject |
| 1121 | 1121 | */ |
| 1122 | 1122 | public function offsetGet($key) { |
@@ -217,9 +217,8 @@ discard block |
||
| 217 | 217 | * Given the database configuration, this method will create the correct |
| 218 | 218 | * subclass of {@link SS_Database}. |
| 219 | 219 | * |
| 220 | - * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
| 220 | + * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
| 221 | 221 | * rest of the options, see the specific class. |
| 222 | - * @param string $name identifier for the connection |
|
| 223 | 222 | * |
| 224 | 223 | * @return SS_Database |
| 225 | 224 | */ |
@@ -413,7 +412,7 @@ discard block |
||
| 413 | 412 | |
| 414 | 413 | /** |
| 415 | 414 | * Create a new table. |
| 416 | - * @param string $tableName The name of the table |
|
| 415 | + * @param string $table The name of the table |
|
| 417 | 416 | * @param array$fields A map of field names to field types |
| 418 | 417 | * @param array $indexes A map of indexes |
| 419 | 418 | * @param array $options An map of additional options. The available keys are as follows: |
@@ -500,6 +499,8 @@ discard block |
||
| 500 | 499 | |
| 501 | 500 | /** |
| 502 | 501 | * @deprecated since version 4.0 Use DB::require_field instead |
| 502 | + * @param string $field |
|
| 503 | + * @param string $spec |
|
| 503 | 504 | */ |
| 504 | 505 | public static function requireField($table, $field, $spec) { |
| 505 | 506 | Deprecation::notice('4.0', 'Use DB::require_field instead'); |
@@ -563,7 +564,7 @@ discard block |
||
| 563 | 564 | /** |
| 564 | 565 | * Checks a table's integrity and repairs it if necessary. |
| 565 | 566 | * |
| 566 | - * @param string $tableName The name of the table. |
|
| 567 | + * @param string $table The name of the table. |
|
| 567 | 568 | * @return boolean Return true if the table has integrity after the method is complete. |
| 568 | 569 | */ |
| 569 | 570 | public static function check_and_repair_table($table) { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * Return a date and time formatted as per a CMS user's settings. |
| 98 | 98 | * |
| 99 | 99 | * @param Member $member |
| 100 | - * @return boolean | string A time and date pair formatted as per user-defined settings. |
|
| 100 | + * @return false|string | string A time and date pair formatted as per user-defined settings. |
|
| 101 | 101 | */ |
| 102 | 102 | public function FormatFromSettings($member = null) { |
| 103 | 103 | require_once 'Zend/Date.php'; |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * Use {@link clear_mock_now()} to revert to the current system date. |
| 177 | 177 | * Caution: This sets a fixed date that doesn't increment with time. |
| 178 | 178 | * |
| 179 | - * @param SS_Datetime|string $datetime Either in object format, or as a SS_Datetime compatible string. |
|
| 179 | + * @param string $datetime Either in object format, or as a SS_Datetime compatible string. |
|
| 180 | 180 | */ |
| 181 | 181 | public static function set_mock_now($datetime) { |
| 182 | 182 | if($datetime instanceof SS_Datetime) { |
@@ -115,6 +115,9 @@ |
||
| 115 | 115 | $this->query("ALTER TABLE \"$tableName\" $alterations"); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $tableName |
|
| 120 | + */ |
|
| 118 | 121 | public function isView($tableName) { |
| 119 | 122 | $info = $this->query("SHOW /*!50002 FULL*/ TABLES LIKE '$tableName'")->record(); |
| 120 | 123 | return $info && strtoupper($info['Table_type']) == 'VIEW'; |
@@ -52,6 +52,9 @@ |
||
| 52 | 52 | return 0; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param integer $value |
|
| 57 | + */ |
|
| 55 | 58 | public function prepValueForDB($value) { |
| 56 | 59 | if($value === true) { |
| 57 | 60 | return 1; |
@@ -236,6 +236,8 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | /** |
| 239 | + * @param string $currency |
|
| 240 | + * @param string $locale |
|
| 239 | 241 | * @return string |
| 240 | 242 | */ |
| 241 | 243 | public function getSymbol($currency = null, $locale = null) { |
@@ -247,6 +249,8 @@ discard block |
||
| 247 | 249 | } |
| 248 | 250 | |
| 249 | 251 | /** |
| 252 | + * @param string $currency |
|
| 253 | + * @param string $locale |
|
| 250 | 254 | * @return string |
| 251 | 255 | */ |
| 252 | 256 | public function getShortName($currency = null, $locale = null) { |
@@ -257,6 +261,8 @@ discard block |
||
| 257 | 261 | } |
| 258 | 262 | |
| 259 | 263 | /** |
| 264 | + * @param string $currency |
|
| 265 | + * @param string $locale |
|
| 260 | 266 | * @return string |
| 261 | 267 | */ |
| 262 | 268 | public function getName($currency = null, $locale = null) { |
@@ -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); |