Completed
Pull Request — 3.1 (#5200)
by Daniel
12:18
created
model/DataQuery.php 1 patch
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,6 +140,7 @@  discard block
 block discarded – undo
140 140
 	/**
141 141
 	 * Ensure that the query is ready to execute.
142 142
 	 *
143
+	 * @param string[] $queriedColumns
143 144
 	 * @return SQLQuery
144 145
 	 */
145 146
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -381,6 +382,7 @@  discard block
 block discarded – undo
381 382
 
382 383
 	/**
383 384
 	 * Runs a raw aggregate expression.  Please handle escaping yourself
385
+	 * @param string $expression
384 386
 	 */
385 387
 	public function aggregate($expression) {
386 388
 		return $this->getFinalisedQuery()->aggregate($expression)->execute()->value();
@@ -483,7 +485,6 @@  discard block
 block discarded – undo
483 485
 	 *  $query->where(array("\"Column\" = 'Value'", "\"Column\" != 'Value'"));
484 486
 	 * </code>
485 487
 	 *
486
-	 * @param string|array $where Predicate(s) to set, as escaped SQL statements.
487 488
 	 */
488 489
 	public function where($filter) {
489 490
 		if($filter) {
@@ -593,7 +594,7 @@  discard block
 block discarded – undo
593 594
 	 * mappings to the query object state. This has to be called
594 595
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
595 596
 	 *
596
-	 * @param String|array $relation The array/dot-syntax relation to follow
597
+	 * @param string $relation The array/dot-syntax relation to follow
597 598
 	 * @return The model class of the related item
598 599
 	 */
599 600
 	public function applyRelation($relation) {
@@ -770,6 +771,7 @@  discard block
 block discarded – undo
770 771
 
771 772
 	/**
772 773
 	 * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query.
774
+	 * @param string $key
773 775
 	 */
774 776
 	public function getQueryParam($key) {
775 777
 		if(isset($this->queryParams[$key])) return $this->queryParams[$key];
@@ -800,6 +802,9 @@  discard block
 block discarded – undo
800 802
 
801 803
 	protected $whereQuery;
802 804
 
805
+	/**
806
+	 * @param string $connective
807
+	 */
803 808
 	public function __construct(DataQuery $base, $connective) {
804 809
 		$this->dataClass = $base->dataClass;
805 810
 		$this->query = $base->query;
@@ -821,7 +826,7 @@  discard block
 block discarded – undo
821 826
 	 *  $query->where(array("\"Column\" = 'Value'", "\"Column\" != 'Value'"));
822 827
 	 * </code>
823 828
 	 *
824
-	 * @param string|array $where Predicate(s) to set, as escaped SQL statements.
829
+	 * @param string $filter
825 830
 	 */
826 831
 	public function where($filter) {
827 832
 		if($filter) {
Please login to merge, or discard this patch.
model/DB.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,9 +155,8 @@
 block discarded – undo
155 155
 	 * Given the database configuration, this method will create the correct 
156 156
 	 * subclass of {@link SS_Database}.
157 157
 	 *
158
-	 * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the
158
+	 * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the
159 159
 	 *                        rest of the options, see the specific class.
160
-	 * @param string $name identifier for the connection
161 160
 	 *
162 161
 	 * @return SS_Database
163 162
 	 */
Please login to merge, or discard this patch.
model/fieldtypes/Decimal.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	 * @param string $name
16 16
 	 * @param int $wholeSize
17 17
 	 * @param int $decimalSize
18
-	 * @param float $defaultValue
18
+	 * @param integer $defaultValue
19 19
 	 */
20 20
 	public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) {
21 21
 		$this->wholeSize = is_int($wholeSize) ? $wholeSize : 9;
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 	}
28 28
 	
29 29
 	/**
30
-	 * @return float
30
+	 * @return string
31 31
 	 */
32 32
 	public function Nice() {
33 33
 		return number_format($this->value, $this->decimalSize);
34 34
 	}
35 35
 	
36 36
 	/**
37
-	 * @return int
37
+	 * @return double
38 38
 	 */
39 39
 	public function Int() {
40 40
 		return floor($this->value);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	/**
83
-	 * @return float
83
+	 * @return string
84 84
 	 */
85 85
 	public function nullValue() {
86 86
 		return "0.00";
Please login to merge, or discard this patch.
model/Image.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * An image exists if it has a filename.
127 127
 	 * Does not do any filesystem checks.
128 128
 	 * 
129
-	 * @return boolean
129
+	 * @return boolean|null
130 130
 	 */
131 131
 	public function exists() {
132 132
 		if(isset($this->record["Filename"])) {
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 	
647 647
 	/**
648 648
 	 * Get the orientation of this image.
649
-	 * @return ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
649
+	 * @return integer | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
650 650
 	 */
651 651
 	public function getOrientation() {
652 652
 		$width = $this->getWidth();
Please login to merge, or discard this patch.
model/MySQLDatabase.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,6 +181,7 @@  discard block
 block discarded – undo
181 181
 	/**
182 182
 	 * Drop the database that this object is currently connected to.
183 183
 	 * Use with caution.
184
+	 * @param string $dbName
184 185
 	 */
185 186
 	public function dropDatabaseByName($dbName) {
186 187
 		$this->query("DROP DATABASE \"$dbName\"");
@@ -334,7 +335,7 @@  discard block
 block discarded – undo
334 335
 	/**
335 336
 	 * Checks a table's integrity and repairs it if necessary.
336 337
 	 * @var string $tableName The name of the table.
337
-	 * @return boolean Return true if the table has integrity after the method is complete.
338
+	 * @return null|boolean Return true if the table has integrity after the method is complete.
338 339
 	 */
339 340
 	public function checkAndRepairTable($tableName) {
340 341
 		if(!$this->runTableCheckCommand("CHECK TABLE \"$tableName\"")) {
@@ -588,6 +589,10 @@  discard block
 block discarded – undo
588 589
 		return $this->dbConn->affected_rows;
589 590
 	}
590 591
 
592
+	/**
593
+	 * @param string $msg
594
+	 * @param integer $errorLevel
595
+	 */
591 596
 	public function databaseError($msg, $errorLevel = E_USER_ERROR) {
592 597
 		// try to extract and format query
593 598
 		if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
Please login to merge, or discard this patch.
model/MySQLQuery.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 * Hook the result-set given into a Query class, suitable for use by 
25 25
 	 * SilverStripe.
26 26
 	 *
27
-	 * @param database $database The database object that created this query.
27
+	 * @param MySQLDatabase $database The database object that created this query.
28 28
 	 * @param handle $handle the internal mysql handle that is points to the resultset.
29 29
 	 */
30 30
 	public function __construct(MySQLDatabase $database, $handle) {
Please login to merge, or discard this patch.
model/SQLQuery.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -158,7 +158,6 @@  discard block
 block discarded – undo
158 158
 	 * </code>
159 159
 	 *
160 160
 	 * @param string|array $fields Field names should be ANSI SQL quoted. Array keys should be unquoted.
161
-	 * @param boolean $clear Clear existing select fields?
162 161
 	 * @return $this Self reference
163 162
 	 */
164 163
 	public function setSelect($fields) {
@@ -594,7 +593,7 @@  discard block
 block discarded – undo
594 593
 	 * 
595 594
 	 * @param string $value
596 595
 	 * @param string $defaultDirection
597
-	 * @return array A two element array: array($column, $direction)
596
+	 * @return string[] A two element array: array($column, $direction)
598 597
 	 */
599 598
 	private function getDirectionFromString($value, $defaultDirection = null) {
600 599
 		if(preg_match('/^(.*)(asc|desc)$/i', $value, $matches)) {
@@ -1017,6 +1016,7 @@  discard block
 block discarded – undo
1017 1016
 
1018 1017
 	/**
1019 1018
 	 * Returns true if this query can be sorted by the given field.
1019
+	 * @param string $fieldName
1020 1020
 	 */
1021 1021
 	public function canSortBy($fieldName) {
1022 1022
 		$fieldName = preg_replace('/(\s+?)(A|DE)SC$/', '', $fieldName);
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
 	 * Return a new SQLQuery that calls the given aggregate functions on this data.
1073 1073
 	 * 
1074 1074
 	 * @param $column An aggregate expression, such as 'MAX("Balance")', or a set of them (as an escaped SQL statement)
1075
-	 * @param $alias An optional alias for the aggregate column.
1075
+	 * @param string $alias An optional alias for the aggregate column.
1076 1076
 	 */
1077 1077
 	public function aggregate($column, $alias = null) {
1078 1078
 		$clone = clone $this;
Please login to merge, or discard this patch.
search/filters/SearchFilter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
 	/**
290 290
 	 * Determines case sensitivity based on {@link getModifiers()}.
291 291
 	 * 
292
-	 * @return Mixed TRUE or FALSE to enforce sensitivity, NULL to use field collation.
292
+	 * @return boolean|null TRUE or FALSE to enforce sensitivity, NULL to use field collation.
293 293
 	 */
294 294
 	protected function getCaseSensitive() {
295 295
 		$modifiers = $this->getModifiers();
Please login to merge, or discard this patch.
security/Member.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -594,6 +594,7 @@  discard block
 block discarded – undo
594 594
 
595 595
 	/**
596 596
 	 * Utility for generating secure password hashes for this member.
597
+	 * @param string $string
597 598
 	 */
598 599
 	public function encryptWithUserSettings($string) {
599 600
 		if (!$string) return null;
@@ -745,7 +746,7 @@  discard block
 block discarded – undo
745 746
 	/**
746 747
 	 * Returns the current logged in user
747 748
 	 *
748
-	 * @return Member|null
749
+	 * @return DataObject|null
749 750
 	 */
750 751
 	public static function currentUser() {
751 752
 		$id = Member::currentUserID();
@@ -1217,7 +1218,7 @@  discard block
 block discarded – undo
1217 1218
 	 *
1218 1219
 	 * @param array $groups Groups to consider or NULL to use all groups with
1219 1220
 	 *                      CMS permissions.
1220
-	 * @return SQLMap Returns a map of all members in the groups given that
1221
+	 * @return SS_Map Returns a map of all members in the groups given that
1221 1222
 	 *                have CMS permissions.
1222 1223
 	 */
1223 1224
 	public static function mapInCMSGroups($groups = null) {
Please login to merge, or discard this patch.