Completed
Pull Request — master (#5771)
by Florian
12:04
created
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.
filesystem/flysystem/AssetAdapter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@  discard block
 block discarded – undo
37 37
         ]
38 38
 	);
39 39
 
40
+	/**
41
+	 * @param string $root
42
+	 */
40 43
 	public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) {
41 44
 		// Get root path
42 45
 		$root = $this->findRoot($root);
@@ -117,7 +120,7 @@  discard block
 block discarded – undo
117 120
 	 * Render server configuration file from a template file
118 121
 	 *
119 122
 	 * @param string $template
120
-	 * @return \HTMLText Rendered results
123
+	 * @return string Rendered results
121 124
 	 */
122 125
 	protected function renderTemplate($template) {
123 126
 		// Build allowed extensions
Please login to merge, or discard this patch.
filesystem/flysystem/ProtectedAssetAdapter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      * Provide secure downloadable
43 43
      *
44 44
      * @param string $path
45
-     * @return string|null
45
+     * @return string
46 46
      */
47 47
     public function getProtectedUrl($path) {
48 48
         // Public URLs are handled via a request handler within /assets.
Please login to merge, or discard this patch.
tests/filesystem/AssetStoreTest.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -625,6 +625,9 @@  discard block
 block discarded – undo
625 625
 	}
626 626
 
627 627
 
628
+	/**
629
+	 * @param string $fileID
630
+	 */
628 631
 	public function getOriginalFilename($fileID) {
629 632
 		return parent::getOriginalFilename($fileID);
630 633
 	}
@@ -633,6 +636,9 @@  discard block
 block discarded – undo
633 636
 		return parent::removeVariant($fileID);
634 637
 	}
635 638
 
639
+	/**
640
+	 * @param null|string $variant
641
+	 */
636 642
 	public function getDefaultConflictResolution($variant) {
637 643
 		return parent::getDefaultConflictResolution($variant);
638 644
 	}
Please login to merge, or discard this patch.
tests/core/ObjectTest.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -619,6 +619,11 @@
 block discarded – undo
619 619
 		'ObjectTest_Extending_Extension'
620 620
 	);
621 621
 
622
+	/**
623
+	 * @param integer $first
624
+	 * @param integer $second
625
+	 * @param integer $third
626
+	 */
622 627
 	public function getResults(&$first, &$second, &$third) {
623 628
 		// Before extending should be invoked second
624 629
 		$this->beforeExtending('updateResult', function(&$first, &$second, &$third) {
Please login to merge, or discard this patch.
filesystem/Upload.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * Set a different instance than {@link Upload_Validator}
115 115
 	 * for this upload session.
116 116
 	 *
117
-	 * @param object $validator
117
+	 * @param Upload_Validator $validator
118 118
 	 */
119 119
 	public function setValidator($validator) {
120 120
 		$this->validator = $validator;
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	/**
364 364
 	 * Determines wether previous operations caused an error.
365 365
 	 *
366
-	 * @return boolean
366
+	 * @return integer
367 367
 	 */
368 368
 	public function isError() {
369 369
 		return (count($this->errors));
Please login to merge, or discard this patch.