Completed
Push — src-folder ( e05626...8b780d )
by Damian
11:23
created
src/ORM/Connect/MySQLSchemaManager.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -115,6 +115,9 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
src/ORM/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.
src/ORM/DataExtension.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -78,9 +78,15 @@
 block discarded – undo
78 78
 	public function can($member) {
79 79
 	}
80 80
 
81
+	/**
82
+	 * @param \SilverStripe\Security\Member|null $member
83
+	 */
81 84
 	public function canEdit($member) {
82 85
 	}
83 86
 
87
+	/**
88
+	 * @param \SilverStripe\Security\Member|null $member
89
+	 */
84 90
 	public function canDelete($member) {
85 91
 	}
86 92
 
Please login to merge, or discard this patch.
src/ORM/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.
src/ORM/DataObject.php 1 patch
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2712,6 +2712,7 @@  discard block
 block discarded – undo
2712 2712
 
2713 2713
 	/**
2714 2714
 	 * {@inheritdoc}
2715
+	 * @param string $field
2715 2716
 	 */
2716 2717
 	public function castingHelper($field) {
2717 2718
 		if ($fieldSpec = $this->db($field)) {
@@ -2916,7 +2917,7 @@  discard block
 block discarded – undo
2916 2917
 
2917 2918
 	/**
2918 2919
 	 * @param Member $member
2919
-	 * @return boolean
2920
+	 * @return boolean|string
2920 2921
 	 */
2921 2922
 	public function canView($member = null) {
2922 2923
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2928,7 +2929,7 @@  discard block
 block discarded – undo
2928 2929
 
2929 2930
 	/**
2930 2931
 	 * @param Member $member
2931
-	 * @return boolean
2932
+	 * @return boolean|string
2932 2933
 	 */
2933 2934
 	public function canEdit($member = null) {
2934 2935
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2940,7 +2941,7 @@  discard block
 block discarded – undo
2940 2941
 
2941 2942
 	/**
2942 2943
 	 * @param Member $member
2943
-	 * @return boolean
2944
+	 * @return boolean|string
2944 2945
 	 */
2945 2946
 	public function canDelete($member = null) {
2946 2947
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2954,7 +2955,7 @@  discard block
 block discarded – undo
2954 2955
 	 * @param Member $member
2955 2956
 	 * @param array $context Additional context-specific data which might
2956 2957
 	 * affect whether (or where) this object could be created.
2957
-	 * @return boolean
2958
+	 * @return boolean|string
2958 2959
 	 */
2959 2960
 	public function canCreate($member = null, $context = array()) {
2960 2961
 		$extended = $this->extendedCan(__FUNCTION__, $member, $context);
@@ -3058,7 +3059,7 @@  discard block
 block discarded – undo
3058 3059
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3059 3060
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3060 3061
 	 *
3061
-	 * @param $fieldName string
3062
+	 * @param string $fieldName string
3062 3063
 	 * @return string | null - will return null on a missing value
3063 3064
 	 */
3064 3065
 	public function relField($fieldName) {
@@ -3128,7 +3129,7 @@  discard block
 block discarded – undo
3128 3129
 	 * @param string $callerClass The class of objects to be returned
3129 3130
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3130 3131
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
3131
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3132
+	 * @param string $sort A sort expression to be inserted into the ORDER
3132 3133
 	 * BY clause.  If omitted, self::$default_sort will be used.
3133 3134
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3134 3135
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
Please login to merge, or discard this patch.
src/ORM/DataObjectSchema.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 	/**
130 130
 	 *
131 131
 	 * @param GridField $gridField
132
-	 * @return array
132
+	 * @return string[]
133 133
 	 */
134 134
 	public function getActions($gridField) {
135 135
 		return array('addto');
Please login to merge, or discard this patch.
src/ORM/DataQuery.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	/**
99 99
 	 * Remove a filter from the query
100 100
 	 *
101
-	 * @param string|array $fieldExpression The predicate of the condition to remove
101
+	 * @param string|null $fieldExpression The predicate of the condition to remove
102 102
 	 * (ignoring parameters). The expression will be considered a match if it's
103 103
 	 * contained within any other predicate.
104 104
 	 * @return DataQuery Self reference
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	/**
178 178
 	 * Ensure that the query is ready to execute.
179 179
 	 *
180
-	 * @param array|null $queriedColumns Any columns to filter the query by
180
+	 * @param string[] $queriedColumns Any columns to filter the query by
181 181
 	 * @return SQLSelect The finalised sql query
182 182
 	 */
183 183
 	public function getFinalisedQuery($queriedColumns = null) {
Please login to merge, or discard this patch.
src/ORM/FieldType/DBClassName.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -186,6 +186,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ORM/FieldType/DBComposite.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -208,6 +208,9 @@
 block discarded – undo
208 208
 		return null;
209 209
 	}
210 210
 
211
+	/**
212
+	 * @param string $field
213
+	 */
211 214
 	public function hasField($field) {
212 215
 		$fields = $this->compositeDatabaseFields();
213 216
 		return isset($fields[$field]);
Please login to merge, or discard this patch.