Completed
Pull Request — master (#5433)
by Sam
11:12
created
tests/view/ContentNegotiatorTest.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -5,6 +5,7 @@
 block discarded – undo
5 5
 	/**
6 6
 	 * Small helper to render templates from strings
7 7
 	 * Cloned from SSViewerTest
8
+	 * @param string $templateString
8 9
 	 */
9 10
 	private function render($templateString, $data = null) {
10 11
 		$t = SSViewer::fromString($templateString);
Please login to merge, or discard this patch.
forms/HtmlEditorSanitiser.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	/**
42 42
 	 * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match
43 43
 	 *
44
-	 * @param $str - The TinyMCE pattern
44
+	 * @param string|null $str - The TinyMCE pattern
45 45
 	 * @return string - The equivalent regex
46 46
 	 */
47 47
 	protected function patternToRegex($str) {
@@ -182,6 +182,7 @@  discard block
 block discarded – undo
182 182
 	/**
183 183
 	 * Given an attribute name, return the rule structure for that attribute
184 184
 	 * @param string $name - The attribute name
185
+	 * @param stdClass $elementRule
185 186
 	 * @return stdClass - The attribute rule
186 187
 	 */
187 188
 	protected function getRuleForAttribute($elementRule, $name) {
@@ -245,7 +246,7 @@  discard block
 block discarded – undo
245 246
 	 * Given an SS_HTMLValue instance, will remove and elements and attributes that are
246 247
 	 * not explicitly included in the whitelist passed to __construct on instance creation
247 248
 	 *
248
-	 * @param SS_HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from
249
+	 * @param HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from
249 250
 	 */
250 251
 	public function sanitise (HTMLValue $html) {
251 252
 		if(!$this->elements && !$this->elementPatterns) return;
Please login to merge, or discard this patch.
model/connect/DBSchemaManager.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,6 @@  discard block
 block discarded – undo
46 46
 	/**
47 47
 	 * Injector injection point for database controller
48 48
 	 *
49
-	 * @param SS_Database $connector
50 49
 	 */
51 50
 	public function setDatabase(SS_Database $database) {
52 51
 		$this->database = $database;
@@ -483,7 +482,7 @@  discard block
 block discarded – undo
483 482
 	/**
484 483
 	 * Given an index spec determines the index type
485 484
 	 *
486
-	 * @param array|string $spec
485
+	 * @param string $spec
487 486
 	 * @return string
488 487
 	 */
489 488
 	protected function determineIndexType($spec) {
@@ -551,7 +550,7 @@  discard block
 block discarded – undo
551 550
 	/**
552 551
 	 * Returns true if the given table is exists in the current database
553 552
 	 *
554
-	 * @param string $table Name of table to check
553
+	 * @param string $tableName Name of table to check
555 554
 	 * @return boolean Flag indicating existence of table
556 555
 	 */
557 556
 	abstract public function hasTable($tableName);
Please login to merge, or discard this patch.
model/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.
model/DataExtension.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -79,9 +79,15 @@
 block discarded – undo
79 79
 	public function can($member) {
80 80
 	}
81 81
 
82
+	/**
83
+	 * @param \Member $member
84
+	 */
82 85
 	public function canEdit($member) {
83 86
 	}
84 87
 
88
+	/**
89
+	 * @param \Member $member
90
+	 */
85 91
 	public function canDelete($member) {
86 92
 	}
87 93
 
Please login to merge, or discard this patch.
model/DataList.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 * Returns a new DataList instance with the specified query parameter assigned
173 173
 	 *
174 174
 	 * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set
175
-	 * @param mixed $val If $keyOrArray is not an array, this is the value to set
175
+	 * @param string $val If $keyOrArray is not an array, this is the value to set
176 176
 	 * @return static
177 177
 	 */
178 178
 	public function setDataQueryParam($keyOrArray, $val = null) {
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 	 * Check if the given field specification could be interpreted as an unquoted relation name
536 536
 	 *
537 537
 	 * @param string $field
538
-	 * @return bool
538
+	 * @return integer
539 539
 	 */
540 540
 	protected function isValidRelationName($field) {
541 541
 		return preg_match('/^[A-Z0-9._]+$/i', $field);
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
651 651
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
652 652
 	 * ORM have a value of 10.
653
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
653
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
654 654
 	 * @return DataList
655 655
 	 */
656 656
 	public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
669 669
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
670 670
 	 * ORM have a value of 10.
671
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
671
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
672 672
 	 * @return DataList
673 673
 	 */
674 674
 	public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 	/**
885 885
 	 * Restrict the columns to fetch into this DataList
886 886
 	 *
887
-	 * @param array $queriedColumns
887
+	 * @param string[] $queriedColumns
888 888
 	 * @return DataList
889 889
 	 */
890 890
 	public function setQueriedColumns($queriedColumns) {
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
 	/**
1160 1160
 	 * Returns item stored in list with index $key
1161 1161
 	 *
1162
-	 * @param mixed $key
1162
+	 * @param integer $key
1163 1163
 	 * @return DataObject
1164 1164
 	 */
1165 1165
 	public function offsetGet($key) {
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -588,8 +588,8 @@  discard block
 block discarded – undo
588 588
 
589 589
 	/**
590 590
 	 * Helper function to duplicate relations from one object to another
591
-	 * @param $sourceObject the source object to duplicate from
592
-	 * @param $destinationObject the destination object to populate with the duplicated relations
591
+	 * @param DataObject $sourceObject the source object to duplicate from
592
+	 * @param DataObject $destinationObject the destination object to populate with the duplicated relations
593 593
 	 * @param $name the name of the relation to duplicate (e.g. members)
594 594
 	 */
595 595
 	private function duplicateRelations($sourceObject, $destinationObject, $name) {
@@ -987,6 +987,7 @@  discard block
 block discarded – undo
987 987
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
988 988
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
989 989
 	 *                            Only applicable with $priority='right'. (optional)
990
+	 * @param DataObject|null $rightObj
990 991
 	 * @return Boolean
991 992
 	 */
992 993
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -2272,6 +2273,7 @@  discard block
 block discarded – undo
2272 2273
 	 *
2273 2274
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2274 2275
 	 *
2276
+	 * @param string $class
2275 2277
 	 * @return array or false
2276 2278
 	 */
2277 2279
 	public function database_extensions($class){
@@ -3081,7 +3083,7 @@  discard block
 block discarded – undo
3081 3083
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3082 3084
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3083 3085
 	 *
3084
-	 * @param $fieldName string
3086
+	 * @param string $fieldName string
3085 3087
 	 * @return string | null - will return null on a missing value
3086 3088
 	 */
3087 3089
 	public function relField($fieldName) {
@@ -3360,6 +3362,7 @@  discard block
 block discarded – undo
3360 3362
 	/**
3361 3363
 	 * @see $sourceQueryParams
3362 3364
 	 * @param array
3365
+	 * @param string $key
3363 3366
 	 */
3364 3367
 	public function setSourceQueryParam($key, $value) {
3365 3368
 		$this->sourceQueryParams[$key] = $value;
@@ -3367,6 +3370,7 @@  discard block
 block discarded – undo
3367 3370
 
3368 3371
 	/**
3369 3372
 	 * @see $sourceQueryParams
3373
+	 * @param string $key
3370 3374
 	 * @return Mixed
3371 3375
 	 */
3372 3376
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.
model/HTMLValue.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,8 +152,8 @@
 block discarded – undo
152 152
 	/**
153 153
 	 * Make an xpath query against this HTML
154 154
 	 *
155
-	 * @param $query string - The xpath query string
156
-	 * @return DOMNodeList
155
+	 * @param string $query string - The xpath query string
156
+	 * @return \DOMNodeList
157 157
 	 */
158 158
 	public function query($query) {
159 159
 		$xp = new DOMXPath($this->getDocument());
Please login to merge, or discard this patch.
model/ManyManyList.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * Create a DataObject from the given SQL row.
116 116
 	 *
117 117
 	 * @param array $row
118
-	 * @return DataObject
118
+	 * @return SilverStripe\Model\DataObject
119 119
 	 */
120 120
 	protected function createDataObject($row) {
121 121
 		// remove any composed fields
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 * Note that for a ManyManyList, the item is never actually deleted, only
266 266
 	 * the join table is affected.
267 267
 	 *
268
-	 * @param DataObject $item
268
+	 * @param SilverStripe\Model\DataObject $item
269 269
 	 */
270 270
 	public function remove($item) {
271 271
 		if(!($item instanceof $this->dataClass)) {
Please login to merge, or discard this patch.