Completed
Pull Request — master (#5776)
by Damian
10:49
created
filesystem/flysystem/AssetAdapter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@  discard block
 block discarded – undo
38 38
         ]
39 39
 	);
40 40
 
41
+	/**
42
+	 * @param string $root
43
+	 */
41 44
 	public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) {
42 45
 		// Get root path
43 46
 		$root = $this->findRoot($root);
@@ -118,7 +121,7 @@  discard block
 block discarded – undo
118 121
 	 * Render server configuration file from a template file
119 122
 	 *
120 123
 	 * @param string $template
121
-	 * @return DBHTMLText Rendered results
124
+	 * @return string Rendered results
122 125
 	 */
123 126
 	protected function renderTemplate($template) {
124 127
 		// Build allowed extensions
Please login to merge, or discard this patch.
forms/gridfield/GridFieldEditButton.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * Which columns are handled by this component
56 56
 	 *
57 57
 	 * @param GridField $gridField
58
-	 * @return array
58
+	 * @return string[]
59 59
 	 */
60 60
 	public function getColumnsHandled($gridField) {
61 61
 		return array('Actions');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @param DataObject $record
77 77
 	 * @param string $columnName
78 78
 	 *
79
-	 * @return string - the HTML for the column
79
+	 * @return DBHTMLText - the HTML for the column
80 80
 	 */
81 81
 	public function getColumnContent($gridField, $record, $columnName) {
82 82
 		// No permission checks, handled through GridFieldDetailForm,
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.
dev/BulkLoader.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 *
212 212
 	 * @todo Mix in custom column mappings
213 213
 	 *
214
-	 * @return array
214
+	 * @return string
215 215
 	 **/
216 216
 	public function getImportSpec() {
217 217
 		$spec = array();
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 * so this is mainly a customization method.
238 238
 	 *
239 239
 	 * @param mixed $val
240
-	 * @param string $field Name of the field as specified in the array-values for {@link self::$columnMap}.
240
+	 * @param string $fieldName Name of the field as specified in the array-values for {@link self::$columnMap}.
241 241
 	 * @return boolean
242 242
 	 */
243 243
 	protected function isNullValue($val, $fieldName = null) {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
 	/**
363 363
 	 * @param $obj DataObject
364
-	 * @param $message string
364
+	 * @param string $message string
365 365
 	 */
366 366
 	public function addCreated($obj, $message = null) {
367 367
 		$this->created[] = $this->lastChange = array(
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
 	/**
376 376
 	 * @param $obj DataObject
377
-	 * @param $message string
377
+	 * @param string $message string
378 378
 	 */
379 379
 	public function addUpdated($obj, $message = null) {
380 380
 		$this->updated[] = $this->lastChange = array(
@@ -386,8 +386,8 @@  discard block
 block discarded – undo
386 386
 	}
387 387
 
388 388
 	/**
389
-	 * @param $obj DataObject
390
-	 * @param $message string
389
+	 * @param DataObject|null $obj DataObject
390
+	 * @param string $message string
391 391
 	 */
392 392
 	public function addDeleted($obj, $message = null) {
393 393
 		$data = $obj->toMap();
Please login to merge, or discard this patch.
core/Convert.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 *
51 51
 	 * @param array|string $val String to escape, or array of strings
52 52
 	 *
53
-	 * @return array|string
53
+	 * @return string
54 54
 	 */
55 55
 	public static function raw2htmlname($val) {
56 56
 		if(is_array($val)) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * table, or column name. Supports encoding of multi identfiers separated by
177 177
 	 * a delimiter (e.g. ".")
178 178
 	 *
179
-	 * @param string|array $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers
179
+	 * @param string $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers
180 180
 	 * to be joined via the separator.
181 181
 	 * @param string $separator The string that delimits subsequent identifiers
182 182
 	 * @return string The escaped identifier. E.g. '"SiteTree"."Title"'
@@ -257,6 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * call this function directly, Please use {@link Convert::xml2array()}
258 258
 	 *
259 259
 	 * @param SimpleXMLElement
260
+	 * @param SimpleXMLElement $xml
260 261
 	 *
261 262
 	 * @return mixed
262 263
 	 */
@@ -450,7 +451,7 @@  discard block
 block discarded – undo
450 451
 	 * - IDField => idField
451 452
 	 * - iDField => iDField
452 453
 	 *
453
-	 * @param $str
454
+	 * @param string $str
454 455
 	 * @return string
455 456
 	 */
456 457
 	public static function upperCamelToLowerCamel($str) {
Please login to merge, or discard this patch.
filesystem/FileMigrationHelper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 	/**
90 90
 	 * Get list of File dataobjects to import
91 91
 	 *
92
-	 * @return DataList
92
+	 * @return SilverStripe\ORM\DataList
93 93
 	 */
94 94
 	protected function getFileQuery() {
95 95
 		// Select all records which have a Filename value, but not FileFilename.
Please login to merge, or discard this patch.
filesystem/Folder.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * Find the given folder or create it as a database record
48 48
 	 *
49 49
 	 * @param string $folderPath Directory path relative to assets root
50
-	 * @return Folder|null
50
+	 * @return null|SilverStripe\ORM\DataObject
51 51
 	 */
52 52
 	public static function find_or_make($folderPath) {
53 53
 		// replace leading and trailing slashes
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	/**
150 150
 	 * Returns all children of this folder
151 151
 	 *
152
-	 * @return DataList
152
+	 * @return SilverStripe\ORM\DataList
153 153
 	 */
154 154
 	public function myChildren() {
155 155
 		return File::get()->filter("ParentID", $this->ID);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	/**
201 201
 	 * Get the children of this folder that are also folders.
202 202
 	 *
203
-	 * @return DataList
203
+	 * @return SilverStripe\ORM\DataList
204 204
 	 */
205 205
 	public function ChildFolders() {
206 206
 		return Folder::get()->filter('ParentID', $this->ID);
Please login to merge, or discard this patch.