Completed
Pull Request — master (#5776)
by Damian
10:49
created
forms/DatetimeField.php 1 patch
Doc Comments   +18 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,6 +63,10 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	protected $config;
65 65
 
66
+	/**
67
+	 * @param string $name
68
+	 * @param string $title
69
+	 */
66 70
 	public function __construct($name, $title = null, $value = ""){
67 71
 		$this->config = $this->config()->default_config;
68 72
 
@@ -75,6 +79,9 @@  discard block
 block discarded – undo
75 79
 		parent::__construct($name, $title, $value);
76 80
 	}
77 81
 
82
+	/**
83
+	 * @param Form $form
84
+	 */
78 85
 	public function setForm($form) {
79 86
 		parent::setForm($form);
80 87
 
@@ -85,6 +92,9 @@  discard block
 block discarded – undo
85 92
 		return $this;
86 93
 	}
87 94
 
95
+	/**
96
+	 * @param string $name
97
+	 */
88 98
 	public function setName($name) {
89 99
 		parent::setName($name);
90 100
 
@@ -97,7 +107,7 @@  discard block
 block discarded – undo
97 107
 
98 108
 	/**
99 109
 	 * @param array $properties
100
-	 * @return string
110
+	 * @return DBHTMLText
101 111
 	 */
102 112
 	public function FieldHolder($properties = array()) {
103 113
 		$config = array(
@@ -249,6 +259,7 @@  discard block
 block discarded – undo
249 259
 
250 260
 	/**
251 261
 	 * @param FormField
262
+	 * @param DateField $field
252 263
 	 */
253 264
 	public function setDateField($field) {
254 265
 		$expected = $this->getName() . '[date]';
@@ -274,6 +285,7 @@  discard block
 block discarded – undo
274 285
 
275 286
 	/**
276 287
 	 * @param FormField
288
+	 * @param TimeField $field
277 289
 	 */
278 290
 	public function setTimeField($field) {
279 291
 		$expected = $this->getName() . '[time]';
@@ -312,7 +324,7 @@  discard block
 block discarded – undo
312 324
 	 * to set field-specific config options.
313 325
 	 *
314 326
 	 * @param string $name
315
-	 * @param mixed $val
327
+	 * @param string $val
316 328
 	 */
317 329
 	public function setConfig($name, $val) {
318 330
 		$this->config[$name] = $val;
@@ -330,7 +342,7 @@  discard block
 block discarded – undo
330 342
 	 * to get field-specific config options.
331 343
 	 *
332 344
 	 * @param String $name Optional, returns the whole configuration array if empty
333
-	 * @return mixed
345
+	 * @return string|null
334 346
 	 */
335 347
 	public function getConfig($name = null) {
336 348
 		if($name) {
@@ -340,6 +352,9 @@  discard block
 block discarded – undo
340 352
 		}
341 353
 	}
342 354
 
355
+	/**
356
+	 * @param RequiredFields $validator
357
+	 */
343 358
 	public function validate($validator) {
344 359
 		$dateValid = $this->dateField->validate($validator);
345 360
 		$timeValid = $this->timeField->validate($validator);
Please login to merge, or discard this patch.
forms/FileField.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 	/**
89 89
 	 * @param array $properties
90
-	 * @return string
90
+	 * @return DBHTMLText
91 91
 	 */
92 92
 	public function Field($properties = array()) {
93 93
 		$properties = array_merge($properties, array(
@@ -251,7 +251,6 @@  discard block
 block discarded – undo
251 251
 	 * for each of these categories
252 252
 	 *
253 253
 	 * @param string $category Category name
254
-	 * @param string,... $categories Additional category names
255 254
 	 * @return $this
256 255
 	 */
257 256
 	public function setAllowedFileCategories($category) {
Please login to merge, or discard this patch.
forms/FormAction.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 	/**
95 95
 	 * @param array $properties
96
-	 * @return string
96
+	 * @return DBHTMLText
97 97
 	 */
98 98
 	public function Field($properties = array()) {
99 99
 		$properties = array_merge(
@@ -158,6 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * Enable or disable the rendering of this action as a <button />
159 159
 	 *
160 160
 	 * @param boolean
161
+	 * @param boolean $bool
161 162
 	 * @return $this
162 163
 	 */
163 164
 	public function setUseButtonTag($bool) {
Please login to merge, or discard this patch.
forms/HiddenField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * @param array $properties
15
-	 * @return string
15
+	 * @return DBHTMLText
16 16
 	 */
17 17
 	public function FieldHolder($properties = array()) {
18 18
 		return $this->Field($properties);
Please login to merge, or discard this patch.
forms/LookupField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 *
25 25
 	 * @param array $properties
26 26
 	 *
27
-	 * @return string
27
+	 * @return SilverStripe\ORM\FieldType\DBHTMLText
28 28
 	 */
29 29
 	public function Field($properties = array()) {
30 30
 		$source = ArrayLib::flatten($this->getSource());
Please login to merge, or discard this patch.
forms/TreeDropdownField.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @param string $name the field name
82 82
 	 * @param string $title the field label
83
-	 * @param string|array $sourceObject The object-type to list in the tree. This could
83
+	 * @param string $sourceObject The object-type to list in the tree. This could
84 84
 	 * be one of the following:
85 85
 	 * - A DataObject class name with the {@link Hierarchy} extension.
86 86
 	 * - An array of key/value pairs, like a {@link DropdownField} source. In
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
 	/**
218 218
 	 * @param array $properties
219
-	 * @return string
219
+	 * @return DBHTMLText
220 220
 	 */
221 221
 	public function Field($properties = array()) {
222 222
 		Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang');
Please login to merge, or discard this patch.
forms/UploadField.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	/**
286 286
 	 * Determine if the target folder for new uploads in is visible the field UI.
287 287
 	 *
288
-	 * @return boolean
288
+	 * @return boolean|string
289 289
 	 */
290 290
 	public function canPreviewFolder() {
291 291
 		if(!$this->isActive()) return false;
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 	/**
639 639
 	 * Determine if the user has permission to upload.
640 640
 	 *
641
-	 * @return boolean
641
+	 * @return boolean|string
642 642
 	 */
643 643
 	public function canUpload() {
644 644
 		if(!$this->isActive()) return false;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 	 * Determine if the user has permission to attach existing files
663 663
 	 * By default returns true if the user has the CMS_ACCESS_AssetAdmin permission
664 664
 	 *
665
-	 * @return boolean
665
+	 * @return boolean|string
666 666
 	 */
667 667
 	public function canAttachExisting() {
668 668
 		if(!$this->isActive()) return false;
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
 
1095 1095
 	/**
1096 1096
 	 * @param SS_HTTPRequest $request
1097
-	 * @return UploadField_ItemHandler
1097
+	 * @return UploadField_SelectHandler
1098 1098
 	 */
1099 1099
 	public function handleSelect(SS_HTTPRequest $request) {
1100 1100
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
 	 * Action to handle editing of a single file
1458 1458
 	 *
1459 1459
 	 * @param SS_HTTPRequest $request
1460
-	 * @return ViewableData_Customised
1460
+	 * @return DBHTMLText
1461 1461
 	 */
1462 1462
 	public function edit(SS_HTTPRequest $request) {
1463 1463
 		// Check form field state
Please login to merge, or discard this patch.
ORM/Connect/DBSchemaManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -475,7 +475,7 @@
 block discarded – undo
475 475
 	/**
476 476
 	 * Given an index spec determines the index type
477 477
 	 *
478
-	 * @param array|string $spec
478
+	 * @param string $spec
479 479
 	 * @return string
480 480
 	 */
481 481
 	protected function determineIndexType($spec) {
Please login to merge, or discard this patch.
ORM/FieldType/DBField.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	/**
277 277
 	 * Get the table this field belongs to, if assigned
278 278
 	 *
279
-	 * @return string|null
279
+	 * @return string
280 280
 	 */
281 281
 	public function getTable() {
282 282
 		return $this->tableName;
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 	}
477 477
 
478 478
 	/**
479
-	 * @param array $value
479
+	 * @param string $value
480 480
 	 * @return $this
481 481
 	 */
482 482
 	public function setArrayValue($value) {
Please login to merge, or discard this patch.