Completed
Pull Request — master (#5433)
by Sam
19:38
created
core/Injectable.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
 	 *    $list = DataList::create('SiteTree');
24 24
 	 *	  $list = SiteTree::get();
25 25
 	 *
26
-	 * @param string $class the class name
27
-	 * @param mixed $arguments,... arguments to pass to the constructor
28 26
 	 * @return static
29 27
 	 */
30 28
 	public static function create() {
Please login to merge, or discard this patch.
core/startup/ErrorControlChain.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 	 * Add this callback to the chain of callbacks to call along with the state
89 89
 	 * that $error must be in this point in the chain for the callback to be called
90 90
 	 *
91
-	 * @param $callback - The callback to call
91
+	 * @param callable $callback - The callback to call
92 92
 	 * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either
93 93
 	 * @return $this
94 94
 	 */
Please login to merge, or discard this patch.
model/ArrayList.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	 *
380 380
 	 * Note that columns may be double quoted as per ANSI sql standard
381 381
 	 *
382
-	 * @return DataList
382
+	 * @return ArrayList
383 383
 	 * @see SS_List::sort()
384 384
 	 * @example $list->sort('Name'); // default ASC sorting
385 385
 	 * @example $list->sort('Name DESC'); // DESC sorting
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 	 *          $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43)));
516 516
 	 *
517 517
 	 * @param string|array See {@link filter()}
518
-	 * @return DataList
518
+	 * @return ArrayList
519 519
 	 */
520 520
 	public function filterAny() {
521 521
 		$keepUs = call_user_func_array(array($this, 'normaliseFilterArgs'), func_get_args());
@@ -582,6 +582,9 @@  discard block
 block discarded – undo
582 582
 		return $this->filter('ID', $ids);
583 583
 	}
584 584
 
585
+	/**
586
+	 * @param integer $id
587
+	 */
585 588
 	public function byID($id) {
586 589
 		$firstElement = $this->filter("ID", $id)->first();
587 590
 
@@ -666,7 +669,6 @@  discard block
 block discarded – undo
666 669
 	/**
667 670
 	 * Returns whether an item with $key exists
668 671
 	 *
669
-	 * @param mixed $key
670 672
 	 * @return bool
671 673
 	 */
672 674
 	public function offsetExists($offset) {
@@ -676,7 +678,6 @@  discard block
 block discarded – undo
676 678
 	/**
677 679
 	 * Returns item stored in list with index $key
678 680
 	 *
679
-	 * @param mixed $key
680 681
 	 * @return DataObject
681 682
 	 */
682 683
 	public function offsetGet($offset) {
@@ -686,7 +687,6 @@  discard block
 block discarded – undo
686 687
 	/**
687 688
 	 * Set an item with the key in $key
688 689
 	 *
689
-	 * @param mixed $key
690 690
 	 * @param mixed $value
691 691
 	 */
692 692
 	public function offsetSet($offset, $value) {
@@ -700,7 +700,6 @@  discard block
 block discarded – undo
700 700
 	/**
701 701
 	 * Unset an item with the key in $key
702 702
 	 *
703
-	 * @param mixed $key
704 703
 	 */
705 704
 	public function offsetUnset($offset) {
706 705
 		unset($this->items[$offset]);
Please login to merge, or discard this patch.
oembed/Oembed.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,7 @@  discard block
 block discarded – undo
46 46
 	 *
47 47
 	 * @param $url Human-readable URL.
48 48
 	 * @returns string/bool URL of an endpoint, or false if no matching provider exists.
49
+	 * @return string
49 50
 	 */
50 51
 	protected static function find_endpoint($url) {
51 52
 		foreach(self::get_providers() as $scheme=>$endpoint) {
@@ -117,7 +118,7 @@  discard block
 block discarded – undo
117 118
 	 * Given a response body, determine if there is an autodiscover url
118 119
 	 *
119 120
 	 * @param string $body
120
-	 * @return bool|string
121
+	 * @return string|false
121 122
 	 */
122 123
 	public static function autodiscover_from_body($body) {
123 124
 		// Look within the body for an oembed link.
@@ -355,6 +356,7 @@  discard block
 block discarded – undo
355 356
 
356 357
 	/**
357 358
 	 * Wrap the check for looking into Oembed JSON within $this->data.
359
+	 * @param string $field
358 360
 	 */
359 361
 	public function hasField($field) {
360 362
 		$this->loadData();
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.