Completed
Pull Request — master (#5653)
by Damian
11:07
created
forms/gridfield/GridField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
 	 *
201 201
 	 * @todo refactor this into GridFieldComponent
202 202
 	 *
203
-	 * @param mixed $value
203
+	 * @param string $value
204 204
 	 * @param string|array $castingDefinition
205 205
 	 *
206 206
 	 * @return mixed
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
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @param string $name the field name
78 78
 	 * @param string $title the field label
79
-	 * @param string|array $sourceObject The object-type to list in the tree. This could
79
+	 * @param string $sourceObject The object-type to list in the tree. This could
80 80
 	 * be one of the following:
81 81
 	 * - A DataObject class name with the {@link Hierarchy} extension.
82 82
 	 * - An array of key/value pairs, like a {@link DropdownField} source. In
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	}
205 205
 
206 206
 	/**
207
-	 * @return string
207
+	 * @return SilverStripe\Model\FieldType\DBHTMLText
208 208
 	 */
209 209
 	public function Field($properties = array()) {
210 210
 		Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang');
@@ -438,7 +438,6 @@  discard block
 block discarded – undo
438 438
 	}
439 439
 
440 440
 	/**
441
-	 * @param String $field
442 441
 	 */
443 442
 	public function setSourceObject($class) {
444 443
 		$this->sourceObject = $class;
Please login to merge, or discard this patch.
security/Security.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	 * Combine the given forms into a formset with a tabbed interface
469 469
 	 *
470 470
 	 * @param array $forms List of LoginForm instances
471
-	 * @return string
471
+	 * @return SilverStripe\Model\FieldType\DBHTMLText
472 472
 	 */
473 473
 	protected function generateLoginFormSet($forms) {
474 474
 		$viewData = new ArrayData(array(
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
 	/**
741 741
 	 * Factory method for the lost password form
742 742
 	 *
743
-	 * @return Form Returns the lost password form
743
+	 * @return Security Returns the lost password form
744 744
 	 */
745 745
 	public function ChangePasswordForm() {
746 746
 		return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 	 * Gets the template for an include used for security.
751 751
 	 * For use in any subclass.
752 752
 	 *
753
-	 * @return string|array Returns the template(s) for rendering
753
+	 * @return string[] Returns the template(s) for rendering
754 754
 	 */
755 755
 	public function getIncludeTemplate($name) {
756 756
 		return array('Security_' . $name);
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
925 925
 	 * @param string $algorithm One of the available password encryption
926 926
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
927
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
927
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
928 928
 	 */
929 929
 	public static function set_password_encryption_algorithm($algorithm) {
930 930
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 	/**
1080 1080
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1081 1081
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1082
-	 * @param $flag True or false
1082
+	 * @param boolean $flag True or false
1083 1083
 	 */
1084 1084
 	public static function set_ignore_disallowed_actions($flag) {
1085 1085
 		self::$ignore_disallowed_actions = $flag;
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
@@ -123,6 +123,10 @@  discard block
 block discarded – undo
123 123
 		));
124 124
 	}
125 125
 
126
+	/**
127
+	 * @param DBHTMLText $result
128
+	 * @param string[] $expected
129
+	 */
126 130
 	private function assertExpectedStrings($result, $expected) {
127 131
 		foreach ($expected as $expectedStr) {
128 132
 			$this->assertTrue(
@@ -756,6 +760,10 @@  discard block
 block discarded – undo
756 760
 		$this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult);
757 761
 	}
758 762
 
763
+	/**
764
+	 * @param string $a
765
+	 * @param string $b
766
+	 */
759 767
 	public function assertEqualIgnoringWhitespace($a, $b) {
760 768
 		$this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b));
761 769
 	}
@@ -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   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -368,7 +368,6 @@  discard block
 block discarded – undo
368 368
 	/**
369 369
 	 * Returns the modulus of the numerical position of the item in the data set.
370 370
 	 * The count starts from $startIndex, which defaults to 1.
371
-	 * @param int $Mod The number to perform Mod operation to.
372 371
 	 * @param int $startIndex Number to start count from.
373 372
 	 * @return int
374 373
 	 */
@@ -442,6 +441,10 @@  discard block
 block discarded – undo
442 441
 		$this->underlay = $underlay ? $underlay : array();
443 442
 	}
444 443
 
444
+	/**
445
+	 * @param string $interfaceToQuery
446
+	 * @param string $variableMethod
447
+	 */
445 448
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
446 449
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
447 450
 		if($implementers) foreach($implementers as $implementer) {
@@ -849,7 +852,7 @@  discard block
 block discarded – undo
849 852
 	 *
850 853
 	 * @param $className string - valid class name
851 854
 	 * @param $suffix string
852
-	 * @param $baseClass string
855
+	 * @param string $baseClass string
853 856
 	 *
854 857
 	 * @return array
855 858
 	 */
@@ -1254,7 +1257,7 @@  discard block
 block discarded – undo
1254 1257
 	 * @param string $template Template name
1255 1258
 	 * @param mixed $data Data context
1256 1259
 	 * @param array $arguments Additional arguments
1257
-	 * @return string Evaluated result
1260
+	 * @return DBHTMLText Evaluated result
1258 1261
 	 */
1259 1262
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1260 1263
 		$v = new SSViewer($template);
@@ -1280,6 +1283,9 @@  discard block
 block discarded – undo
1280 1283
 		return $v->process($data, $arguments);
1281 1284
 	}
1282 1285
 
1286
+	/**
1287
+	 * @param string $content
1288
+	 */
1283 1289
 	public function parseTemplateContent($content, $template="") {
1284 1290
 		return $this->getParser()->compileString(
1285 1291
 			$content,
@@ -1308,7 +1314,7 @@  discard block
 block discarded – undo
1308 1314
 	 * Return an appropriate base tag for the given template.
1309 1315
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1310 1316
 	 *
1311
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1317
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1312 1318
 	 * the DOCTYPE declaration.
1313 1319
 	 */
1314 1320
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1349,6 +1355,9 @@  discard block
 block discarded – undo
1349 1355
 	 */
1350 1356
 	protected $cacheTemplate;
1351 1357
 
1358
+	/**
1359
+	 * @param string $content
1360
+	 */
1352 1361
 	public function __construct($content, TemplateParser $parser = null) {
1353 1362
 		if ($parser) {
1354 1363
 			$this->setParser($parser);
Please login to merge, or discard this patch.
view/ViewableData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 	/**
126 126
 	 * Get the current failover object if set
127 127
 	 *
128
-	 * @return ViewableData|null
128
+	 * @return ViewableData
129 129
 	 */
130 130
 	public function getFailover() {
131 131
 		return $this->failover;
Please login to merge, or discard this patch.
model/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.
model/FieldType/DBDecimal.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 * @param string $name
22 22
 	 * @param int $wholeSize
23 23
 	 * @param int $decimalSize
24
-	 * @param float|int $defaultValue
24
+	 * @param integer $defaultValue
25 25
 	 */
26 26
 	public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) {
27 27
 		$this->wholeSize = is_int($wholeSize) ? $wholeSize : 9;
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	/**
36
-	 * @return float
36
+	 * @return string
37 37
 	 */
38 38
 	public function Nice() {
39 39
 		return number_format($this->value, $this->decimalSize);
40 40
 	}
41 41
 
42 42
 	/**
43
-	 * @return int
43
+	 * @return double
44 44
 	 */
45 45
 	public function Int() {
46 46
 		return floor($this->value);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	}
84 84
 
85 85
 	/**
86
-	 * @return float
86
+	 * @return integer
87 87
 	 */
88 88
 	public function nullValue() {
89 89
 		return 0;
Please login to merge, or discard this patch.
model/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.