Completed
Pull Request — master (#5771)
by Florian
12:04
created
ORM/Connect/Database.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 	 * @param boolean $create Flag indicating whether the database should be created
647 647
 	 * if it doesn't exist. If $create is false and the database doesn't exist
648 648
 	 * then an error will be raised
649
-	 * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error
649
+	 * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error
650 650
 	 * should be raised
651 651
 	 * @return boolean Flag indicating success
652 652
 	 */
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 	/**
682 682
 	 * Returns the name of the currently selected database
683 683
 	 *
684
-	 * @return string|null Name of the selected database, or null if none selected
684
+	 * @return string Name of the selected database, or null if none selected
685 685
 	 */
686 686
 	public function getSelectedDatabase() {
687 687
 		return $this->connector->getSelectedDatabase();
@@ -806,6 +806,7 @@  discard block
 block discarded – undo
806 806
 
807 807
 	/**
808 808
 	 * @deprecated since version 4.0 Use DB::field_list instead
809
+	 * @param string $table
809 810
 	 */
810 811
 	public function fieldList($table) {
811 812
 		Deprecation::notice('4.0', 'Use DB::field_list instead');
Please login to merge, or discard this patch.
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.
ORM/Connect/MySQLStatement.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@
 block discarded – undo
78 78
 
79 79
 	/**
80 80
 	 * Hook the result-set given into a Query class, suitable for use by SilverStripe.
81
-	 * @param mysqli_stmt $statement The related statement, if present
82
-	 * @param mysqli_result $metadata The metadata for this statement
81
+	 * @param \mysqli_stmt $statement The related statement, if present
82
+	 * @param \mysqli_result $metadata The metadata for this statement
83 83
 	 */
84 84
 	public function __construct($statement, $metadata) {
85 85
 		$this->statement = $statement;
Please login to merge, or discard this patch.
ORM/Connect/PDOConnector.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@
 block discarded – undo
324 324
 	 * @param int $errorLevel
325 325
 	 * @param string $sql
326 326
 	 * @param array $parameters
327
-	 * @return \PDOQuery
327
+	 * @return PDOQuery|null
328 328
 	 */
329 329
 	protected function prepareResults($statement, $errorLevel, $sql, $parameters = array()) {
330 330
 
Please login to merge, or discard this patch.
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.
ORM/DataExtension.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 	protected static $fixture_file = 'MemberDatetimeOptionsetFieldTest.yml';
9 9
 
10
+	/**
11
+	 * @param DataObject|null $member
12
+	 */
10 13
 	protected function createDateFormatFieldForMember($member) {
11 14
 		require_once 'Zend/Date.php';
12 15
 		$defaultDateFormat = Zend_Locale_Format::getDateFormat($member->Locale);
@@ -26,6 +29,9 @@  discard block
 block discarded – undo
26 29
 		return $field;
27 30
 	}
28 31
 
32
+	/**
33
+	 * @param DataObject|null $member
34
+	 */
29 35
 	protected function createTimeFormatFieldForMember($member) {
30 36
 		require_once 'Zend/Date.php';
31 37
 		$defaultTimeFormat = Zend_Locale_Format::getTimeFormat($member->Locale);
Please login to merge, or discard this patch.
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.
ORM/DataObject.php 1 patch
Doc Comments   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -885,6 +885,7 @@  discard block
 block discarded – undo
885 885
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
886 886
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
887 887
 	 *                            Only applicable with $priority='right'. (optional)
888
+	 * @param DataObject|null $rightObj
888 889
 	 * @return Boolean
889 890
 	 */
890 891
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -2167,7 +2168,7 @@  discard block
 block discarded – undo
2167 2168
 	 *
2168 2169
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2169 2170
 	 *
2170
-	 * @param $class
2171
+	 * @param string $class
2171 2172
 	 * @return array or false
2172 2173
 	 */
2173 2174
 	public function database_extensions($class){
@@ -2647,6 +2648,7 @@  discard block
 block discarded – undo
2647 2648
 
2648 2649
 	/**
2649 2650
 	 * {@inheritdoc}
2651
+	 * @param string $field
2650 2652
 	 */
2651 2653
 	public function castingHelper($field) {
2652 2654
 		if ($fieldSpec = $this->db($field)) {
@@ -2988,7 +2990,7 @@  discard block
 block discarded – undo
2988 2990
 	 * Traverses to a field referenced by relationships between data objects, returning the value
2989 2991
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
2990 2992
 	 *
2991
-	 * @param $fieldName string
2993
+	 * @param string $fieldName string
2992 2994
 	 * @return string | null - will return null on a missing value
2993 2995
 	 */
2994 2996
 	public function relField($fieldName) {
@@ -3058,7 +3060,7 @@  discard block
 block discarded – undo
3058 3060
 	 * @param string $callerClass The class of objects to be returned
3059 3061
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3060 3062
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
3061
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3063
+	 * @param string $sort A sort expression to be inserted into the ORDER
3062 3064
 	 * BY clause.  If omitted, self::$default_sort will be used.
3063 3065
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3064 3066
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
Please login to merge, or discard this patch.
ORM/DataQuery.php 1 patch
Doc Comments   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	/**
101 101
 	 * Remove a filter from the query
102 102
 	 *
103
-	 * @param string|array $fieldExpression The predicate of the condition to remove
103
+	 * @param string|null $fieldExpression The predicate of the condition to remove
104 104
 	 * (ignoring parameters). The expression will be considered a match if it's
105 105
 	 * contained within any other predicate.
106 106
 	 * @return DataQuery Self reference
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	/**
180 180
 	 * Ensure that the query is ready to execute.
181 181
 	 *
182
-	 * @param array|null $queriedColumns Any columns to filter the query by
182
+	 * @param string[] $queriedColumns Any columns to filter the query by
183 183
 	 * @return SQLSelect The finalised sql query
184 184
 	 */
185 185
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	/**
388 388
 	 * Execute the query and return the result as {@link SS_Query} object.
389 389
 	 *
390
-	 * @return SS_Query
390
+	 * @return Connect\SS_Query
391 391
 	 */
392 392
 	public function execute() {
393 393
 		return $this->getFinalisedQuery()->execute();
@@ -1039,6 +1039,9 @@  discard block
 block discarded – undo
1039 1039
 	 */
1040 1040
 	protected $whereQuery;
1041 1041
 
1042
+	/**
1043
+	 * @param string $connective
1044
+	 */
1042 1045
 	public function __construct(DataQuery $base, $connective) {
1043 1046
 		parent::__construct($base->dataClass);
1044 1047
 		$this->query = $base->query;
@@ -1048,6 +1051,9 @@  discard block
 block discarded – undo
1048 1051
 		$base->where($this);
1049 1052
 	}
1050 1053
 
1054
+	/**
1055
+	 * @param string $filter
1056
+	 */
1051 1057
 	public function where($filter) {
1052 1058
 		if($filter) {
1053 1059
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.