Completed
Push — namespace-model ( c67c40...018a87 )
by Sam
07:37
created
model/DatabaseAdmin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	/**
108 108
 	 * Gets the url to return to after build
109 109
 	 *
110
-	 * @return string|null
110
+	 * @return string
111 111
 	 */
112 112
 	protected function getReturnURL() {
113 113
 		$url = $this->request->getVar('returnURL');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
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() {
Please login to merge, or discard this patch.
model/queries/SQLExpression.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,6 @@
 block discarded – undo
125 125
 	 * Copies the query parameters contained in this object to another
126 126
 	 * SQLExpression
127 127
 	 *
128
-	 * @param SQLExpression $expression The object to copy properties to
129 128
 	 */
130 129
 	protected function copyTo(SQLExpression $object) {
131 130
 		$target = array_keys(get_object_vars($object));
Please login to merge, or discard this patch.
model/DB.php 1 patch
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -217,9 +217,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
500 499
 
501 500
 	/**
502 501
 	 * @deprecated since version 4.0 Use DB::require_field instead
502
+	 * @param string $table
503
+	 * @param string $field
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
model/DataQuery.php 1 patch
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * Create a new DataQuery.
45 45
 	 *
46 46
 	 * @param String The name of the DataObject class that you wish to query
47
+	 * @param string $dataClass
47 48
 	 */
48 49
 	public function __construct($dataClass) {
49 50
 		$this->dataClass = $dataClass;
@@ -166,7 +167,7 @@  discard block
 block discarded – undo
166 167
 	/**
167 168
 	 * Ensure that the query is ready to execute.
168 169
 	 *
169
-	 * @param array|null $queriedColumns Any columns to filter the query by
170
+	 * @param string[] $queriedColumns Any columns to filter the query by
170 171
 	 * @return SQLSelect The finalised sql query
171 172
 	 */
172 173
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -641,7 +642,7 @@  discard block
 block discarded – undo
641 642
 	 * mappings to the query object state. This has to be called
642 643
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
643 644
 	 *
644
-	 * @param String|array $relation The array/dot-syntax relation to follow
645
+	 * @param string $relation The array/dot-syntax relation to follow
645 646
 	 * @param bool $linearOnly Set to true to restrict to linear relations only. Set this
646 647
 	 * if this relation will be used for sorting, and should not include duplicate rows.
647 648
 	 * @return The model class of the related item
@@ -917,6 +918,7 @@  discard block
 block discarded – undo
917 918
 
918 919
 	/**
919 920
 	 * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query.
921
+	 * @param string $key
920 922
 	 */
921 923
 	public function getQueryParam($key) {
922 924
 		if(isset($this->queryParams[$key])) return $this->queryParams[$key];
@@ -949,6 +951,9 @@  discard block
 block discarded – undo
949 951
 	 */
950 952
 	protected $whereQuery;
951 953
 
954
+	/**
955
+	 * @param string $connective
956
+	 */
952 957
 	public function __construct(DataQuery $base, $connective) {
953 958
 		$this->dataClass = $base->dataClass;
954 959
 		$this->query = $base->query;
@@ -958,6 +963,9 @@  discard block
 block discarded – undo
958 963
 		$base->where($this);
959 964
 	}
960 965
 
966
+	/**
967
+	 * @param string $filter
968
+	 */
961 969
 	public function where($filter) {
962 970
 		if($filter) {
963 971
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.
model/connect/DBSchemaManager.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,6 @@  discard block
 block discarded – undo
40 40
 	/**
41 41
 	 * Injector injection point for database controller
42 42
 	 *
43
-	 * @param SS_Database $connector
44 43
 	 */
45 44
 	public function setDatabase(SS_Database $database) {
46 45
 		$this->database = $database;
@@ -478,7 +477,7 @@  discard block
 block discarded – undo
478 477
 	/**
479 478
 	 * Given an index spec determines the index type
480 479
 	 *
481
-	 * @param array|string $spec
480
+	 * @param string $spec
482 481
 	 * @return string
483 482
 	 */
484 483
 	protected function determineIndexType($spec) {
@@ -546,7 +545,7 @@  discard block
 block discarded – undo
546 545
 	/**
547 546
 	 * Returns true if the given table is exists in the current database
548 547
 	 *
549
-	 * @param string $table Name of table to check
548
+	 * @param string $tableName Name of table to check
550 549
 	 * @return boolean Flag indicating existence of table
551 550
 	 */
552 551
 	abstract public function hasTable($tableName);
Please login to merge, or discard this patch.
model/DataList.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * Returns a new DataList instance with the specified query parameter assigned
177 177
 	 *
178 178
 	 * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set
179
-	 * @param mixed $val If $keyOrArray is not an array, this is the value to set
179
+	 * @param string $val If $keyOrArray is not an array, this is the value to set
180 180
 	 * @return static
181 181
 	 */
182 182
 	public function setDataQueryParam($keyOrArray, $val = null) {
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 	 * Check if the given field specification could be interpreted as an unquoted relation name
540 540
 	 *
541 541
 	 * @param string $field
542
-	 * @return bool
542
+	 * @return integer
543 543
 	 */
544 544
 	protected function isValidRelationName($field) {
545 545
 		return preg_match('/^[A-Z0-9._]+$/i', $field);
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
655 655
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
656 656
 	 * ORM have a value of 10.
657
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
657
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
658 658
 	 * @return DataList
659 659
 	 */
660 660
 	public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
673 673
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
674 674
 	 * ORM have a value of 10.
675
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
675
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
676 676
 	 * @return DataList
677 677
 	 */
678 678
 	public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
 	/**
889 889
 	 * Restrict the columns to fetch into this DataList
890 890
 	 *
891
-	 * @param array $queriedColumns
891
+	 * @param string[] $queriedColumns
892 892
 	 * @return DataList
893 893
 	 */
894 894
 	public function setQueriedColumns($queriedColumns) {
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 	/**
1164 1164
 	 * Returns item stored in list with index $key
1165 1165
 	 *
1166
-	 * @param mixed $key
1166
+	 * @param integer $key
1167 1167
 	 * @return DataObject
1168 1168
 	 */
1169 1169
 	public function offsetGet($key) {
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -588,8 +588,8 @@  discard block
 block discarded – undo
588 588
 
589 589
 	/**
590 590
 	 * Helper function to duplicate relations from one object to another
591
-	 * @param $sourceObject the source object to duplicate from
592
-	 * @param $destinationObject the destination object to populate with the duplicated relations
591
+	 * @param DataObject $sourceObject the source object to duplicate from
592
+	 * @param DataObject $destinationObject the destination object to populate with the duplicated relations
593 593
 	 * @param $name the name of the relation to duplicate (e.g. members)
594 594
 	 */
595 595
 	private function duplicateRelations($sourceObject, $destinationObject, $name) {
@@ -987,6 +987,7 @@  discard block
 block discarded – undo
987 987
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
988 988
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
989 989
 	 *                            Only applicable with $priority='right'. (optional)
990
+	 * @param DataObject|null $rightObj
990 991
 	 * @return Boolean
991 992
 	 */
992 993
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -2272,6 +2273,7 @@  discard block
 block discarded – undo
2272 2273
 	 *
2273 2274
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2274 2275
 	 *
2276
+	 * @param string $class
2275 2277
 	 * @return array or false
2276 2278
 	 */
2277 2279
 	public function database_extensions($class){
@@ -3081,7 +3083,7 @@  discard block
 block discarded – undo
3081 3083
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3082 3084
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3083 3085
 	 *
3084
-	 * @param $fieldName string
3086
+	 * @param string $fieldName string
3085 3087
 	 * @return string | null - will return null on a missing value
3086 3088
 	 */
3087 3089
 	public function relField($fieldName) {
@@ -3360,6 +3362,7 @@  discard block
 block discarded – undo
3360 3362
 	/**
3361 3363
 	 * @see $sourceQueryParams
3362 3364
 	 * @param array
3365
+	 * @param string $key
3363 3366
 	 */
3364 3367
 	public function setSourceQueryParam($key, $value) {
3365 3368
 		$this->sourceQueryParams[$key] = $value;
@@ -3367,6 +3370,7 @@  discard block
 block discarded – undo
3367 3370
 
3368 3371
 	/**
3369 3372
 	 * @see $sourceQueryParams
3373
+	 * @param string $key
3370 3374
 	 * @return Mixed
3371 3375
 	 */
3372 3376
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.
model/HTMLValue.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	 * Make an xpath query against this HTML
153 153
 	 *
154 154
 	 * @param $query string - The xpath query string
155
-	 * @return DOMNodeList
155
+	 * @return \DOMNodeList
156 156
 	 */
157 157
 	public function query($query) {
158 158
 		$xp = new DOMXPath($this->getDocument());
Please login to merge, or discard this patch.
model/versioning/Versioned.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
 	/**
1063 1063
 	 * Find objects in the given relationships, merging them into the given list
1064 1064
 	 *
1065
-	 * @param array $source Config property to extract relationships from
1065
+	 * @param string $source Config property to extract relationships from
1066 1066
 	 * @param bool $recursive True if recursive
1067 1067
 	 * @param ArrayList $list Optional list to add items to
1068 1068
 	 * @return ArrayList The list
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
 	/**
1183 1183
 	 * Check if the current user can delete this record from live
1184 1184
 	 *
1185
-	 * @param null $member
1185
+	 * @param Member|null $member
1186 1186
 	 * @return mixed
1187 1187
 	 */
1188 1188
 	public function canUnpublish($member = null) {
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 	 * If extended, ensure that both canDelete and canUnpublish are extended also
1216 1216
 	 *
1217 1217
 	 * @param Member $member
1218
-	 * @return bool
1218
+	 * @return null|boolean
1219 1219
 	 */
1220 1220
 	public function canArchive($member = null) {
1221 1221
 		// Skip if invoked by extendedCan()
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
 	 * Extend permissions to include additional security for objects that are not published to live.
1293 1293
 	 *
1294 1294
 	 * @param Member $member
1295
-	 * @return bool|null
1295
+	 * @return false|null
1296 1296
 	 */
1297 1297
 	public function canView($member = null) {
1298 1298
 		// Invoke default version-gnostic canView
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
 	/**
2419 2419
 	 * Returns an array of possible stages.
2420 2420
 	 *
2421
-	 * @return array
2421
+	 * @return string[]
2422 2422
 	 */
2423 2423
 	public function getVersionedStages() {
2424 2424
 		if($this->hasStages()) {
Please login to merge, or discard this patch.