Completed
Pull Request — 3 (#8086)
by Ingo
09:31 queued 34s
created
core/Config.php 1 patch
Doc Comments   +24 added lines, -1 removed lines patch added patch discarded remove patch
@@ -470,11 +470,17 @@  discard block
 block discarded – undo
470 470
 
471 471
 	protected $extraConfigSources = array();
472 472
 
473
+	/**
474
+	 * @param string $class
475
+	 */
473 476
 	public function extraConfigSourcesChanged($class) {
474 477
 		unset($this->extraConfigSources[$class]);
475 478
 		$this->cache->clean("__{$class}");
476 479
 	}
477 480
 
481
+	/**
482
+	 * @param integer $sourceOptions
483
+	 */
478 484
 	protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) {
479 485
 		$tags[] = "__{$class}";
480 486
 		$tags[] = "__{$class}__{$name}";
@@ -604,7 +610,7 @@  discard block
 block discarded – undo
604 610
 	 *
605 611
 	 * @param string $class The class to update a configuration value for
606 612
 	 * @param string $name  The configuration property name to update
607
-	 * @param mixed $value The value to update with
613
+	 * @param mixed $val The value to update with
608 614
 	 *
609 615
 	 * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value
610 616
 	 * replaces any item with the same key, for sequential arrays the items are placed at the end of the array, for
@@ -728,6 +734,10 @@  discard block
 block discarded – undo
728 734
 		$this->cache = $cloned;
729 735
 	}
730 736
 
737
+	/**
738
+	 * @param integer $key
739
+	 * @param integer $val
740
+	 */
731 741
 	public function set($key, $val, $tags = array()) {
732 742
 		// Find an index to set at
733 743
 		$replacing = null;
@@ -796,6 +806,9 @@  discard block
 block discarded – undo
796 806
 		}
797 807
 	}
798 808
 
809
+	/**
810
+	 * @param string $tag
811
+	 */
799 812
 	public function clean($tag = null) {
800 813
 		if ($tag) {
801 814
 			foreach ($this->cache as $i => $v) {
@@ -827,6 +840,10 @@  discard block
 block discarded – undo
827 840
 		$this->cache = array();
828 841
 	}
829 842
 
843
+	/**
844
+	 * @param integer $key
845
+	 * @param integer $val
846
+	 */
830 847
 	public function set($key, $val, $tags = array()) {
831 848
 		foreach($tags as $t) {
832 849
 			if(!isset($this->tags[$t])) {
@@ -845,6 +862,9 @@  discard block
 block discarded – undo
845 862
 		return $this->miss ? ($this->hit / $this->miss) : 0;
846 863
 	}
847 864
 
865
+	/**
866
+	 * @param integer $key
867
+	 */
848 868
 	public function get($key) {
849 869
 		list($hit, $result) = $this->checkAndGet($key);
850 870
 		return $hit ? $result : false;
@@ -864,6 +884,9 @@  discard block
 block discarded – undo
864 884
 		}
865 885
 	}
866 886
 
887
+	/**
888
+	 * @param string $tag
889
+	 */
867 890
 	public function clean($tag = null) {
868 891
 		if($tag) {
869 892
 			if(isset($this->tags[$tag])) {
Please login to merge, or discard this patch.
forms/FieldList.php 1 patch
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string $tabName The name of the tab or tabset.  Subtabs can be referred to as TabSet.Tab
134 134
 	 *                        or TabSet.Tab.Subtab. This function will create any missing tabs.
135 135
 	 * @param array $fields An array of {@link FormField} objects.
136
-	 * @param string $name Name of the field to insert before (optional)
136
+	 * @param string $insertBefore
137 137
 	 */
138 138
 	public function addFieldsToTab($tabName, $fields, $insertBefore = null) {
139 139
 		$this->flushFieldsCache();
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * Removes a number of fields from a Tab/TabSet within this FieldList.
174 174
 	 *
175 175
 	 * @param string $tabName The name of the Tab or TabSet field
176
-	 * @param array $fields A list of fields, e.g. array('Name', 'Email')
176
+	 * @param string[] $fields A list of fields, e.g. array('Name', 'Email')
177 177
 	 */
178 178
 	public function removeFieldsFromTab($tabName, $fields) {
179 179
 		$this->flushFieldsCache();
@@ -453,6 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
 	/**
455 455
 	 * Handler method called before the FieldList is going to be manipulated.
456
+	 * @param FormField $item
456 457
 	 */
457 458
 	protected function onBeforeInsert($item) {
458 459
 		$this->flushFieldsCache();
@@ -525,6 +526,7 @@  discard block
 block discarded – undo
525 526
 	 * Transform this FieldList with a given tranform method,
526 527
 	 * e.g. $this->transform(new ReadonlyTransformation())
527 528
 	 *
529
+	 * @param ReadonlyTransformation $trans
528 530
 	 * @return FieldList
529 531
 	 */
530 532
 	public function transform($trans) {
@@ -544,6 +546,9 @@  discard block
 block discarded – undo
544 546
 		else return $this;
545 547
 	}
546 548
 
549
+	/**
550
+	 * @param CompositeField $field
551
+	 */
547 552
 	public function setContainerField($field) {
548 553
 		$this->containerField = $field;
549 554
 		return $this;
@@ -562,6 +567,7 @@  discard block
 block discarded – undo
562 567
 	 * Transform the named field into a readonly feld.
563 568
 	 *
564 569
 	 * @param string|FormField
570
+	 * @param string $field
565 571
 	 */
566 572
 	public function makeFieldReadonly($field) {
567 573
 		$fieldName = ($field instanceof FormField) ? $field->getName() : $field;
@@ -616,6 +622,7 @@  discard block
 block discarded – undo
616 622
 	 * the children collection. Doesn't work recursively.
617 623
 	 *
618 624
 	 * @param string|FormField
625
+	 * @param string $field
619 626
 	 * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't
620 627
 	 *             be found.
621 628
 	 */
Please login to merge, or discard this patch.
forms/FormField.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -540,6 +540,7 @@  discard block
 block discarded – undo
540 540
 	 *
541 541
 	 * Caution: this doesn't work on all fields, see {@link setAttribute()}.
542 542
 	 *
543
+	 * @param string $name
543 544
 	 * @return null|string
544 545
 	 */
545 546
 	public function getAttribute($name) {
@@ -1201,7 +1202,7 @@  discard block
 block discarded – undo
1201 1202
 	 *
1202 1203
 	 * @param FieldList $containerFieldList
1203 1204
 	 *
1204
-	 * @return FieldList
1205
+	 * @return FormField
1205 1206
 	 */
1206 1207
 	public function setContainerFieldList($containerFieldList) {
1207 1208
 		$this->containerFieldList = $containerFieldList;
Please login to merge, or discard this patch.
forms/gridfield/GridFieldDataColumns.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -70,6 +70,7 @@
 block discarded – undo
70 70
 	/**
71 71
 	 * Get the DisplayFields
72 72
 	 *
73
+	 * @param GridField $gridField
73 74
 	 * @return array
74 75
 	 * @see GridFieldDataColumns::setDisplayFields
75 76
 	 */
Please login to merge, or discard this patch.
forms/gridfield/GridFieldSortableHeader.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * By default, this is set to true so that it's clearer what's happening, but the predefined
31 31
 	 * {@link GridFieldConfig} subclasses set this to false for flexibility.
32
+	 * @param boolean $throwExceptionOnBadDataType
32 33
 	 */
33 34
 	public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) {
34 35
 		$this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType;
@@ -44,6 +45,7 @@  discard block
 block discarded – undo
44 45
 	/**
45 46
 	 * Check that this dataList is of the right data type.
46 47
 	 * Returns false if it's a bad data type, and if appropriate, throws an exception.
48
+	 * @param SS_List $dataList
47 49
 	 */
48 50
 	protected function checkDataType($dataList) {
49 51
 		if($dataList instanceof SS_Sortable) {
Please login to merge, or discard this patch.
forms/HtmlEditorSanitiser.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	/**
40 40
 	 * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match
41 41
 	 *
42
-	 * @param $str - The TinyMCE pattern
42
+	 * @param string|null $str - The TinyMCE pattern
43 43
 	 * @return string - The equivalent regex
44 44
 	 */
45 45
 	protected function patternToRegex($str) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	/**
182 182
 	 * Given an attribute name, return the rule structure for that attribute
183 183
 	 *
184
-	 * @param object $elementRule
184
+	 * @param stdClass $elementRule
185 185
 	 * @param string $name The attribute name
186 186
 	 * @return stdClass The attribute rule
187 187
 	 */
Please login to merge, or discard this patch.
forms/TreeDropdownField.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @param string $name the field name
85 85
 	 * @param string $title the field label
86
-	 * @param string|array $sourceObject The object-type to list in the tree. This could
86
+	 * @param string $sourceObject The object-type to list in the tree. This could
87 87
 	 * be one of the following:
88 88
 	 * - A DataObject class name with the {@link Hierarchy} extension.
89 89
 	 * - An array of key/value pairs, like a {@link DropdownField} source. In
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	}
212 212
 
213 213
 	/**
214
-	 * @return HTMLText
214
+	 * @return string
215 215
 	 */
216 216
 	public function Field($properties = array()) {
217 217
 		Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
@@ -446,7 +446,6 @@  discard block
 block discarded – undo
446 446
 	}
447 447
 
448 448
 	/**
449
-	 * @param string $field
450 449
 	 * @return $this
451 450
 	 */
452 451
 	public function setSourceObject($class) {
Please login to merge, or discard this patch.
forms/UploadField.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -305,6 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
 	/**
307 307
 	 * @param String
308
+	 * @param string $name
308 309
 	 */
309 310
 	public function setDisplayFolderName($name) {
310 311
 		$this->displayFolderName = $name;
@@ -1046,7 +1047,7 @@  discard block
 block discarded – undo
1046 1047
 
1047 1048
 	/**
1048 1049
 	 * @param SS_HTTPRequest $request
1049
-	 * @return UploadField_ItemHandler
1050
+	 * @return UploadField_SelectHandler
1050 1051
 	 */
1051 1052
 	public function handleSelect(SS_HTTPRequest $request) {
1052 1053
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1404,7 +1405,7 @@  discard block
 block discarded – undo
1404 1405
 	 * Action to handle editing of a single file
1405 1406
 	 *
1406 1407
 	 * @param SS_HTTPRequest $request
1407
-	 * @return ViewableData_Customised
1408
+	 * @return HTMLText
1408 1409
 	 */
1409 1410
 	public function edit(SS_HTTPRequest $request) {
1410 1411
 		// Check form field state
Please login to merge, or discard this patch.
parsers/ShortcodeParser.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -162,6 +162,9 @@  discard block
 block discarded – undo
162 162
 
163 163
 	// --------------------------------------------------------------------------------------------------------------
164 164
 
165
+	/**
166
+	 * @param DOMElement $node
167
+	 */
165 168
 	protected function removeNode($node) {
166 169
 		$node->parentNode->removeChild($node);
167 170
 	}
@@ -177,6 +180,9 @@  discard block
 block discarded – undo
177 180
 		}
178 181
 	}
179 182
 
183
+	/**
184
+	 * @param DOMElement $after
185
+	 */
180 186
 	protected function insertListAfter($new, $after) {
181 187
 		$doc = $after->ownerDocument; $parent = $after->parentNode; $next = $after->nextSibling;
182 188
 
Please login to merge, or discard this patch.