Completed
Pull Request — 3.2 (#5154)
by Jono
10:39
created
model/DataDifferencer.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -47,6 +47,7 @@
 block discarded – undo
47 47
 	 *
48 48
 	 * @param DataObject (Optional)
49 49
 	 * @param DataObject
50
+	 * @param DataObject|null $fromRecord
50 51
 	 */
51 52
 	public function __construct($fromRecord, DataObject $toRecord) {
52 53
 		if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING);
Please login to merge, or discard this patch.
model/DataList.php 1 patch
Doc Comments   +9 added lines, -9 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) {
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
620 620
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
621 621
 	 * ORM have a value of 10.
622
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
622
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
623 623
 	 * @return DataList
624 624
 	 */
625 625
 	public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
638 638
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
639 639
 	 * ORM have a value of 10.
640
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
640
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
641 641
 	 * @return DataList
642 642
 	 */
643 643
 	public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 	 * Return the maximum value of the given field in this DataList
765 765
 	 *
766 766
 	 * @param string $fieldName
767
-	 * @return mixed
767
+	 * @return string
768 768
 	 */
769 769
 	public function max($fieldName) {
770 770
 		return $this->dataQuery->max($fieldName);
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
 	 * Return the minimum value of the given field in this DataList
775 775
 	 *
776 776
 	 * @param string $fieldName
777
-	 * @return mixed
777
+	 * @return string
778 778
 	 */
779 779
 	public function min($fieldName) {
780 780
 		return $this->dataQuery->min($fieldName);
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 	 * Return the average value of the given field in this DataList
785 785
 	 *
786 786
 	 * @param string $fieldName
787
-	 * @return mixed
787
+	 * @return string
788 788
 	 */
789 789
 	public function avg($fieldName) {
790 790
 		return $this->dataQuery->avg($fieldName);
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 	 * Return the sum of the values of the given field in this DataList
795 795
 	 *
796 796
 	 * @param string $fieldName
797
-	 * @return mixed
797
+	 * @return string
798 798
 	 */
799 799
 	public function sum($fieldName) {
800 800
 		return $this->dataQuery->sum($fieldName);
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	/**
847 847
 	 * Restrict the columns to fetch into this DataList
848 848
 	 *
849
-	 * @param array $queriedColumns
849
+	 * @param string[] $queriedColumns
850 850
 	 * @return DataList
851 851
 	 */
852 852
 	public function setQueriedColumns($queriedColumns) {
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
 	/**
1120 1120
 	 * Returns item stored in list with index $key
1121 1121
 	 *
1122
-	 * @param mixed $key
1122
+	 * @param integer $key
1123 1123
 	 * @return DataObject
1124 1124
 	 */
1125 1125
 	public function offsetGet($key) {
Please login to merge, or discard this patch.
model/DataQuery.php 1 patch
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	/**
167 167
 	 * Ensure that the query is ready to execute.
168 168
 	 *
169
-	 * @param array|null $queriedColumns Any columns to filter the query by
169
+	 * @param string[] $queriedColumns Any columns to filter the query by
170 170
 	 * @return SQLSelect The finalised sql query
171 171
 	 */
172 172
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 	 * mappings to the query object state. This has to be called
642 642
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
643 643
 	 *
644
-	 * @param String|array $relation The array/dot-syntax relation to follow
644
+	 * @param string $relation The array/dot-syntax relation to follow
645 645
 	 * @return The model class of the related item
646 646
 	 */
647 647
 	public function applyRelation($relation) {
@@ -819,6 +819,7 @@  discard block
 block discarded – undo
819 819
 
820 820
 	/**
821 821
 	 * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query.
822
+	 * @param string $key
822 823
 	 */
823 824
 	public function getQueryParam($key) {
824 825
 		if(isset($this->queryParams[$key])) return $this->queryParams[$key];
@@ -851,6 +852,9 @@  discard block
 block discarded – undo
851 852
 	 */
852 853
 	protected $whereQuery;
853 854
 
855
+	/**
856
+	 * @param string $connective
857
+	 */
854 858
 	public function __construct(DataQuery $base, $connective) {
855 859
 		$this->dataClass = $base->dataClass;
856 860
 		$this->query = $base->query;
@@ -860,6 +864,9 @@  discard block
 block discarded – undo
860 864
 		$base->where($this);
861 865
 	}
862 866
 
867
+	/**
868
+	 * @param string $filter
869
+	 */
863 870
 	public function where($filter) {
864 871
 		if($filter) {
865 872
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.
model/fieldtypes/Currency.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	private static $currency_symbol = '$';
25 25
 
26
+	/**
27
+	 * @param string $name
28
+	 */
26 29
 	public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) {
27 30
 		parent::__construct($name, $wholeSize, $decimalSize, $defaultValue);
28 31
 	}
@@ -46,6 +49,9 @@  discard block
 block discarded – undo
46 49
 		else return $val;
47 50
 	}
48 51
 
52
+	/**
53
+	 * @param string $value
54
+	 */
49 55
 	public function setValue($value, $record = null, $markChanged = true) {
50 56
 		$matches = null;
51 57
 		if(is_numeric($value)) {
Please login to merge, or discard this patch.
model/fieldtypes/Date.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Date extends DBField {
22 22
 
23
+	/**
24
+	 * @param string|null $value
25
+	 */
23 26
 	public function setValue($value, $record = null, $markChanged = true) {
24 27
 		if($value === false || $value === null || (is_string($value) && !strlen($value))) {
25 28
 			// don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be
@@ -102,7 +105,7 @@  discard block
 block discarded – undo
102 105
 
103 106
 	/**
104 107
 	 * Returns the day of the month.
105
-	 * @param boolean $includeOrdinals Include ordinal suffix to day, e.g. "th" or "rd"
108
+	 * @param boolean $includeOrdinal Include ordinal suffix to day, e.g. "th" or "rd"
106 109
 	 * @return string
107 110
 	 */
108 111
 	public function DayOfMonth($includeOrdinal = false) {
@@ -156,7 +159,7 @@  discard block
 block discarded – undo
156 159
 	 * Return a date formatted as per a CMS user's settings.
157 160
 	 *
158 161
 	 * @param Member $member
159
-	 * @return boolean | string A date formatted as per user-defined settings.
162
+	 * @return false|string | string A date formatted as per user-defined settings.
160 163
 	 */
161 164
 	public function FormatFromSettings($member = null) {
162 165
 		require_once 'Zend/Date.php';
Please login to merge, or discard this patch.
model/fieldtypes/Datetime.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * Return a date and time formatted as per a CMS user's settings.
98 98
 	 *
99 99
 	 * @param Member $member
100
-	 * @return boolean | string A time and date pair formatted as per user-defined settings.
100
+	 * @return false|string | string A time and date pair formatted as per user-defined settings.
101 101
 	 */
102 102
 	public function FormatFromSettings($member = null) {
103 103
 		require_once 'Zend/Date.php';
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * Use {@link clear_mock_now()} to revert to the current system date.
177 177
 	 * Caution: This sets a fixed date that doesn't increment with time.
178 178
 	 *
179
-	 * @param SS_Datetime|string $datetime Either in object format, or as a SS_Datetime compatible string.
179
+	 * @param string $datetime Either in object format, or as a SS_Datetime compatible string.
180 180
 	 */
181 181
 	public static function set_mock_now($datetime) {
182 182
 		if($datetime instanceof SS_Datetime) {
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 integer
84 84
 	 */
85 85
 	public function nullValue() {
86 86
 		return 0;
Please login to merge, or discard this patch.
model/fieldtypes/HTMLText.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@
 block discarded – undo
36 36
 
37 37
 	protected $whitelist = false;
38 38
 
39
+	/**
40
+	 * @param string $name
41
+	 */
39 42
 	public function __construct($name = null, $options = array()) {
40 43
 		if(is_string($options)) {
41 44
 			$options = array('whitelist' => $options);
Please login to merge, or discard this patch.
model/fieldtypes/Time.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -55,6 +55,9 @@
 block discarded – undo
55 55
 		if($this->value) return date($format, strtotime($this->value));
56 56
 	}
57 57
 
58
+	/**
59
+	 * @param string[] $parts
60
+	 */
58 61
 	public function TwelveHour( $parts ) {
59 62
 		$hour = $parts[1];
60 63
 		$min = $parts[2];
Please login to merge, or discard this patch.