Completed
Pull Request — master (#5219)
by Damian
12:28
created
security/RememberLoginHash.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@  discard block
 block discarded – undo
76 76
 		return $this->token;
77 77
 	}
78 78
 
79
+	/**
80
+	 * @param string $token
81
+	 */
79 82
 	public function setToken($token) {
80 83
 		$this->token = $token;
81 84
 	}
@@ -92,7 +95,7 @@  discard block
 block discarded – undo
92 95
 	/**
93 96
 	 * Creates a new random token and hashes it using the
94 97
 	 * member information
95
-	 * @param Member The logged in user
98
+	 * @param Member Member logged in user
96 99
 	 * @return string The hash to be stored in the database
97 100
 	 */
98 101
 	public function getNewHash(Member $member){
@@ -106,7 +109,7 @@  discard block
 block discarded – undo
106 109
 	 * The device is assigned a globally unique device ID
107 110
 	 * The returned login hash stores the hashed token in the
108 111
 	 * database, for this device and this member
109
-	 * @param Member The logged in user
112
+	 * @param Member Member logged in user
110 113
 	 * @return RememberLoginHash The generated login hash
111 114
 	 */
112 115
 	public static function generate(Member $member) {
@@ -149,6 +152,7 @@  discard block
 block discarded – undo
149 152
 	 * Deletes existing tokens for this member
150 153
 	 * if logout_across_devices is true, all tokens are deleted, otherwise
151 154
 	 * only the token for the provided device ID will be removed
155
+	 * @param string $alcDevice
152 156
 	 */
153 157
 	public static function clear(Member $member, $alcDevice = null) {
154 158
 		if(!$member->exists()) { return; }
Please login to merge, or discard this patch.
model/DataQuery.php 1 patch
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * Create a new DataQuery.
45 45
 	 *
46 46
 	 * @param String The name of the DataObject class that you wish to query
47
+	 * @param string $dataClass
47 48
 	 */
48 49
 	public function __construct($dataClass) {
49 50
 		$this->dataClass = $dataClass;
@@ -166,7 +167,7 @@  discard block
 block discarded – undo
166 167
 	/**
167 168
 	 * Ensure that the query is ready to execute.
168 169
 	 *
169
-	 * @param array|null $queriedColumns Any columns to filter the query by
170
+	 * @param string[] $queriedColumns Any columns to filter the query by
170 171
 	 * @return SQLSelect The finalised sql query
171 172
 	 */
172 173
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -641,7 +642,7 @@  discard block
 block discarded – undo
641 642
 	 * mappings to the query object state. This has to be called
642 643
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
643 644
 	 *
644
-	 * @param String|array $relation The array/dot-syntax relation to follow
645
+	 * @param string $relation The array/dot-syntax relation to follow
645 646
 	 * @param bool $linearOnly Set to true to restrict to linear relations only. Set this
646 647
 	 * if this relation will be used for sorting, and should not include duplicate rows.
647 648
 	 * @return The model class of the related item
@@ -917,6 +918,7 @@  discard block
 block discarded – undo
917 918
 
918 919
 	/**
919 920
 	 * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query.
921
+	 * @param string $key
920 922
 	 */
921 923
 	public function getQueryParam($key) {
922 924
 		if(isset($this->queryParams[$key])) return $this->queryParams[$key];
@@ -949,6 +951,9 @@  discard block
 block discarded – undo
949 951
 	 */
950 952
 	protected $whereQuery;
951 953
 
954
+	/**
955
+	 * @param string $connective
956
+	 */
952 957
 	public function __construct(DataQuery $base, $connective) {
953 958
 		$this->dataClass = $base->dataClass;
954 959
 		$this->query = $base->query;
@@ -958,6 +963,9 @@  discard block
 block discarded – undo
958 963
 		$base->where($this);
959 964
 	}
960 965
 
966
+	/**
967
+	 * @param string $filter
968
+	 */
961 969
 	public function where($filter) {
962 970
 		if($filter) {
963 971
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.
model/queries/SQLSelect.php 1 patch
Doc Comments   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	/**
62 62
 	 * Construct a new SQLSelect.
63 63
 	 *
64
-	 * @param array|string $select An array of SELECT fields.
64
+	 * @param string $select An array of SELECT fields.
65 65
 	 * @param array|string $from An array of FROM clauses. The first one should be just the table name.
66 66
 	 * Each should be ANSI quoted.
67 67
 	 * @param array $where An array of WHERE clauses.
@@ -115,7 +115,6 @@  discard block
 block discarded – undo
115 115
 	 * </code>
116 116
 	 *
117 117
 	 * @param string|array $fields Field names should be ANSI SQL quoted. Array keys should be unquoted.
118
-	 * @param boolean $clear Clear existing select fields?
119 118
 	 * @return $this Self reference
120 119
 	 */
121 120
 	public function setSelect($fields) {
@@ -352,7 +351,7 @@  discard block
 block discarded – undo
352 351
 	 *
353 352
 	 * @param string $value
354 353
 	 * @param string $defaultDirection
355
-	 * @return array A two element array: array($column, $direction)
354
+	 * @return string[] A two element array: array($column, $direction)
356 355
 	 */
357 356
 	private function getDirectionFromString($value, $defaultDirection = null) {
358 357
 		if(preg_match('/^(.*)(asc|desc)$/i', $value, $matches)) {
@@ -447,7 +446,6 @@  discard block
 block discarded – undo
447 446
 	 * @see SQLSelect::addWhere() for syntax examples
448 447
 	 *
449 448
 	 * @param mixed $having Predicate(s) to set, as escaped SQL statements or paramaterised queries
450
-	 * @param mixed $having,... Unlimited additional predicates
451 449
 	 * @return self Self reference
452 450
 	 */
453 451
 	public function setHaving($having) {
@@ -462,7 +460,6 @@  discard block
 block discarded – undo
462 460
 	 * @see SQLSelect::addWhere() for syntax examples
463 461
 	 *
464 462
 	 * @param mixed $having Predicate(s) to set, as escaped SQL statements or paramaterised queries
465
-	 * @param mixed $having,... Unlimited additional predicates
466 463
 	 * @return self Self reference
467 464
 	 */
468 465
 	public function addHaving($having) {
Please login to merge, or discard this patch.
model/versioning/Versioned.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
 	/**
954 954
 	 * Find objects in the given relationships, merging them into the given list
955 955
 	 *
956
-	 * @param array $source Config property to extract relationships from
956
+	 * @param string $source Config property to extract relationships from
957 957
 	 * @param bool $recursive True if recursive
958 958
 	 * @param ArrayList $list Optional list to add items to
959 959
 	 * @return ArrayList The list
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 	/**
1052 1052
 	 * Check if the current user can delete this record from live
1053 1053
 	 *
1054
-	 * @param null $member
1054
+	 * @param DataObject|null $member
1055 1055
 	 * @return mixed
1056 1056
 	 */
1057 1057
 	public function canUnpublish($member = null) {
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 	 * Extend permissions to include additional security for objects that are not published to live.
1162 1162
 	 *
1163 1163
 	 * @param Member $member
1164
-	 * @return bool|null
1164
+	 * @return false|null
1165 1165
 	 */
1166 1166
 	public function canView($member = null) {
1167 1167
 		// Invoke default version-gnostic canView
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
 	 *
1237 1237
 	 * @param string $stage
1238 1238
 	 * @param Member $member
1239
-	 * @return bool
1239
+	 * @return boolean|string
1240 1240
 	 */
1241 1241
 	public function canViewStage($stage = 'Live', $member = null) {
1242 1242
 		$oldMode = Versioned::get_reading_mode();
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 	/**
1307 1307
 	 * Get the latest published DataObject.
1308 1308
 	 *
1309
-	 * @return DataObject
1309
+	 * @return string
1310 1310
 	 */
1311 1311
 	public function latestPublished() {
1312 1312
 		// Get the root data object class - this will have the version field
@@ -2267,7 +2267,7 @@  discard block
 block discarded – undo
2267 2267
 	/**
2268 2268
 	 * Returns an array of possible stages.
2269 2269
 	 *
2270
-	 * @return array
2270
+	 * @return string[]
2271 2271
 	 */
2272 2272
 	public function getVersionedStages() {
2273 2273
 		if($this->hasVersionedStages()) {
Please login to merge, or discard this patch.
control/RequestHandler.php 1 patch
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,6 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
 	/**
123 123
 	 * Set the DataModel for this request.
124
+	 * @param DataModel $model
124 125
 	 */
125 126
 	public function setDataModel($model) {
126 127
 		$this->model = $model;
@@ -238,6 +239,9 @@  discard block
 block discarded – undo
238 239
 		return $this;
239 240
 	}
240 241
 
242
+	/**
243
+	 * @param SS_HTTPRequest $request
244
+	 */
241 245
 	protected function findAction($request) {
242 246
 		$handlerClass = ($this->class) ? $this->class : get_class($this);
243 247
 
@@ -271,7 +275,7 @@  discard block
 block discarded – undo
271 275
 	 *
272 276
 	 * Must not raise SS_HTTPResponse_Exceptions - instead it should return
273 277
 	 *
274
-	 * @param $request
278
+	 * @param SS_HTTPRequest $request
275 279
 	 * @param $action
276 280
 	 * @return SS_HTTPResponse
277 281
 	 */
@@ -384,6 +388,7 @@  discard block
 block discarded – undo
384 388
 
385 389
 	/**
386 390
 	 * Return the class that defines the given action, so that we know where to check allowed_actions.
391
+	 * @return string|null
387 392
 	 */
388 393
 	protected function definingClassForAction($actionOrigCasing) {
389 394
 		$action = strtolower($actionOrigCasing);
@@ -493,6 +498,7 @@  discard block
 block discarded – undo
493 498
 	 * or {@link handleRequest()}, but in some based we want to set it manually.
494 499
 	 *
495 500
 	 * @param SS_HTTPRequest
501
+	 * @param SS_HTTPRequest $request
496 502
 	 */
497 503
 	public function setRequest($request) {
498 504
 		$this->request = $request;
Please login to merge, or discard this patch.
forms/htmleditor/HtmlEditorField.php 1 patch
Doc Comments   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	/**
50 50
 	 * Assign a new configuration instance or identifier
51 51
 	 *
52
-	 * @param string|HtmlEditorConfig $config
52
+	 * @param string $config
53 53
 	 * @return $this
54 54
 	 */
55 55
 	public function setEditorConfig($config) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @param string $name The internal field name, passed to forms.
65 65
 	 * @param string $title The human-readable field label.
66
-	 * @param mixed $value The value of the field.
66
+	 * @param integer $value The value of the field.
67 67
 	 * @param string $config HtmlEditorConfig identifier to be used. Default to the active one.
68 68
 	 */
69 69
 	public function __construct($name, $title = null, $value = '', $config = null) {
@@ -104,6 +104,9 @@  discard block
 block discarded – undo
104 104
 		$record->{$this->name} = $htmlValue->getContent();
105 105
 	}
106 106
 
107
+	/**
108
+	 * @param string|null $value
109
+	 */
107 110
 	public function setValue($value) {
108 111
 		// Regenerate links prior to preview, so that the editor can see them.
109 112
 		$value = Image::regenerate_html_links($value);
@@ -171,6 +174,10 @@  discard block
 block discarded – undo
171 174
 
172 175
 	protected $controller, $name;
173 176
 
177
+	/**
178
+	 * @param Controller $controller
179
+	 * @param string $name
180
+	 */
174 181
 	public function __construct($controller, $name) {
175 182
 		parent::__construct();
176 183
 
@@ -189,7 +196,7 @@  discard block
 block discarded – undo
189 196
 	/**
190 197
 	 * Searches the SiteTree for display in the dropdown
191 198
 	 *
192
-	 * @return callback
199
+	 * @return DataList
193 200
 	 */
194 201
 	public function siteTreeSearchCallback($sourceObject, $labelField, $search) {
195 202
 		return DataObject::get($sourceObject)->filterAny(array(
@@ -467,7 +474,7 @@  discard block
 block discarded – undo
467 474
 	/**
468 475
 	 * Find all anchors available on the given page.
469 476
 	 *
470
-	 * @return array
477
+	 * @return string
471 478
 	 */
472 479
 	public function getanchors() {
473 480
 		$id = (int)$this->getRequest()->getVar('PageID');
@@ -1025,7 +1032,7 @@  discard block
 block discarded – undo
1025 1032
 	/**
1026 1033
 	 * Get OEmbed type
1027 1034
 	 *
1028
-	 * @return string
1035
+	 * @return boolean
1029 1036
 	 */
1030 1037
 	public function getType() {
1031 1038
 		return $this->oembed->type;
Please login to merge, or discard this patch.
filesystem/File.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 *
249 249
 	 * @param array $args Array of input shortcode arguments
250 250
 	 * @param int $errorCode If the file is not found, or is inaccessible, this will be assigned to a HTTP error code.
251
-	 * @return File|null The File DataObject, if it can be found.
251
+	 * @return null|DataObject The File DataObject, if it can be found.
252 252
 	 */
253 253
 	public static function find_shortcode_record($args, &$errorCode = null) {
254 254
 		// Validate shortcode
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 	 *
618 618
 	 * @param string $condition The PHP condition to be evaluated.  The page will be called $item
619 619
 	 * @param array $collator An array, passed by reference, to collect all of the matching descendants.
620
-	 * @return true|null
620
+	 * @return boolean|null
621 621
 	 */
622 622
 	public function collateDescendants($condition, &$collator) {
623 623
 		if($children = $this->Children()) {
@@ -978,6 +978,7 @@  discard block
 block discarded – undo
978 978
 	 *
979 979
 	 * @param String File extension, without dot prefix. Use an asterisk ('*')
980 980
 	 * to specify a generic fallback if no mapping is found for an extension.
981
+	 * @param string $ext
981 982
 	 * @return String Classname for a subclass of {@link File}
982 983
 	 */
983 984
 	public static function get_class_for_file_extension($ext) {
@@ -1115,7 +1116,6 @@  discard block
 block discarded – undo
1115 1116
 	 * Note that the result will not have a leading slash, and should not be used
1116 1117
 	 * with local file paths.
1117 1118
 	 *
1118
-	 * @param string $part,... Parts
1119 1119
 	 * @return string
1120 1120
 	 */
1121 1121
 	public static function join_paths() {
Please login to merge, or discard this patch.
core/Extension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 	/**
60 60
 	 * Set the owner of this extension.
61 61
 	 *
62
-	 * @param Object $owner The owner object,
62
+	 * @param null|DataObject $owner The owner object,
63 63
 	 * @param string $ownerBaseClass The base class that the extension is applied to; this may be
64 64
 	 * the class of owner, or it may be a parent.  For example, if Versioned was applied to SiteTree,
65 65
 	 * and then a Page object was instantiated, $owner would be a Page object, but $ownerBaseClass
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -551,8 +551,8 @@  discard block
 block discarded – undo
551 551
 
552 552
 	/**
553 553
 	 * Helper function to duplicate relations from one object to another
554
-	 * @param $sourceObject the source object to duplicate from
555
-	 * @param $destinationObject the destination object to populate with the duplicated relations
554
+	 * @param DataObject $sourceObject the source object to duplicate from
555
+	 * @param DataObject $destinationObject the destination object to populate with the duplicated relations
556 556
 	 * @param $name the name of the relation to duplicate (e.g. members)
557 557
 	 */
558 558
 	private function duplicateRelations($sourceObject, $destinationObject, $name) {
@@ -932,6 +932,7 @@  discard block
 block discarded – undo
932 932
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
933 933
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
934 934
 	 *                            Only applicable with $priority='right'. (optional)
935
+	 * @param DataObject|null $rightObj
935 936
 	 * @return Boolean
936 937
 	 */
937 938
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -2201,6 +2202,7 @@  discard block
 block discarded – undo
2201 2202
 	 *
2202 2203
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2203 2204
 	 *
2205
+	 * @param string $class
2204 2206
 	 * @return array or false
2205 2207
 	 */
2206 2208
 	public function database_extensions($class){
@@ -3009,7 +3011,7 @@  discard block
 block discarded – undo
3009 3011
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3010 3012
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3011 3013
 	 *
3012
-	 * @param $fieldName string
3014
+	 * @param string $fieldName string
3013 3015
 	 * @return string | null - will return null on a missing value
3014 3016
 	 */
3015 3017
 	public function relField($fieldName) {
@@ -3078,7 +3080,7 @@  discard block
 block discarded – undo
3078 3080
 	 * @param string $callerClass The class of objects to be returned
3079 3081
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3080 3082
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
3081
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3083
+	 * @param string $sort A sort expression to be inserted into the ORDER
3082 3084
 	 * BY clause.  If omitted, self::$default_sort will be used.
3083 3085
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3084 3086
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3288,6 +3290,8 @@  discard block
 block discarded – undo
3288 3290
 	/**
3289 3291
 	 * @see $sourceQueryParams
3290 3292
 	 * @param array
3293
+	 * @param string $key
3294
+	 * @param string $value
3291 3295
 	 */
3292 3296
 	public function setSourceQueryParam($key, $value) {
3293 3297
 		$this->sourceQueryParams[$key] = $value;
@@ -3295,6 +3299,7 @@  discard block
 block discarded – undo
3295 3299
 
3296 3300
 	/**
3297 3301
 	 * @see $sourceQueryParams
3302
+	 * @param string $key
3298 3303
 	 * @return Mixed
3299 3304
 	 */
3300 3305
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.