Completed
Push — 3.1 ( 730512...76ce9f )
by Damian
16s
created
model/ArrayList.php 1 patch
Doc Comments   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
 	/**
296 296
 	 * Find the first item of this list where the given key = value
297 297
 	 *
298
-	 * @param type $key
299
-	 * @param type $value
298
+	 * @param string $key
299
+	 * @param string $value
300 300
 	 * @return type 
301 301
 	 */
302 302
 	public function find($key, $value) {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	 * 
388 388
 	 * Note that columns may be double quoted as per ANSI sql standard
389 389
 	 *
390
-	 * @return DataList
390
+	 * @return ArrayList
391 391
 	 * @see SS_List::sort()
392 392
 	 * @example $list->sort('Name'); // default ASC sorting
393 393
 	 * @example $list->sort('Name DESC'); // DESC sorting
@@ -523,6 +523,9 @@  discard block
 block discarded – undo
523 523
 		return $list;
524 524
 	}
525 525
 	
526
+	/**
527
+	 * @param integer $id
528
+	 */
526 529
 	public function byID($id) {
527 530
 		$firstElement = $this->filter("ID", $id)->first();
528 531
 
@@ -624,7 +627,6 @@  discard block
 block discarded – undo
624 627
 	/**
625 628
 	 * Returns whether an item with $key exists
626 629
 	 * 
627
-	 * @param mixed $key
628 630
 	 * @return bool
629 631
 	 */
630 632
 	public function offsetExists($offset) {
@@ -634,7 +636,6 @@  discard block
 block discarded – undo
634 636
 	/**
635 637
 	 * Returns item stored in list with index $key
636 638
 	 * 
637
-	 * @param mixed $key
638 639
 	 * @return DataObject
639 640
 	 */
640 641
 	public function offsetGet($offset) {
@@ -644,7 +645,6 @@  discard block
 block discarded – undo
644 645
 	/**
645 646
 	 * Set an item with the key in $key
646 647
 	 * 
647
-	 * @param mixed $key
648 648
 	 * @param mixed $value
649 649
 	 */
650 650
 	public function offsetSet($offset, $value) {
@@ -658,7 +658,6 @@  discard block
 block discarded – undo
658 658
 	/**
659 659
 	 * Unset an item with the key in $key
660 660
 	 * 
661
-	 * @param mixed $key
662 661
 	 */
663 662
 	public function offsetUnset($offset) {
664 663
 		unset($this->items[$offset]);
Please login to merge, or discard this patch.
model/Database.php 1 patch
Doc Comments   +32 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,6 +145,8 @@  discard block
 block discarded – undo
145 145
 	
146 146
 	/**
147 147
 	 * Returns the enum values available on the given field
148
+	 * @param string $tableName
149
+	 * @param string $fieldName
148 150
 	 */
149 151
 	abstract public function enumValuesForField($tableName, $fieldName);
150 152
 	
@@ -255,6 +257,7 @@  discard block
 block discarded – undo
255 257
 	/**
256 258
 	 * @param string $table
257 259
 	 * @param string $options
260
+	 * @param boolean $advanced_options
258 261
 	 */
259 262
 	public function transCreateTable($table, $options = null, $advanced_options = null) {
260 263
 		$this->schemaUpdateTransaction[$table] = array(
@@ -269,6 +272,7 @@  discard block
 block discarded – undo
269 272
 	/**
270 273
 	 * @param string $table
271 274
 	 * @param array $options
275
+	 * @param boolean $advanced_options
272 276
 	 */
273 277
 	public function transAlterTable($table, $options, $advanced_options) {
274 278
 		$this->transInitTable($table);
@@ -276,18 +280,35 @@  discard block
 block discarded – undo
276 280
 		$this->schemaUpdateTransaction[$table]['advancedOptions'] = $advanced_options;
277 281
 	}
278 282
 	
283
+	/**
284
+	 * @param string $table
285
+	 * @param string $field
286
+	 */
279 287
 	public function transCreateField($table, $field, $schema) {
280 288
 		$this->transInitTable($table);
281 289
 		$this->schemaUpdateTransaction[$table]['newFields'][$field] = $schema;
282 290
 	}
291
+
292
+	/**
293
+	 * @param string $table
294
+	 */
283 295
 	public function transCreateIndex($table, $index, $schema) {
284 296
 		$this->transInitTable($table);
285 297
 		$this->schemaUpdateTransaction[$table]['newIndexes'][$index] = $schema;
286 298
 	}
299
+
300
+	/**
301
+	 * @param string $table
302
+	 * @param string $field
303
+	 */
287 304
 	public function transAlterField($table, $field, $schema) {
288 305
 		$this->transInitTable($table);
289 306
 		$this->schemaUpdateTransaction[$table]['alteredFields'][$field] = $schema;
290 307
 	}
308
+
309
+	/**
310
+	 * @param string $table
311
+	 */
291 312
 	public function transAlterIndex($table, $index, $schema) {
292 313
 		$this->transInitTable($table);
293 314
 		$this->schemaUpdateTransaction[$table]['alteredIndexes'][$index] = $schema;
@@ -319,7 +340,7 @@  discard block
 block discarded – undo
319 340
 	 * @param string $table The name of the table
320 341
 	 * @param string $fieldSchema A list of the fields to create, in the same form as DataObject::$db
321 342
 	 * @param string $indexSchema A list of indexes to create. See {@link requireIndex()}
322
-	 * @param array $options
343
+	 * @param string|null $options
323 344
 	 */
324 345
 	public function requireTable($table, $fieldSchema = null, $indexSchema = null, $hasAutoIncPK=true,
325 346
 			$options = Array(), $extensions=false) {
@@ -786,6 +807,7 @@  discard block
 block discarded – undo
786 807
 	 * Returns the WHERE clauses ready for inserting into a query.
787 808
 	 * Caution: Expects correctly quoted and escaped SQL fragments.
788 809
 	 * 
810
+	 * @param string $connective
789 811
 	 * @return string
790 812
 	 */
791 813
 	public function sqlWhereToString($where, $connective) {
@@ -944,6 +966,7 @@  discard block
 block discarded – undo
944 966
 	 * - minutes
945 967
 	 * - seconds
946 968
 	 * This includes the singular forms as well
969
+	 * @param string $date
947 970
 	 * @return string SQL datetime expression to query for a datetime (YYYY-MM-DD hh:mm:ss) which is the result of
948 971
 	 *                the addition
949 972
 	 */
@@ -956,6 +979,7 @@  discard block
 block discarded – undo
956 979
 	 *                       e.g. '"SiteTree"."Created"'
957 980
 	 * @param string $date2 to be substracted of $date1, can be either 'now', literal datetime
958 981
 	 *                      like '1973-10-14 10:30:00' or field name, e.g. '"SiteTree"."Created"'
982
+	 * @param string $date1
959 983
 	 * @return string SQL datetime expression to query for the interval between $date1 and $date2 in seconds which
960 984
 	 *                is the result of the substraction
961 985
 	 */
@@ -986,6 +1010,10 @@  discard block
 block discarded – undo
986 1010
 	/*
987 1011
 	 * Create a savepoint that you can jump back to if you encounter problems
988 1012
 	 */
1013
+
1014
+	/**
1015
+	 * @param string $savepoint
1016
+	 */
989 1017
 	abstract public function transactionSavepoint($savepoint);
990 1018
 
991 1019
 	/*
@@ -1015,6 +1043,7 @@  discard block
 block discarded – undo
1015 1043
 	 * Returns if the lock is available.
1016 1044
 	 * See {@link supportsLocks()} to check if locking is generally supported.
1017 1045
 	 * 
1046
+	 * @param string $name
1018 1047
 	 * @return Boolean
1019 1048
 	 */
1020 1049
 	public function canLock($name) {
@@ -1036,6 +1065,7 @@  discard block
 block discarded – undo
1036 1065
 	 * 
1037 1066
 	 * @param String
1038 1067
 	 * @param Int Timeout in seconds
1068
+	 * @param string $name
1039 1069
 	 * @return Boolean
1040 1070
 	 */
1041 1071
 	public function getLock($name, $timeout = 5) {
@@ -1047,6 +1077,7 @@  discard block
 block discarded – undo
1047 1077
 	 * (if the execution aborts (e.g. due to an error) all locks are automatically released).
1048 1078
 	 * 
1049 1079
 	 * @param String
1080
+	 * @param string $name
1050 1081
 	 * @return Boolean
1051 1082
 	 */
1052 1083
 	public function releaseLock($name) {
Please login to merge, or discard this patch.
model/DataDifferencer.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,8 @@
 block discarded – undo
46 46
 	 * If $fromRecord is null, this will represent a "creation".
47 47
 	 * 
48 48
 	 * @param DataObject (Optional)
49
-	 * @param DataObject 
49
+	 * @param DataObject
50
+	 * @param DataObject|null $fromRecord 
50 51
 	 */
51 52
 	public function __construct($fromRecord, DataObject $toRecord) {
52 53
 		if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING);
Please login to merge, or discard this patch.
model/DataList.php 1 patch
Doc Comments   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -153,6 +153,9 @@  discard block
 block discarded – undo
153 153
 		return $clone;
154 154
 	}
155 155
 
156
+	/**
157
+	 * @param string $val
158
+	 */
156 159
 	public function setDataQueryParam($keyOrArray, $val = null) {
157 160
 		$clone = clone $this;
158 161
 
@@ -171,7 +174,7 @@  discard block
 block discarded – undo
171 174
 	/**
172 175
 	 * Returns the SQL query that will be used to get this DataList's records.  Good for debugging. :-)
173 176
 	 * 
174
-	 * @return SQLQuery
177
+	 * @return string
175 178
 	 */
176 179
 	public function sql() {
177 180
 		return $this->dataQuery->query()->sql();
@@ -716,7 +719,7 @@  discard block
 block discarded – undo
716 719
 	 * Return the maximum value of the given field in this DataList
717 720
 	 *
718 721
 	 * @param string $fieldName
719
-	 * @return mixed
722
+	 * @return string
720 723
 	 */
721 724
 	public function max($fieldName) {
722 725
 		return $this->dataQuery->max($fieldName);
@@ -726,7 +729,7 @@  discard block
 block discarded – undo
726 729
 	 * Return the minimum value of the given field in this DataList
727 730
 	 *
728 731
 	 * @param string $fieldName
729
-	 * @return mixed
732
+	 * @return string
730 733
 	 */
731 734
 	public function min($fieldName) {
732 735
 		return $this->dataQuery->min($fieldName);
@@ -736,7 +739,7 @@  discard block
 block discarded – undo
736 739
 	 * Return the average value of the given field in this DataList
737 740
 	 * 
738 741
 	 * @param string $fieldName
739
-	 * @return mixed
742
+	 * @return string
740 743
 	 */
741 744
 	public function avg($fieldName) {
742 745
 		return $this->dataQuery->avg($fieldName);
@@ -746,7 +749,7 @@  discard block
 block discarded – undo
746 749
 	 * Return the sum of the values of the given field in this DataList
747 750
 	 * 
748 751
 	 * @param string $fieldName
749
-	 * @return mixed
752
+	 * @return string
750 753
 	 */
751 754
 	public function sum($fieldName) {
752 755
 		return $this->dataQuery->sum($fieldName);
@@ -817,7 +820,7 @@  discard block
 block discarded – undo
817 820
 	/**
818 821
 	 * Restrict the columns to fetch into this DataList
819 822
 	 *
820
-	 * @param array $queriedColumns
823
+	 * @param string[] $queriedColumns
821 824
 	 * @return DataList
822 825
 	 */
823 826
 	public function setQueriedColumns($queriedColumns) {
@@ -1093,7 +1096,7 @@  discard block
 block discarded – undo
1093 1096
 	/**
1094 1097
 	 * Returns item stored in list with index $key
1095 1098
 	 * 
1096
-	 * @param mixed $key
1099
+	 * @param integer $key
1097 1100
 	 * @return DataObject
1098 1101
 	 */
1099 1102
 	public function offsetGet($key) {
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -307,6 +307,8 @@  discard block
 block discarded – undo
307 307
 	/**
308 308
 	 * Returns the field class if the given db field on the class is a composite field.
309 309
 	 * Will check all applicable ancestor classes and aggregate results.
310
+	 * @param string $class
311
+	 * @param string $name
310 312
 	 */
311 313
 	public static function is_composite_field($class, $name, $aggregated = true) {
312 314
 		$key = $class . '_' . $name . '_' . (string)$aggregated;
@@ -497,7 +499,7 @@  discard block
 block discarded – undo
497 499
 	 * The destinationObject must be written to the database already and have an ID. Writing is performed
498 500
 	 * automatically when adding the new relations.
499 501
 	 *
500
-	 * @param $sourceObject the source object to duplicate from
502
+	 * @param DataObject $sourceObject the source object to duplicate from
501 503
 	 * @param $destinationObject the destination object to populate with the duplicated relations
502 504
 	 * @return DataObject with the new many_many relations copied in
503 505
 	 */
@@ -800,7 +802,7 @@  discard block
 block discarded – undo
800 802
 	 * This function is similar to toMap() but doesn't trigger the lazy-loading of all unfetched fields.
801 803
 	 * Obviously, this makes it a lot faster.
802 804
 	 *
803
-	 * @return array The data as a map.
805
+	 * @return boolean The data as a map.
804 806
 	 */
805 807
 	public function getQueriedDatabaseFields() {
806 808
 		return $this->record;
@@ -901,6 +903,7 @@  discard block
 block discarded – undo
901 903
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
902 904
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
903 905
 	 *                            Only applicable with $priority='right'. (optional)
906
+	 * @param DataObject|null $rightObj
904 907
 	 * @return Boolean
905 908
 	 */
906 909
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1454,7 +1457,7 @@  discard block
 block discarded – undo
1454 1457
 	 *
1455 1458
 	 * @param string $componentName Name of the component
1456 1459
 	 * @param string $filter A filter to be inserted into the WHERE clause
1457
-	 * @param string|array $sort A sort expression to be inserted into the ORDER BY clause. If omitted, the static
1460
+	 * @param string $sort A sort expression to be inserted into the ORDER BY clause. If omitted, the static
1458 1461
 	 *                           field $default_sort on the component class will be used.
1459 1462
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1460 1463
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause
@@ -1506,7 +1509,7 @@  discard block
 block discarded – undo
1506 1509
 	/**
1507 1510
 	 * Find the foreign class of a relation on this DataObject, regardless of the relation type.
1508 1511
 	 *
1509
-	 * @param $relationName Relation name.
1512
+	 * @param string $relationName Relation name.
1510 1513
 	 * @return string Class name, or null if not found.
1511 1514
 	 */
1512 1515
 	public function getRelationClass($relationName) {
@@ -1916,6 +1919,7 @@  discard block
 block discarded – undo
1916 1919
 	 *
1917 1920
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
1918 1921
 	 *
1922
+	 * @param string $class
1919 1923
 	 * @return array or false
1920 1924
 	 */
1921 1925
 	public function database_extensions($class){
@@ -2374,7 +2378,7 @@  discard block
 block discarded – undo
2374 2378
 	 * can be saved into the Image table.
2375 2379
 	 *
2376 2380
 	 * @param string $fieldName Name of the field
2377
-	 * @param mixed $value New field value
2381
+	 * @param mixed $val New field value
2378 2382
 	 * @return DataObject $this
2379 2383
 	 */
2380 2384
 	public function setCastedField($fieldName, $val) {
@@ -2749,6 +2753,7 @@  discard block
 block discarded – undo
2749 2753
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
2750 2754
 	 *
2751 2755
 	 * @param $fieldPath string
2756
+	 * @param string $fieldName
2752 2757
 	 * @return string | null - will return null on a missing value
2753 2758
 	 */
2754 2759
 	public function relField($fieldName) {
@@ -2864,6 +2869,7 @@  discard block
 block discarded – undo
2864 2869
 
2865 2870
 	/**
2866 2871
 	 * @deprecated 3.1 Use DataList::create and DataList to do your querying
2872
+	 * @param string $class
2867 2873
 	 */
2868 2874
 	public function Aggregate($class = null) {
2869 2875
 		Deprecation::notice('3.1', 'Call aggregate methods on a DataList directly instead. In templates'
@@ -2885,6 +2891,7 @@  discard block
 block discarded – undo
2885 2891
 
2886 2892
 	/**
2887 2893
 	 * @deprecated 3.1 Use DataList::create and DataList to do your querying
2894
+	 * @param string $relationship
2888 2895
 	 */
2889 2896
 	public function RelationshipAggregate($relationship) {
2890 2897
 		Deprecation::notice('3.1', 'Call aggregate methods on a relationship directly instead.');
@@ -3052,6 +3059,7 @@  discard block
 block discarded – undo
3052 3059
 
3053 3060
 	/**
3054 3061
 	 * @see $sourceQueryParams
3062
+	 * @param string $key
3055 3063
 	 * @return Mixed
3056 3064
 	 */
3057 3065
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.
model/DataQuery.php 1 patch
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,6 +140,7 @@  discard block
 block discarded – undo
140 140
 	/**
141 141
 	 * Ensure that the query is ready to execute.
142 142
 	 *
143
+	 * @param string[] $queriedColumns
143 144
 	 * @return SQLQuery
144 145
 	 */
145 146
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -381,6 +382,7 @@  discard block
 block discarded – undo
381 382
 
382 383
 	/**
383 384
 	 * Runs a raw aggregate expression.  Please handle escaping yourself
385
+	 * @param string $expression
384 386
 	 */
385 387
 	public function aggregate($expression) {
386 388
 		return $this->getFinalisedQuery()->aggregate($expression)->execute()->value();
@@ -483,7 +485,6 @@  discard block
 block discarded – undo
483 485
 	 *  $query->where(array("\"Column\" = 'Value'", "\"Column\" != 'Value'"));
484 486
 	 * </code>
485 487
 	 *
486
-	 * @param string|array $where Predicate(s) to set, as escaped SQL statements.
487 488
 	 */
488 489
 	public function where($filter) {
489 490
 		if($filter) {
@@ -593,7 +594,7 @@  discard block
 block discarded – undo
593 594
 	 * mappings to the query object state. This has to be called
594 595
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
595 596
 	 *
596
-	 * @param String|array $relation The array/dot-syntax relation to follow
597
+	 * @param string $relation The array/dot-syntax relation to follow
597 598
 	 * @return The model class of the related item
598 599
 	 */
599 600
 	public function applyRelation($relation) {
@@ -770,6 +771,7 @@  discard block
 block discarded – undo
770 771
 
771 772
 	/**
772 773
 	 * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query.
774
+	 * @param string $key
773 775
 	 */
774 776
 	public function getQueryParam($key) {
775 777
 		if(isset($this->queryParams[$key])) return $this->queryParams[$key];
@@ -800,6 +802,9 @@  discard block
 block discarded – undo
800 802
 
801 803
 	protected $whereQuery;
802 804
 
805
+	/**
806
+	 * @param string $connective
807
+	 */
803 808
 	public function __construct(DataQuery $base, $connective) {
804 809
 		$this->dataClass = $base->dataClass;
805 810
 		$this->query = $base->query;
@@ -821,7 +826,7 @@  discard block
 block discarded – undo
821 826
 	 *  $query->where(array("\"Column\" = 'Value'", "\"Column\" != 'Value'"));
822 827
 	 * </code>
823 828
 	 *
824
-	 * @param string|array $where Predicate(s) to set, as escaped SQL statements.
829
+	 * @param string $filter
825 830
 	 */
826 831
 	public function where($filter) {
827 832
 		if($filter) {
Please login to merge, or discard this patch.
model/DB.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,9 +155,8 @@
 block discarded – undo
155 155
 	 * Given the database configuration, this method will create the correct 
156 156
 	 * subclass of {@link SS_Database}.
157 157
 	 *
158
-	 * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the
158
+	 * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the
159 159
 	 *                        rest of the options, see the specific class.
160
-	 * @param string $name identifier for the connection
161 160
 	 *
162 161
 	 * @return SS_Database
163 162
 	 */
Please login to merge, or discard this patch.
model/fieldtypes/Decimal.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	 * @param string $name
16 16
 	 * @param int $wholeSize
17 17
 	 * @param int $decimalSize
18
-	 * @param float $defaultValue
18
+	 * @param integer $defaultValue
19 19
 	 */
20 20
 	public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) {
21 21
 		$this->wholeSize = is_int($wholeSize) ? $wholeSize : 9;
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 	}
28 28
 	
29 29
 	/**
30
-	 * @return float
30
+	 * @return string
31 31
 	 */
32 32
 	public function Nice() {
33 33
 		return number_format($this->value, $this->decimalSize);
34 34
 	}
35 35
 	
36 36
 	/**
37
-	 * @return int
37
+	 * @return double
38 38
 	 */
39 39
 	public function Int() {
40 40
 		return floor($this->value);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	/**
83
-	 * @return float
83
+	 * @return string
84 84
 	 */
85 85
 	public function nullValue() {
86 86
 		return "0.00";
Please login to merge, or discard this patch.
model/Image.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * An image exists if it has a filename.
127 127
 	 * Does not do any filesystem checks.
128 128
 	 * 
129
-	 * @return boolean
129
+	 * @return boolean|null
130 130
 	 */
131 131
 	public function exists() {
132 132
 		if(isset($this->record["Filename"])) {
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 	
647 647
 	/**
648 648
 	 * Get the orientation of this image.
649
-	 * @return ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
649
+	 * @return integer | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
650 650
 	 */
651 651
 	public function getOrientation() {
652 652
 		$width = $this->getWidth();
Please login to merge, or discard this patch.