Completed
Push — php7-support ( bade7c...b575ec )
by Sam
09:41
created
model/DataList.php 1 patch
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
model/DataObject.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use SilverStripe\Model\FieldType\DBPolymorphicForeignKey;
4 3
 use SilverStripe\Model\FieldType\DBField;
5 4
 use SilverStripe\Model\FieldType\DBDatetime;
6
-use SilverStripe\Model\FieldType\DBPrimaryKey;
7 5
 use SilverStripe\Model\FieldType\DBComposite;
8 6
 
9 7
 /**
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
 
559 559
 	/**
560 560
 	 * Helper function to duplicate relations from one object to another
561
-	 * @param $sourceObject the source object to duplicate from
562
-	 * @param $destinationObject the destination object to populate with the duplicated relations
561
+	 * @param DataObject $sourceObject the source object to duplicate from
562
+	 * @param DataObject $destinationObject the destination object to populate with the duplicated relations
563 563
 	 * @param $name the name of the relation to duplicate (e.g. members)
564 564
 	 */
565 565
 	private function duplicateRelations($sourceObject, $destinationObject, $name) {
@@ -939,6 +939,7 @@  discard block
 block discarded – undo
939 939
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
940 940
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
941 941
 	 *                            Only applicable with $priority='right'. (optional)
942
+	 * @param DataObject|null $rightObj
942 943
 	 * @return Boolean
943 944
 	 */
944 945
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1626,7 +1627,7 @@  discard block
 block discarded – undo
1626 1627
 	/**
1627 1628
 	 * Find the foreign class of a relation on this DataObject, regardless of the relation type.
1628 1629
 	 *
1629
-	 * @param $relationName Relation name.
1630
+	 * @param string $relationName Relation name.
1630 1631
 	 * @return string Class name, or null if not found.
1631 1632
 	 */
1632 1633
 	public function getRelationClass($relationName) {
@@ -2093,6 +2094,7 @@  discard block
 block discarded – undo
2093 2094
 	 *
2094 2095
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2095 2096
 	 *
2097
+	 * @param string $class
2096 2098
 	 * @return array or false
2097 2099
 	 */
2098 2100
 	public function database_extensions($class){
@@ -2901,7 +2903,7 @@  discard block
 block discarded – undo
2901 2903
 	 * Traverses to a field referenced by relationships between data objects, returning the value
2902 2904
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
2903 2905
 	 *
2904
-	 * @param $fieldName string
2906
+	 * @param string $fieldName string
2905 2907
 	 * @return string | null - will return null on a missing value
2906 2908
 	 */
2907 2909
 	public function relField($fieldName) {
@@ -2970,7 +2972,7 @@  discard block
 block discarded – undo
2970 2972
 	 * @param string $callerClass The class of objects to be returned
2971 2973
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
2972 2974
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
2973
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
2975
+	 * @param string $sort A sort expression to be inserted into the ORDER
2974 2976
 	 * BY clause.  If omitted, self::$default_sort will be used.
2975 2977
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
2976 2978
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3180,6 +3182,8 @@  discard block
 block discarded – undo
3180 3182
 	/**
3181 3183
 	 * @see $sourceQueryParams
3182 3184
 	 * @param array
3185
+	 * @param string $key
3186
+	 * @param string $value
3183 3187
 	 */
3184 3188
 	public function setSourceQueryParam($key, $value) {
3185 3189
 		$this->sourceQueryParams[$key] = $value;
@@ -3187,6 +3191,7 @@  discard block
 block discarded – undo
3187 3191
 
3188 3192
 	/**
3189 3193
 	 * @see $sourceQueryParams
3194
+	 * @param string $key
3190 3195
 	 * @return Mixed
3191 3196
 	 */
3192 3197
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.
model/Hierarchy.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -707,7 +707,7 @@
 block discarded – undo
707 707
 	 * Get the next node in the tree of the type. If there is no instance of the className descended from this node,
708 708
 	 * then search the parents.
709 709
 	 * @param string $className Class name of the node to find.
710
-	 * @param string|int $root ID/ClassName of the node to limit the search to
710
+	 * @param integer $root ID/ClassName of the node to limit the search to
711 711
 	 * @param DataObject afterNode Used for recursive calls to this function
712 712
 	 * @return DataObject
713 713
 	 */
Please login to merge, or discard this patch.
model/queries/SQLAssignmentRow.php 1 patch
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -74,9 +74,6 @@
 block discarded – undo
74 74
 	 * Given a list of assignments in any user-acceptible format, normalise the
75 75
 	 * value to a common array('SQL' => array(parameters)) format
76 76
 	 *
77
-	 * @param array $predicates List of assignments.
78
-	 * The key of this array should be the field name, and the value the assigned
79
-	 * literal value, or an array with parameterised information.
80 77
 	 * @return array List of normalised assignments
81 78
 	 */
82 79
 	protected function normaliseAssignments(array $assignments) {
Please login to merge, or discard this patch.
model/queries/SQLConditionalExpression.php 1 patch
Doc Comments   -4 removed lines patch added patch discarded remove patch
@@ -374,7 +374,6 @@  discard block
 block discarded – undo
374 374
 	 * @see SQLConditionalExpression::addWhere() for syntax examples
375 375
 	 *
376 376
 	 * @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries
377
-	 * @param mixed $where,... Unlimited additional predicates
378 377
 	 * @return self Self reference
379 378
 	 */
380 379
 	public function setWhere($where) {
@@ -460,7 +459,6 @@  discard block
 block discarded – undo
460 459
 	 * </code>
461 460
 	 *
462 461
 	 * @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries
463
-	 * @param mixed $where,... Unlimited additional predicates
464 462
 	 * @return self Self reference
465 463
 	 */
466 464
 	public function addWhere($where) {
@@ -476,7 +474,6 @@  discard block
 block discarded – undo
476 474
 	 * @see SQLConditionalExpression::addWhere()
477 475
 	 *
478 476
 	 * @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries
479
-	 * @param mixed $filters,... Unlimited additional predicates
480 477
 	 * @return self Self reference
481 478
 	 */
482 479
 	public function setWhereAny($filters) {
@@ -490,7 +487,6 @@  discard block
 block discarded – undo
490 487
 	 * @see SQLConditionalExpression::addWhere()
491 488
 	 *
492 489
 	 * @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries
493
-	 * @param mixed $filters,... Unlimited additional predicates
494 490
 	 * @return self Self reference
495 491
 	 */
496 492
 	public function addWhereAny($filters) {
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/URLSegmentFilter.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	protected $transliterator;
107 107
 
108 108
 	/**
109
-	 * @return SS_Transliterator|NULL
109
+	 * @return SS_Transliterator
110 110
 	 */
111 111
 	public function getTransliterator() {
112 112
 		if($this->transliterator === null && $this->config()->default_use_transliterator) {
@@ -129,6 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 	/**
131 131
 	 * @param boolean
132
+	 * @param boolean $bool
132 133
 	 */
133 134
 	public function setAllowMultibyte($bool) {
134 135
 		$this->allowMultibyte = $bool;
Please login to merge, or discard this patch.
search/filters/ComparisonFilter.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * Handles SQL escaping for both numeric and string values
35 35
 	 *
36 36
 	 * @param DataQuery $query
37
-	 * @return $this|DataQuery
37
+	 * @return DataQuery
38 38
 	 */
39 39
 	protected function applyOne(DataQuery $query) {
40 40
 		$this->model = $query->applyRelation($this->relation);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * Handles SQL escaping for both numeric and string values
51 51
 	 *
52 52
 	 * @param DataQuery $query
53
-	 * @return $this|DataQuery
53
+	 * @return DataQuery
54 54
 	 */
55 55
 	protected function excludeOne(DataQuery $query) {
56 56
 		$this->model = $query->applyRelation($this->relation);
Please login to merge, or discard this patch.
search/filters/SearchFilter.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 *  column. Can contain a relation name in dot notation, which will automatically join
48 48
 	 *  the necessary tables (e.g. "Comments.Name" to join the "Comments" has-many relationship and
49 49
 	 *  search the "Name" column when applying this filter to a SiteTree class).
50
-	 * @param mixed $value
50
+	 * @param string $value
51 51
 	 * @param array $modifiers
52 52
 	 */
53 53
 	public function __construct($fullName, $value = false, array $modifiers = array()) {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	/**
288 288
 	 * Determines case sensitivity based on {@link getModifiers()}.
289 289
 	 *
290
-	 * @return Mixed TRUE or FALSE to enforce sensitivity, NULL to use field collation.
290
+	 * @return boolean|null TRUE or FALSE to enforce sensitivity, NULL to use field collation.
291 291
 	 */
292 292
 	protected function getCaseSensitive() {
293 293
 		$modifiers = $this->getModifiers();
Please login to merge, or discard this patch.