Completed
Pull Request — master (#5824)
by Sam
11:23
created
Security/Group.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -331,6 +331,7 @@
 block discarded – undo
331 331
 	 * Overloaded to ensure the code is always descent.
332 332
 	 *
333 333
 	 * @param string
334
+	 * @param string $val
334 335
 	 */
335 336
 	public function setCode($val){
336 337
 		$this->setField("Code", Convert::raw2url($val));
Please login to merge, or discard this patch.
Security/Member.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
 	 * This is likely to be customized for social sites etc. with a looser permission model.
1564 1564
 	 *
1565 1565
 	 * @param Member $member
1566
-	 * @return bool
1566
+	 * @return boolean|string
1567 1567
 	 */
1568 1568
     public function canView($member = null) {
1569 1569
         //get member
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
 	 * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1594 1594
 	 *
1595 1595
 	 * @param Member $member
1596
-	 * @return bool
1596
+	 * @return boolean|string
1597 1597
 	 */
1598 1598
     public function canEdit($member = null) {
1599 1599
         //get member
@@ -1627,7 +1627,7 @@  discard block
 block discarded – undo
1627 1627
      * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1628 1628
 	 *
1629 1629
 	 * @param Member $member
1630
-	 * @return bool
1630
+	 * @return boolean|string
1631 1631
      */
1632 1632
     public function canDelete($member = null) {
1633 1633
         if(!($member instanceof Member)) {
Please login to merge, or discard this patch.
Security/MemberAuthenticator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
 	 * @param Form $form Optional: If passed, better error messages can be
148 148
 	 *                             produced by using
149 149
 	 *                             {@link Form::sessionMessage()}
150
-	 * @return bool|Member Returns FALSE if authentication fails, otherwise
150
+	 * @return Member|null Returns FALSE if authentication fails, otherwise
151 151
 	 *                     the member object
152 152
 	 * @see Security::setDefaultAdmin()
153 153
 	 */
Please login to merge, or discard this patch.
Security/PasswordValidator.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,6 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 	/**
30 30
 	 * Minimum password length
31
+	 * @param integer $minLength
31 32
 	 */
32 33
 	public function minLength($minLength) {
33 34
 		$this->minLength = $minLength;
@@ -39,8 +40,8 @@  discard block
 block discarded – undo
39 40
 	 *
40 41
 	 * Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation"))
41 42
 	 *
42
-	 * @param $minScore The minimum number of character tests that must pass
43
-	 * @param $testNames The names of the tests to perform
43
+	 * @param integer $minScore The minimum number of character tests that must pass
44
+	 * @param string[] $testNames The names of the tests to perform
44 45
 	 */
45 46
 	public function characterStrength($minScore, $testNames) {
46 47
 		$this->minScore = $minScore;
@@ -50,6 +51,7 @@  discard block
 block discarded – undo
50 51
 
51 52
 	/**
52 53
 	 * Check a number of previous passwords that the user has used, and don't let them change to that.
54
+	 * @param integer $count
53 55
 	 */
54 56
 	public function checkHistoricalPasswords($count) {
55 57
 		$this->historicalPasswordCount = $count;
Please login to merge, or discard this patch.
Security/Permission.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 *  will be checked for the current user
127 127
 	 * @param bool $strict Use "strict" checking (which means a permission
128 128
 	 *  will be granted if the key does not exist at all)?
129
-	 * @return int|bool The ID of the permission record if the permission
129
+	 * @return boolean|string The ID of the permission record if the permission
130 130
 	 *  exists; FALSE otherwise. If "strict" checking is
131 131
 	 *  disabled, TRUE will be returned if the permission does not exist at all.
132 132
 	 */
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 * @param string $arg Optional argument (e.g. a permissions for a specific page)
165 165
 	 * @param bool $strict Use "strict" checking (which means a permission
166 166
 	 *  will be granted if the key does not exist at all)?
167
-	 * @return int|bool The ID of the permission record if the permission
167
+	 * @return boolean|string The ID of the permission record if the permission
168 168
 	 *  exists; FALSE otherwise. If "strict" checking is
169 169
 	 *  disabled, TRUE will be returned if the permission does not exist at all.
170 170
 	 */
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 	/**
725 725
 	 * Get permissions
726 726
 	 *
727
-	 * @return array Associative array of permissions in this permission
727
+	 * @return string Associative array of permissions in this permission
728 728
 	 *               group. The array indicies are the permission codes as
729 729
 	 *               used in {@link Permission::check()}. The value is
730 730
 	 *               suitable for using in an interface.
Please login to merge, or discard this patch.
Security/RememberLoginHash.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@
 block discarded – undo
76 76
 		return $this->token;
77 77
 	}
78 78
 
79
+	/**
80
+	 * @param string $token
81
+	 */
79 82
 	public function setToken($token) {
80 83
 		$this->token = $token;
81 84
 	}
Please login to merge, or discard this patch.
Security/SecurityToken.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	protected $name = null;
63 63
 
64 64
 	/**
65
-	 * @param $name
65
+	 * @param string $name
66 66
 	 */
67 67
 	public function __construct($name = null) {
68 68
 		$this->name = ($name) ? $name : self::get_default_name();
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 	/**
115 115
 	 * Returns the value of an the global SecurityToken in the current session
116
-	 * @return int
116
+	 * @return string
117 117
 	 */
118 118
 	public static function getSecurityID() {
119 119
 		$token = SecurityToken::inst();
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	/**
197 197
 	 * Get security token from request
198 198
 	 *
199
-	 * @param SS_HTTPREquest $request
199
+	 * @param SS_HTTPRequest $request
200 200
 	 * @return string
201 201
 	 */
202 202
 	protected function getRequestToken($request) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * care of this yourself.
217 217
 	 *
218 218
 	 * @param FieldList $fieldset
219
-	 * @return HiddenField|false
219
+	 * @return \Form
220 220
 	 */
221 221
 	public function updateFieldSet(&$fieldset) {
222 222
 		if(!$fieldset->fieldByName($this->getName())) {
Please login to merge, or discard this patch.
core/Extensible.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -369,8 +369,8 @@
 block discarded – undo
369 369
 	 *
370 370
 	 * @param string $method the method name to call
371 371
 	 * @param mixed $a1
372
-	 * @param mixed $a2
373
-	 * @param mixed $a3
372
+	 * @param string $a2
373
+	 * @param boolean $a3
374 374
 	 * @param mixed $a4
375 375
 	 * @param mixed $a5
376 376
 	 * @param mixed $a6
Please login to merge, or discard this patch.
ORM/FieldType/DBDate.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
 	private static $nice_format = 'd/m/Y';
40 40
 
41
+	/**
42
+	 * @param string|null $value
43
+	 */
41 44
 	public function setValue($value, $record = null, $markChanged = true) {
42 45
 		if($value === false || $value === null || (is_string($value) && !strlen($value))) {
43 46
 			// don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be
@@ -194,7 +197,7 @@  discard block
 block discarded – undo
194 197
 	 * Return a date formatted as per a CMS user's settings.
195 198
 	 *
196 199
 	 * @param Member $member
197
-	 * @return boolean | string A date formatted as per user-defined settings.
200
+	 * @return false|string | string A date formatted as per user-defined settings.
198 201
 	 */
199 202
 	public function FormatFromSettings($member = null) {
200 203
 		require_once 'Zend/Date.php';
Please login to merge, or discard this patch.