Completed
Pull Request — master (#6266)
by Sam
13:07
created
src/ORM/Connect/Database.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -718,7 +718,7 @@
 block discarded – undo
718 718
 	 * @param boolean $create Flag indicating whether the database should be created
719 719
 	 * if it doesn't exist. If $create is false and the database doesn't exist
720 720
 	 * then an error will be raised
721
-	 * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error
721
+	 * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error
722 722
 	 * should be raised
723 723
 	 * @return boolean Flag indicating success
724 724
 	 */
Please login to merge, or discard this patch.
src/ORM/Connect/DBSchemaManager.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 *   - array('fields' => array('A','B','C'), 'type' => 'index/unique/fulltext'): This gives you full
296 296
 	 *     control over the index.
297 297
 	 * @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type
298
-	 * @param array $options Create table options (ENGINE, etc.)
298
+	 * @param string|null $options Create table options (ENGINE, etc.)
299 299
 	 * @param array|bool $extensions List of extensions
300 300
 	 */
301 301
 	public function requireTable($table, $fieldSchema = null, $indexSchema = null, $hasAutoIncPK = true,
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 	/**
481 481
 	 * Given an index spec determines the index type
482 482
 	 *
483
-	 * @param array|string $spec
483
+	 * @param string $spec
484 484
 	 * @return string
485 485
 	 */
486 486
 	protected function determineIndexType($spec) {
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 	 *
576 576
 	 * @param string $table The table name.
577 577
 	 * @param string $field The field name.
578
-	 * @param array|string $spec The field specification. If passed in array syntax, the specific database
578
+	 * @param string $spec The field specification. If passed in array syntax, the specific database
579 579
 	 * 	driver takes care of the ALTER TABLE syntax. If passed as a string, its assumed to
580 580
 	 * 	be prepared as a direct SQL framgment ready for insertion into ALTER TABLE. In this case you'll
581 581
 	 * 	need to take care of database abstraction in your DBField subclass.
Please login to merge, or discard this patch.
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
@@ -2716,6 +2716,7 @@  discard block
 block discarded – undo
2716 2716
 
2717 2717
 	/**
2718 2718
 	 * {@inheritdoc}
2719
+	 * @param string $field
2719 2720
 	 */
2720 2721
 	public function castingHelper($field) {
2721 2722
 		if ($fieldSpec = $this->db($field)) {
@@ -2920,7 +2921,7 @@  discard block
 block discarded – undo
2920 2921
 
2921 2922
 	/**
2922 2923
 	 * @param Member $member
2923
-	 * @return boolean
2924
+	 * @return boolean|string
2924 2925
 	 */
2925 2926
 	public function canView($member = null) {
2926 2927
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2932,7 +2933,7 @@  discard block
 block discarded – undo
2932 2933
 
2933 2934
 	/**
2934 2935
 	 * @param Member $member
2935
-	 * @return boolean
2936
+	 * @return boolean|string
2936 2937
 	 */
2937 2938
 	public function canEdit($member = null) {
2938 2939
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2944,7 +2945,7 @@  discard block
 block discarded – undo
2944 2945
 
2945 2946
 	/**
2946 2947
 	 * @param Member $member
2947
-	 * @return boolean
2948
+	 * @return boolean|string
2948 2949
 	 */
2949 2950
 	public function canDelete($member = null) {
2950 2951
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2958,7 +2959,7 @@  discard block
 block discarded – undo
2958 2959
 	 * @param Member $member
2959 2960
 	 * @param array $context Additional context-specific data which might
2960 2961
 	 * affect whether (or where) this object could be created.
2961
-	 * @return boolean
2962
+	 * @return boolean|string
2962 2963
 	 */
2963 2964
 	public function canCreate($member = null, $context = array()) {
2964 2965
 		$extended = $this->extendedCan(__FUNCTION__, $member, $context);
@@ -3062,7 +3063,7 @@  discard block
 block discarded – undo
3062 3063
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3063 3064
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3064 3065
 	 *
3065
-	 * @param $fieldName string
3066
+	 * @param string $fieldName string
3066 3067
 	 * @return string | null - will return null on a missing value
3067 3068
 	 */
3068 3069
 	public function relField($fieldName) {
@@ -3132,7 +3133,7 @@  discard block
 block discarded – undo
3132 3133
 	 * @param string $callerClass The class of objects to be returned
3133 3134
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3134 3135
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
3135
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3136
+	 * @param string $sort A sort expression to be inserted into the ORDER
3136 3137
 	 * BY clause.  If omitted, self::$default_sort will be used.
3137 3138
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3138 3139
 	 * @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.