Completed
Push — php7-support ( 4474fe...119dc9 )
by Sam
06:04
created
tests/view/ViewableDataTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -252,6 +252,9 @@
 block discarded – undo
252 252
 
253 253
 class ViewableDataTest_Container extends ViewableData {
254 254
 
255
+	/**
256
+	 * @param ViewableDataTest_Castable $failover
257
+	 */
255 258
 	public function __construct($failover) {
256 259
 		$this->failover = $failover;
257 260
 		parent::__construct();
Please login to merge, or discard this patch.
view/ArrayData.php 1 patch
Doc Comments   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,14 +50,7 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * Gets a field from this object.
52 52
 	 *
53
-	 * @param string $field
54
-	 *
55
-	 * If the value is an object but not an instance of
56
-	 * ViewableData, it will be converted recursively to an
57
-	 * ArrayData.
58
-	 *
59
-	 * If the value is an associative array, it will likewise be
60
-	 * converted recursively to an ArrayData.
53
+	 * @param string $f
61 54
 	 */
62 55
 	public function getField($f) {
63 56
 		$value = $this->array[$f];
@@ -73,7 +66,7 @@  discard block
 block discarded – undo
73 66
 	* Add or set a field on this object.
74 67
 	*
75 68
 	* @param string $field
76
-	* @param mixed $value
69
+	* @param string $value
77 70
 	*/
78 71
 	public function setField($field, $value) {
79 72
 		$this->array[$field] = $value;
@@ -83,6 +76,7 @@  discard block
 block discarded – undo
83 76
 	 * Check array to see if field isset
84 77
 	 *
85 78
 	 * @param string Field Key
79
+	 * @param string $f
86 80
 	 * @return bool
87 81
 	 */
88 82
 	public function hasField($f) {
@@ -93,7 +87,7 @@  discard block
 block discarded – undo
93 87
 	 * Converts an associative array to a simple object
94 88
 	 *
95 89
 	 * @param array
96
-	 * @return obj $obj
90
+	 * @return stdClass $obj
97 91
 	 */
98 92
 	public static function array_to_object($arr = null) {
99 93
 		$obj = new stdClass();
Please login to merge, or discard this patch.
view/Requirements.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,6 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * while automatically busting this cache every time the file is changed.
66 66
 	 *
67 67
 	 * @param bool
68
+	 * @param boolean $var
68 69
 	 */
69 70
 	public static function set_suffix_requirements($var) {
70 71
 		self::backend()->setSuffixRequirements($var);
@@ -744,6 +745,7 @@  discard block
 block discarded – undo
744 745
 	 * Forces the JavaScript requirements to the end of the body, right before the closing tag
745 746
 	 *
746 747
 	 * @param bool
748
+	 * @param boolean $var
747 749
 	 * @return $this
748 750
 	 */
749 751
 	public function setForceJSToBottom($var) {
@@ -1534,8 +1536,8 @@  discard block
 block discarded – undo
1534 1536
 	/**
1535 1537
 	 * Given a filename and list of files, generate a new filename unique to these files
1536 1538
 	 *
1537
-	 * @param string $name
1538
-	 * @param array $files
1539
+	 * @param array $fileList
1540
+	 * @param string $combinedFile
1539 1541
 	 * @return string
1540 1542
 	 */
1541 1543
 	protected function hashedCombinedFilename($combinedFile, $fileList) {
Please login to merge, or discard this patch.
view/SSTemplateParser.php 1 patch
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,6 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
 	/**
113 113
 	 * Override the function that constructs the result arrays to also prepare a 'php' item in the array
114
+	 * @param string $matchrule
115
+	 * @param string $name
114 116
 	 */
115 117
 	function construct($matchrule, $name, $arguments = null) {
116 118
 		$res = parent::construct($matchrule, $name, $arguments);
@@ -172,9 +174,9 @@  discard block
 block discarded – undo
172 174
 
173 175
 	/**
174 176
 	 * Ensures that the arguments to addOpenBlock and addClosedBlock are valid
175
-	 * @param $name
176
-	 * @param $callable
177
-	 * @param $type
177
+	 * @param string $name
178
+	 * @param callable $callable
179
+	 * @param string $type
178 180
 	 * @throws InvalidArgumentException
179 181
 	 */
180 182
 	protected function validateExtensionBlock($name, $callable, $type) {
@@ -737,6 +739,7 @@  discard block
 block discarded – undo
737 739
 	 * The basic generated PHP of LookupStep and LastLookupStep is the same, except that LookupStep calls 'obj' to
738 740
 	 * get the next ViewableData in the sequence, and LastLookupStep calls different methods (XML_val, hasValue, obj)
739 741
 	 * depending on the context the lookup is used in.
742
+	 * @param string $method
740 743
 	 */
741 744
 	function Lookup_AddLookupStep(&$res, $sub, $method) {
742 745
 		$res['LookupSteps'][] = $sub;
@@ -4691,8 +4694,8 @@  discard block
 block discarded – undo
4691 4694
 	 * Compiles some passed template source code into the php code that will execute as per the template source.
4692 4695
 	 *
4693 4696
 	 * @throws SSTemplateParseException
4694
-	 * @param  $string The source of the template
4695
-	 * @param string $templateName The name of the template, normally the filename the template source was loaded from
4697
+	 * @param  string $string The source of the template
4698
+	 * @param string string The name of the template, normally the filename the template source was loaded from
4696 4699
 	 * @param bool $includeDebuggingComments True is debugging comments should be included in the output
4697 4700
 	 * @param bool $topTemplate True if this is a top template, false if it's just a template
4698 4701
 	 * @return mixed|string The php that, when executed (via include or exec) will behave as per the template source
@@ -4732,6 +4735,7 @@  discard block
 block discarded – undo
4732 4735
 
4733 4736
 	/**
4734 4737
 	 * @param string $code
4738
+	 * @param string $templateName
4735 4739
 	 * @return string $code
4736 4740
 	 */
4737 4741
 	protected function includeDebuggingComments($code, $templateName) {
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
@@ -338,7 +338,6 @@  discard block
 block discarded – undo
338 338
 	/**
339 339
 	 * Returns the modulus of the numerical position of the item in the data set.
340 340
 	 * The count starts from $startIndex, which defaults to 1.
341
-	 * @param int $Mod The number to perform Mod operation to.
342 341
 	 * @param int $startIndex Number to start count from.
343 342
 	 * @return int
344 343
 	 */
@@ -412,6 +411,10 @@  discard block
 block discarded – undo
412 411
 		$this->underlay = $underlay ? $underlay : array();
413 412
 	}
414 413
 
414
+	/**
415
+	 * @param string $interfaceToQuery
416
+	 * @param string $variableMethod
417
+	 */
415 418
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
416 419
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
417 420
 		if($implementers) foreach($implementers as $implementer) {
@@ -753,7 +756,7 @@  discard block
 block discarded – undo
753 756
 	 *
754 757
 	 * @param $className string - valid class name
755 758
 	 * @param $suffix string
756
-	 * @param $baseClass string
759
+	 * @param string $baseClass string
757 760
 	 *
758 761
 	 * @return array
759 762
 	 */
@@ -1083,7 +1086,7 @@  discard block
 block discarded – undo
1083 1086
 	 * @param array|null $arguments - arguments to an included template
1084 1087
 	 * @param Object $inheritedScope - the current scope of a parent template including a sub-template
1085 1088
 	 *
1086
-	 * @return HTMLText Parsed template output.
1089
+	 * @return DBField Parsed template output.
1087 1090
 	 */
1088 1091
 	public function process($item, $arguments = null, $inheritedScope = null) {
1089 1092
 		SSViewer::$topLevel[] = $item;
@@ -1158,7 +1161,7 @@  discard block
 block discarded – undo
1158 1161
 	 * @param string $template Template name
1159 1162
 	 * @param mixed $data Data context
1160 1163
 	 * @param array $arguments Additional arguments
1161
-	 * @return string Evaluated result
1164
+	 * @return DBField Evaluated result
1162 1165
 	 */
1163 1166
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1164 1167
 		$v = new SSViewer($template);
@@ -1184,6 +1187,9 @@  discard block
 block discarded – undo
1184 1187
 		return $v->process($data, $arguments);
1185 1188
 	}
1186 1189
 
1190
+	/**
1191
+	 * @param string $content
1192
+	 */
1187 1193
 	public function parseTemplateContent($content, $template="") {
1188 1194
 		return $this->getParser()->compileString(
1189 1195
 			$content,
@@ -1212,7 +1218,7 @@  discard block
 block discarded – undo
1212 1218
 	 * Return an appropriate base tag for the given template.
1213 1219
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1214 1220
 	 *
1215
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1221
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1216 1222
 	 * the DOCTYPE declaration.
1217 1223
 	 */
1218 1224
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1253,6 +1259,9 @@  discard block
 block discarded – undo
1253 1259
 	 */
1254 1260
 	protected $cacheTemplate;
1255 1261
 
1262
+	/**
1263
+	 * @param string $content
1264
+	 */
1256 1265
 	public function __construct($content, TemplateParser $parser = null) {
1257 1266
 		if ($parser) {
1258 1267
 			$this->setParser($parser);
Please login to merge, or discard this patch.
view/ViewableData.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -192,8 +192,6 @@  discard block
 block discarded – undo
192 192
 	/**
193 193
 	 * Method to facilitate deprecation of underscore-prefixed methods automatically being cached.
194 194
 	 *
195
-	 * @param string $field
196
-	 * @param array $arguments
197 195
 	 * @param string $identifier an optional custom cache identifier
198 196
 	 * @return unknown
199 197
 	 */
@@ -254,7 +252,7 @@  discard block
 block discarded – undo
254 252
 	 *  - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)")
255 253
 	 *
256 254
 	 * @param string $field
257
-	 * @return array
255
+	 * @return string
258 256
 	 */
259 257
 	public function castingHelperPair($field) {
260 258
 		Deprecation::notice('2.5', 'use castingHelper() instead');
@@ -346,7 +344,7 @@  discard block
 block discarded – undo
346 344
 	 *
347 345
 	 * @param string|array|SSViewer $template the template to render into
348 346
 	 * @param array $customFields fields to customise() the object with before rendering
349
-	 * @return HTMLText
347
+	 * @return DBField
350 348
 	 */
351 349
 	public function renderWith($template, $customFields = null) {
352 350
 		if(!is_object($template)) {
@@ -506,6 +504,7 @@  discard block
 block discarded – undo
506 504
 
507 505
 	/**
508 506
 	 * Return the value of a field in an SQL-safe format.
507
+	 * @param string $field
509 508
 	 */
510 509
 	public function SQL_val($field, $arguments = null, $cache = true) {
511 510
 		return Convert::raw2sql($this->RAW_val($field, $arguments, $cache));
@@ -513,6 +512,7 @@  discard block
 block discarded – undo
513 512
 
514 513
 	/**
515 514
 	 * Return the value of a field in a JavaScript-save format.
515
+	 * @param string $field
516 516
 	 */
517 517
 	public function JS_val($field, $arguments = null, $cache = true) {
518 518
 		return Convert::raw2js($this->RAW_val($field, $arguments, $cache));
@@ -520,6 +520,7 @@  discard block
 block discarded – undo
520 520
 
521 521
 	/**
522 522
 	 * Return the value of a field escaped suitable to be inserted into an XML node attribute.
523
+	 * @param string $field
523 524
 	 */
524 525
 	public function ATT_val($field, $arguments = null, $cache = true) {
525 526
 		return Convert::raw2att($this->RAW_val($field, $arguments, $cache));
@@ -530,7 +531,6 @@  discard block
 block discarded – undo
530 531
 	/**
531 532
 	 * Get an array of XML-escaped values by field name
532 533
 	 *
533
-	 * @param array $elements an array of field names
534 534
 	 * @return array
535 535
 	 */
536 536
 	public function getXMLValues($fields) {
Please login to merge, or discard this patch.
dev/SilverStripeListener.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@
 block discarded – undo
47 47
 
48 48
 	protected $whitelist = false;
49 49
 
50
+	/**
51
+	 * @param string $name
52
+	 */
50 53
 	public function __construct($name = null, $options = array()) {
51 54
 		if(is_string($options)) {
52 55
 			$options = array('whitelist' => $options);
Please login to merge, or discard this patch.
filesystem/ImageManipulation.php 1 patch
Doc Comments   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 *
169 169
 	 * @param integer $width The width to size to
170 170
 	 * @param integer $height The height to size to
171
-	 * @return AssetContainer
171
+	 * @return ImageManipulation
172 172
 	 */
173 173
 	public function Pad($width, $height, $backgroundColor = 'FFFFFF') {
174 174
 		if($this->isSize($width, $height)) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	/**
188 188
 	 * Forces the image to be resampled, if possible
189 189
 	 *
190
-	 * @return AssetContainer
190
+	 * @return ImageManipulation
191 191
 	 */
192 192
 	public function Resampled() {
193 193
 		// If image is already resampled, return self reference
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 *
238 238
 	 * @param integer $width Width to resize to
239 239
 	 * @param integer $height Height to resize to
240
-	 * @return AssetContainer
240
+	 * @return ImageManipulation
241 241
 	 */
242 242
 	public function ResizedImage($width, $height) {
243 243
 		if($this->isSize($width, $height)) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 *
256 256
 	 * @param integer $width The width to size within
257 257
 	 * @param integer $height The height to size within
258
-	 * @return AssetContainer
258
+	 * @return null|ImageManipulation
259 259
 	 */
260 260
 	public function Fit($width, $height) {
261 261
 		// Prevent divide by zero on missing/blank file
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	 * @uses ScalingManipulation::Fit()
294 294
 	 * @param integer $width The maximum width of the output image
295 295
 	 * @param integer $height The maximum height of the output image
296
-	 * @return AssetContainer
296
+	 * @return ImageManipulation
297 297
 	 */
298 298
 	public function FitMax($width, $height) {
299 299
 		return $this->getWidth() > $width || $this->getHeight() > $height
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 * Scale image proportionally by width. Use in templates with $ScaleWidth.
307 307
 	 *
308 308
 	 * @param integer $width The width to set
309
-	 * @return AssetContainer
309
+	 * @return ImageManipulation
310 310
 	 */
311 311
 	public function ScaleWidth($width) {
312 312
 		if($this->isWidth($width)) {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	 *
326 326
 	 * @uses ScalingManipulation::ScaleWidth()
327 327
 	 * @param integer $width The maximum width of the output image
328
-	 * @return AssetContainer
328
+	 * @return ImageManipulation
329 329
 	 */
330 330
 	public function ScaleMaxWidth($width) {
331 331
 		return $this->getWidth() > $width
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 	 * Scale image proportionally by height. Use in templates with $ScaleHeight.
338 338
 	 *
339 339
 	 * @param int $height The height to set
340
-	 * @return AssetContainer
340
+	 * @return ImageManipulation
341 341
 	 */
342 342
 	public function ScaleHeight($height) {
343 343
 		if($this->isHeight($height)) {
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 	 *
357 357
 	 * @uses ScalingManipulation::ScaleHeight()
358 358
 	 * @param integer $height The maximum height of the output image
359
-	 * @return AssetContainer
359
+	 * @return ImageManipulation
360 360
 	 */
361 361
 	public function ScaleMaxHeight($height) {
362 362
 		return $this->getHeight() > $height
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 	 *
372 372
 	 * @uses CropManipulation::Fill()
373 373
 	 * @param integer $width The maximum width of the output image
374
-	 * @return AssetContainer
374
+	 * @return ImageManipulation
375 375
 	 */
376 376
 	public function CropWidth($width) {
377 377
 		return $this->getWidth() > $width
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 *
386 386
 	 * @uses CropManipulation::Fill()
387 387
 	 * @param integer $height The maximum height of the output image
388
-	 * @return AssetContainer
388
+	 * @return ImageManipulation
389 389
 	 */
390 390
 	public function CropHeight($height) {
391 391
 		return $this->getHeight() > $height
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 	 * @uses ImageManipulation::Fill()
402 402
 	 * @param integer $width The relative (used to determine aspect ratio) and maximum width of the output image
403 403
 	 * @param integer $height The relative (used to determine aspect ratio) and maximum height of the output image
404
-	 * @return AssetContainer
404
+	 * @return null|ImageManipulation
405 405
 	 */
406 406
 	public function FillMax($width, $height) {
407 407
 		// Prevent divide by zero on missing/blank file
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 	 *
437 437
 	 * @param integer $width Width to crop to
438 438
 	 * @param integer $height Height to crop to
439
-	 * @return AssetContainer
439
+	 * @return ImageManipulation
440 440
 	 */
441 441
 	public function Fill($width, $height) {
442 442
 		if($this->isSize($width, $height)) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 	 *
488 488
 	 * @param int $width
489 489
 	 * @param int $height
490
-	 * @return AssetContainer
490
+	 * @return ImageManipulation
491 491
 	 */
492 492
 	public function Thumbnail($width, $height) {
493 493
 		return $this->Pad($height, $height);
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 	/**
510 510
 	 * Get HTML for img containing the icon for this file
511 511
 	 *
512
-	 * @return type
512
+	 * @return DBField
513 513
 	 */
514 514
 	public function IconTag() {
515 515
 		return DBField::create_field(
Please login to merge, or discard this patch.
filesystem/storage/DBFile.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use SilverStripe\Filesystem\ImageManipulation;
6 6
 use SilverStripe\Filesystem\Storage\AssetContainer;
7 7
 use SilverStripe\Filesystem\Storage\AssetStore;
8
-
9 8
 use Injector;
10 9
 use AssetField;
11 10
 use File;
Please login to merge, or discard this patch.