Completed
Pull Request — master (#5229)
by Matt
11:45
created
forms/gridfield/GridField.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	 *
200 200
 	 * @todo refactor this into GridFieldComponent
201 201
 	 *
202
-	 * @param mixed $value
202
+	 * @param string $value
203 203
 	 * @param string|array $castingDefinition
204 204
 	 *
205 205
 	 * @return mixed
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 	 *
287 287
 	 * @param array $properties
288 288
 	 *
289
-	 * @return HTMLText
289
+	 * @return DBField
290 290
 	 */
291 291
 	public function FieldHolder($properties = array()) {
292 292
 		Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 	 * @param int $index
572 572
 	 * @param DataObject $record
573 573
 	 *
574
-	 * @return array
574
+	 * @return string[]
575 575
 	 */
576 576
 	protected function newRowClasses($total, $index, $record) {
577 577
 		$classes = array('ss-gridfield-item');
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 	/**
597 597
 	 * @param array $properties
598 598
 	 *
599
-	 * @return HTMLText
599
+	 * @return DBField
600 600
 	 */
601 601
 	public function Field($properties = array()) {
602 602
 		return $this->FieldHolder($properties);
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 DBField - 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.
forms/InlineFormAction.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 	/**
19 19
 	 * Create a new action button.
20
-	 * @param action The method to call when the button is clicked
20
+	 * @param action string method to call when the button is clicked
21 21
 	 * @param title The label on the button
22 22
 	 * @param extraClass A CSS class to apply to the button in addition to 'action'
23 23
 	 */
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	/**
34 34
 	 * @param array $properties
35
-	 * @return HTMLText
35
+	 * @return DBField
36 36
 	 */
37 37
 	public function Field($properties = array()) {
38 38
 		if($this->includeDefaultJS) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	/**
80 80
 	 * @param array $properties
81
-	 * @return HTMLText
81
+	 * @return DBField
82 82
 	 */
83 83
 	public function Field($properties = array()) {
84 84
 		return DBField::create_field('HTMLText',
Please login to merge, or discard this patch.
forms/TreeDropdownField.php 1 patch
Doc Comments   +3 added lines, -4 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 HTMLText
207
+	 * @return DBField
208 208
 	 */
209 209
 	public function Field($properties = array()) {
210 210
 		Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * If a filter function has been set, that will be called. And if search text is set,
386 386
 	 * filter on that too. Return true if all applicable conditions are true, false otherwise.
387 387
 	 * @param $node
388
-	 * @return unknown_type
388
+	 * @return boolean
389 389
 	 */
390 390
 	public function filterMarking($node) {
391 391
 		if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false;
@@ -436,7 +436,6 @@  discard block
 block discarded – undo
436 436
 	}
437 437
 
438 438
 	/**
439
-	 * @param String $field
440 439
 	 */
441 440
 	public function setSourceObject($class) {
442 441
 		$this->sourceObject = $class;
Please login to merge, or discard this patch.
forms/UploadField.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -211,7 +211,6 @@  discard block
 block discarded – undo
211 211
 	 * @param string $title The field label.
212 212
 	 * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on
213 213
 	 *                       @link $record}, with the same name as the field name.
214
-	 * @param Form $form Reference to the container form
215 214
 	 */
216 215
 	public function __construct($name, $title = null, SS_List $items = null) {
217 216
 
@@ -1078,7 +1077,7 @@  discard block
 block discarded – undo
1078 1077
 
1079 1078
 	/**
1080 1079
 	 * @param SS_HTTPRequest $request
1081
-	 * @return UploadField_ItemHandler
1080
+	 * @return UploadField_SelectHandler
1082 1081
 	 */
1083 1082
 	public function handleSelect(SS_HTTPRequest $request) {
1084 1083
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1434,7 +1433,7 @@  discard block
 block discarded – undo
1434 1433
 	 * Action to handle editing of a single file
1435 1434
 	 *
1436 1435
 	 * @param SS_HTTPRequest $request
1437
-	 * @return ViewableData_Customised
1436
+	 * @return DBField
1438 1437
 	 */
1439 1438
 	public function edit(SS_HTTPRequest $request) {
1440 1439
 		// Check form field state
Please login to merge, or discard this patch.
security/PermissionCheckboxSetField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
 	/**
78 78
 	 * @param array $properties
79
-	 * @return HTMLText
79
+	 * @return DBField
80 80
 	 */
81 81
 	public function Field($properties = array()) {
82 82
 		Requirements::css(FRAMEWORK_DIR . '/css/CheckboxSetField.css');
Please login to merge, or discard this patch.
security/Security.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 	 * Combine the given forms into a formset with a tabbed interface
466 466
 	 *
467 467
 	 * @param array $forms List of LoginForm instances
468
-	 * @return string
468
+	 * @return DBField
469 469
 	 */
470 470
 	protected function generateLoginFormSet($forms) {
471 471
 		$viewData = new ArrayData(array(
@@ -645,7 +645,6 @@  discard block
 block discarded – undo
645 645
 	 * - t: plaintext token
646 646
 	 *
647 647
 	 * @param Member $member Member object associated with this link.
648
-	 * @param string $autoLoginHash The auto login token.
649 648
 	 */
650 649
 	public static function getPasswordResetLink($member, $autologinToken) {
651 650
 		$autologinToken = urldecode($autologinToken);
@@ -736,7 +735,7 @@  discard block
 block discarded – undo
736 735
 	/**
737 736
 	 * Factory method for the lost password form
738 737
 	 *
739
-	 * @return Form Returns the lost password form
738
+	 * @return Security Returns the lost password form
740 739
 	 */
741 740
 	public function ChangePasswordForm() {
742 741
 		return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -746,7 +745,7 @@  discard block
 block discarded – undo
746 745
 	 * Gets the template for an include used for security.
747 746
 	 * For use in any subclass.
748 747
 	 *
749
-	 * @return string|array Returns the template(s) for rendering
748
+	 * @return string[] Returns the template(s) for rendering
750 749
 	 */
751 750
 	public function getIncludeTemplate($name) {
752 751
 		return array('Security_' . $name);
@@ -920,7 +919,7 @@  discard block
 block discarded – undo
920 919
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
921 920
 	 * @param string $algorithm One of the available password encryption
922 921
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
923
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
922
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
924 923
 	 */
925 924
 	public static function set_password_encryption_algorithm($algorithm) {
926 925
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1075,7 +1074,7 @@  discard block
 block discarded – undo
1075 1074
 	/**
1076 1075
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1077 1076
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1078
-	 * @param $flag True or false
1077
+	 * @param boolean $flag True or false
1079 1078
 	 */
1080 1079
 	public static function set_ignore_disallowed_actions($flag) {
1081 1080
 		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
@@ -112,6 +112,10 @@  discard block
 block discarded – undo
112 112
 		));
113 113
 	}
114 114
 
115
+	/**
116
+	 * @param DBField $result
117
+	 * @param string[] $expected
118
+	 */
115 119
 	private function assertExpectedStrings($result, $expected) {
116 120
 		foreach ($expected as $expectedStr) {
117 121
 			$this->assertTrue(
@@ -718,6 +722,10 @@  discard block
 block discarded – undo
718 722
 		$this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult);
719 723
 	}
720 724
 
725
+	/**
726
+	 * @param string $a
727
+	 * @param string $b
728
+	 */
721 729
 	public function assertEqualIgnoringWhitespace($a, $b) {
722 730
 		$this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b));
723 731
 	}
@@ -1328,6 +1336,11 @@  discard block
 block discarded – undo
1328 1336
 		Config::inst()->update('SSViewer', 'source_file_comments', false);
1329 1337
 		Config::inst()->update('Director', 'environment_type', $origEnv);
1330 1338
 	}
1339
+
1340
+	/**
1341
+	 * @param string $name
1342
+	 * @param string $expected
1343
+	 */
1331 1344
 	private function _renderWithSourceFileComments($name, $expected) {
1332 1345
 		$viewer = new SSViewer(array($name));
1333 1346
 		$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
@@ -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.