Completed
Push — webpack ( fbc7ef...83d13f )
by Sam
11:15 queued 03:01
created
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
@@ -484,7 +484,7 @@
 block discarded – undo
484 484
 	/**
485 485
 	 * Given an index spec determines the index type
486 486
 	 *
487
-	 * @param array|string $spec
487
+	 * @param string $spec
488 488
 	 * @return string
489 489
 	 */
490 490
 	protected function determineIndexType($spec) {
Please login to merge, or discard this patch.
tests/view/SSViewerTest.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -128,6 +128,10 @@  discard block
 block discarded – undo
128 128
 		));
129 129
 	}
130 130
 
131
+	/**
132
+	 * @param DBHTMLText $result
133
+	 * @param string[] $expected
134
+	 */
131 135
 	private function assertExpectedStrings($result, $expected) {
132 136
 		foreach ($expected as $expectedStr) {
133 137
 			$this->assertTrue(
@@ -787,6 +791,10 @@  discard block
 block discarded – undo
787 791
 		$this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult);
788 792
 	}
789 793
 
794
+	/**
795
+	 * @param string $a
796
+	 * @param string $b
797
+	 */
790 798
 	public function assertEqualIgnoringWhitespace($a, $b) {
791 799
 		$this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b));
792 800
 	}
@@ -1375,6 +1383,11 @@  discard block
 block discarded – undo
1375 1383
 		Config::inst()->update('SSViewer', 'source_file_comments', false);
1376 1384
 		Config::inst()->update('Director', 'environment_type', $origEnv);
1377 1385
 	}
1386
+
1387
+	/**
1388
+	 * @param string $name
1389
+	 * @param string $expected
1390
+	 */
1378 1391
 	private function _renderWithSourceFileComments($name, $expected) {
1379 1392
 		$viewer = new SSViewer(array($name));
1380 1393
 		$data = new ArrayData(array());
Please login to merge, or discard this patch.
view/SSViewer.php 1 patch
Doc Comments   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -370,7 +370,6 @@  discard block
 block discarded – undo
370 370
 	/**
371 371
 	 * Returns the modulus of the numerical position of the item in the data set.
372 372
 	 * The count starts from $startIndex, which defaults to 1.
373
-	 * @param int $Mod The number to perform Mod operation to.
374 373
 	 * @param int $startIndex Number to start count from.
375 374
 	 * @return int
376 375
 	 */
@@ -444,6 +443,10 @@  discard block
 block discarded – undo
444 443
 		$this->underlay = $underlay ? $underlay : array();
445 444
 	}
446 445
 
446
+	/**
447
+	 * @param string $interfaceToQuery
448
+	 * @param string $variableMethod
449
+	 */
447 450
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
448 451
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
449 452
 		if($implementers) foreach($implementers as $implementer) {
@@ -843,7 +846,7 @@  discard block
 block discarded – undo
843 846
 	 *
844 847
 	 * @param $className string - valid class name
845 848
 	 * @param $suffix string
846
-	 * @param $baseClass string
849
+	 * @param string $baseClass string
847 850
 	 *
848 851
 	 * @return array
849 852
 	 */
@@ -873,7 +876,7 @@  discard block
 block discarded – undo
873 876
 	}
874 877
 
875 878
 	/**
876
-	 * @param string|array $templateList If passed as a string with .ss extension, used as the "main" template.
879
+	 * @param string|array $templates If passed as a string with .ss extension, used as the "main" template.
877 880
 	 *  If passed as an array, it can be used for template inheritance (first found template "wins").
878 881
 	 *  Usually the array values are PHP class names, which directly correlate to template names.
879 882
 	 *  <code>
@@ -1226,7 +1229,7 @@  discard block
 block discarded – undo
1226 1229
 	 * @param string $template Template name
1227 1230
 	 * @param mixed $data Data context
1228 1231
 	 * @param array $arguments Additional arguments
1229
-	 * @return string Evaluated result
1232
+	 * @return DBHTMLText Evaluated result
1230 1233
 	 */
1231 1234
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1232 1235
 		$v = new SSViewer($template);
@@ -1252,6 +1255,9 @@  discard block
 block discarded – undo
1252 1255
 		return $v->process($data, $arguments);
1253 1256
 	}
1254 1257
 
1258
+	/**
1259
+	 * @param string $content
1260
+	 */
1255 1261
 	public function parseTemplateContent($content, $template="") {
1256 1262
 		return $this->getParser()->compileString(
1257 1263
 			$content,
@@ -1281,7 +1287,7 @@  discard block
 block discarded – undo
1281 1287
 	 * Return an appropriate base tag for the given template.
1282 1288
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1283 1289
 	 *
1284
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1290
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1285 1291
 	 * the DOCTYPE declaration.
1286 1292
 	 */
1287 1293
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1322,6 +1328,9 @@  discard block
 block discarded – undo
1322 1328
 	 */
1323 1329
 	protected $cacheTemplate;
1324 1330
 
1331
+	/**
1332
+	 * @param string $content
1333
+	 */
1325 1334
 	public function __construct($content, TemplateParser $parser = null) {
1326 1335
 		if ($parser) {
1327 1336
 			$this->setParser($parser);
Please login to merge, or discard this patch.
control/HTTPRequest.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 	 * it's only advisable to send small files through this method.
386 386
 	 *
387 387
 	 * @static
388
-	 * @param $fileData
388
+	 * @param string $fileData
389 389
 	 * @param $fileName
390
-	 * @param null $mimeType
390
+	 * @param string $mimeType
391 391
 	 * @return SS_HTTPResponse
392 392
 	 */
393 393
 	public static function send_file($fileData, $fileName, $mimeType = null) {
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 	 * This is used by the request handler to prevent infinite parsing loops.
606 606
 	 *
607 607
 	 * @param $pattern
608
-	 * @return bool
608
+	 * @return boolean|null
609 609
 	 */
610 610
 	public function isEmptyPattern($pattern) {
611 611
 		if(preg_match('/^([A-Za-z]+) +(.*)$/', $pattern, $matches)) {
Please login to merge, or discard this patch.
control/HTTPResponse.php 1 patch
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 *  No newlines are allowed in the description.
110 110
 	 *  If omitted, will default to the standard HTTP description
111 111
 	 *  for the given $code value (see {@link $status_codes}).
112
-	 * @return SS_HTTPRequest $this
112
+	 * @return SS_HTTPResponse $this
113 113
 	 */
114 114
 	public function setStatusCode($code, $description = null) {
115 115
 		if(isset(self::$status_codes[$code])) $this->statusCode = $code;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * Caution: Will be overwritten by {@link setStatusCode()}.
126 126
 	 *
127 127
 	 * @param string $description
128
-	 * @return SS_HTTPRequest $this
128
+	 * @return SS_HTTPResponse $this
129 129
 	 */
130 130
 	public function setStatusDescription($description) {
131 131
 		$this->statusDescription = $description;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
 	/**
159 159
 	 * @param string $body
160
-	 * @return SS_HTTPRequest $this
160
+	 * @return SS_HTTPResponse $this
161 161
 	 */
162 162
 	public function setBody($body) {
163 163
 		$this->body = $body ? (string) $body : $body; // Don't type-cast false-ish values, eg null is null not ''
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 *
177 177
 	 * @param string $header Example: "Content-Type"
178 178
 	 * @param string $value Example: "text/xml"
179
-	 * @return SS_HTTPRequest $this
179
+	 * @return SS_HTTPResponse $this
180 180
 	 */
181 181
 	public function addHeader($header, $value) {
182 182
 		$this->headers[$header] = $value;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 * e.g. "Content-Type".
207 207
 	 *
208 208
 	 * @param string $header
209
-	 * @return SS_HTTPRequest $this
209
+	 * @return SS_HTTPResponse $this
210 210
 	 */
211 211
 	public function removeHeader($header) {
212 212
 		if(isset($this->headers[$header])) unset($this->headers[$header]);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	/**
217 217
 	 * @param string $dest
218 218
 	 * @param int $code
219
-	 * @return SS_HTTPRequest $this
219
+	 * @return SS_HTTPResponse $this
220 220
 	 */
221 221
 	public function redirect($dest, $code=302) {
222 222
 		if(!in_array($code, self::$redirect_codes)) $code = 302;
@@ -316,6 +316,7 @@  discard block
 block discarded – undo
316 316
 	 * @param string|SS_HTTPResponse body Either the plaintext content of the error message, or an SS_HTTPResponse
317 317
 	 *                                     object representing it.  In either case, the $statusCode and
318 318
 	 *                                     $statusDescription will be the HTTP status of the resulting response.
319
+	 * @param string $statusDescription
319 320
 	 * @see SS_HTTPResponse::__construct();
320 321
 	 */
321 322
 	public function __construct($body = null, $statusCode = null, $statusDescription = null) {
Please login to merge, or discard this patch.
core/manifest/ManifestCache.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -7,9 +7,27 @@
 block discarded – undo
7 7
  * @subpackage manifest
8 8
  */
9 9
 interface ManifestCache {
10
+
11
+	/**
12
+	 * @return void
13
+	 */
10 14
 	public function __construct($name);
15
+
16
+	/**
17
+	 * @param string $key
18
+	 */
11 19
 	public function load($key);
20
+
21
+	/**
22
+	 * @param string $key
23
+	 *
24
+	 * @return void
25
+	 */
12 26
 	public function save($data, $key);
27
+
28
+	/**
29
+	 * @return void
30
+	 */
13 31
 	public function clear();
14 32
 }
15 33
 
Please login to merge, or discard this patch.
forms/CompositeField.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -214,6 +214,9 @@  discard block
 block discarded – undo
214 214
 
215 215
 
216 216
 
217
+	/**
218
+	 * @param boolean $disabled
219
+	 */
217 220
 	public function setDisabled($disabled) {
218 221
 		parent::setDisabled($disabled);
219 222
 		foreach($this->getChildren() as $child) {
@@ -222,6 +225,9 @@  discard block
 block discarded – undo
222 225
 		return $this;
223 226
 	}
224 227
 
228
+	/**
229
+	 * @param boolean $readonly
230
+	 */
225 231
 	public function setReadonly($readonly)
226 232
 	{
227 233
 		parent::setReadonly($readonly);
@@ -367,6 +373,9 @@  discard block
 block discarded – undo
367 373
 		return $clone;
368 374
 	}
369 375
 
376
+	/**
377
+	 * @return boolean
378
+	 */
370 379
 	public function IsReadonly() {
371 380
 		return $this->readonly;
372 381
 	}
@@ -376,6 +385,7 @@  discard block
 block discarded – undo
376 385
 	 * the children collection. Doesn't work recursively.
377 386
 	 *
378 387
 	 * @param string|FormField
388
+	 * @param string $field
379 389
 	 * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't
380 390
 	 *             be found.
381 391
 	 */
Please login to merge, or discard this patch.
forms/DatetimeField.php 1 patch
Doc Comments   +22 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,6 +64,10 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	protected $config;
66 66
 
67
+	/**
68
+	 * @param string $name
69
+	 * @param string $title
70
+	 */
67 71
 	public function __construct($name, $title = null, $value = ""){
68 72
 		$this->config = $this->config()->default_config;
69 73
 
@@ -74,6 +78,9 @@  discard block
 block discarded – undo
74 78
 		parent::__construct($name, $title, $value);
75 79
 	}
76 80
 
81
+	/**
82
+	 * @param Form $form
83
+	 */
77 84
 	public function setForm($form) {
78 85
 		parent::setForm($form);
79 86
 
@@ -84,6 +91,9 @@  discard block
 block discarded – undo
84 91
 		return $this;
85 92
 	}
86 93
 
94
+	/**
95
+	 * @param string $name
96
+	 */
87 97
 	public function setName($name) {
88 98
 		parent::setName($name);
89 99
 
@@ -96,7 +106,7 @@  discard block
 block discarded – undo
96 106
 
97 107
 	/**
98 108
 	 * @param array $properties
99
-	 * @return string
109
+	 * @return DBHTMLText
100 110
 	 */
101 111
 	public function FieldHolder($properties = array()) {
102 112
 		$config = array(
@@ -110,7 +120,7 @@  discard block
 block discarded – undo
110 120
 
111 121
 	/**
112 122
 	 * @param array $properties
113
-	 * @return string
123
+	 * @return DBHTMLText
114 124
 	 */
115 125
 	public function Field($properties = array()) {
116 126
 		Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/DatetimeField.css');
@@ -223,6 +233,9 @@  discard block
 block discarded – undo
223 233
 		return $this;
224 234
 	}
225 235
 
236
+	/**
237
+	 * @param boolean $bool
238
+	 */
226 239
 	public function setReadonly($bool) {
227 240
 		parent::setReadonly($bool);
228 241
 		$this->dateField->setReadonly($bool);
@@ -240,6 +253,7 @@  discard block
 block discarded – undo
240 253
 
241 254
 	/**
242 255
 	 * @param FormField
256
+	 * @param DateField $field
243 257
 	 */
244 258
 	public function setDateField($field) {
245 259
 		$expected = $this->getName() . '[date]';
@@ -265,6 +279,7 @@  discard block
 block discarded – undo
265 279
 
266 280
 	/**
267 281
 	 * @param FormField
282
+	 * @param TimeField $field
268 283
 	 */
269 284
 	public function setTimeField($field) {
270 285
 		$expected = $this->getName() . '[time]';
@@ -312,7 +327,7 @@  discard block
 block discarded – undo
312 327
 	 * to set field-specific config options.
313 328
 	 *
314 329
 	 * @param string $name
315
-	 * @param mixed $val
330
+	 * @param string $val
316 331
 	 */
317 332
 	public function setConfig($name, $val) {
318 333
 		$this->config[$name] = $val;
@@ -330,7 +345,7 @@  discard block
 block discarded – undo
330 345
 	 * to get field-specific config options.
331 346
 	 *
332 347
 	 * @param String $name Optional, returns the whole configuration array if empty
333
-	 * @return mixed
348
+	 * @return string
334 349
 	 */
335 350
 	public function getConfig($name = null) {
336 351
 		if($name) {
@@ -340,6 +355,9 @@  discard block
 block discarded – undo
340 355
 		}
341 356
 	}
342 357
 
358
+	/**
359
+	 * @param RequiredFields $validator
360
+	 */
343 361
 	public function validate($validator) {
344 362
 		$dateValid = $this->dateField->validate($validator);
345 363
 		$timeValid = $this->timeField->validate($validator);
Please login to merge, or discard this patch.