@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * Remove a previously registered authenticator |
| 129 | 129 | * |
| 130 | 130 | * @param string $authenticator Name of the authenticator class to register |
| 131 | - * @return bool Returns TRUE on success, FALSE otherwise. |
|
| 131 | + * @return boolean|null Returns TRUE on success, FALSE otherwise. |
|
| 132 | 132 | */ |
| 133 | 133 | public static function unregister_authenticator($authenticator) { |
| 134 | 134 | if(call_user_func(array($authenticator, 'on_unregister')) === true) { |
@@ -171,6 +171,7 @@ discard block |
||
| 171 | 171 | * Set a default authenticator (shows first in tabs) |
| 172 | 172 | * |
| 173 | 173 | * @param string |
| 174 | + * @param string $authenticator |
|
| 174 | 175 | */ |
| 175 | 176 | public static function set_default_authenticator($authenticator) { |
| 176 | 177 | self::$default_authenticator = $authenticator; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * Constructor |
| 24 | 24 | * |
| 25 | - * @param Controller $controller The parent controller, necessary to |
|
| 25 | + * @param \Controller|null $controller The parent controller, necessary to |
|
| 26 | 26 | * create the appropriate form action tag. |
| 27 | 27 | * @param string $name The method on the controller that will return this |
| 28 | 28 | * form object. |
@@ -331,6 +331,7 @@ |
||
| 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)); |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use SilverStripe\ORM\HasManyList; |
| 10 | 10 | use SilverStripe\ORM\ManyManyList; |
| 11 | 11 | use SilverStripe\ORM\UnsavedRelationList; |
| 12 | -use Requirements; |
|
| 13 | 12 | use FieldList; |
| 14 | 13 | use TabSet; |
| 15 | 14 | use Tab; |
@@ -1561,7 +1561,7 @@ discard block |
||
| 1561 | 1561 | * This is likely to be customized for social sites etc. with a looser permission model. |
| 1562 | 1562 | * |
| 1563 | 1563 | * @param Member $member |
| 1564 | - * @return bool |
|
| 1564 | + * @return boolean|string |
|
| 1565 | 1565 | */ |
| 1566 | 1566 | public function canView($member = null) { |
| 1567 | 1567 | //get member |
@@ -1591,7 +1591,7 @@ discard block |
||
| 1591 | 1591 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
| 1592 | 1592 | * |
| 1593 | 1593 | * @param Member $member |
| 1594 | - * @return bool |
|
| 1594 | + * @return boolean|string |
|
| 1595 | 1595 | */ |
| 1596 | 1596 | public function canEdit($member = null) { |
| 1597 | 1597 | //get member |
@@ -1625,7 +1625,7 @@ discard block |
||
| 1625 | 1625 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
| 1626 | 1626 | * |
| 1627 | 1627 | * @param Member $member |
| 1628 | - * @return bool |
|
| 1628 | + * @return boolean|string |
|
| 1629 | 1629 | */ |
| 1630 | 1630 | public function canDelete($member = null) { |
| 1631 | 1631 | if(!($member instanceof Member)) { |
@@ -147,7 +147,7 @@ |
||
| 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 | */ |
@@ -28,6 +28,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -126,7 +126,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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. |
@@ -87,6 +87,9 @@ |
||
| 87 | 87 | return $this->token; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $token |
|
| 92 | + */ |
|
| 90 | 93 | public function setToken($token) { |
| 91 | 94 | $this->token = $token; |
| 92 | 95 | } |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | use EmailField; |
| 23 | 23 | use FormAction; |
| 24 | 24 | use Convert; |
| 25 | -use Object; |
|
| 26 | 25 | use ClassInfo; |
| 27 | 26 | |
| 28 | 27 | /** |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | * Combine the given forms into a formset with a tabbed interface |
| 509 | 509 | * |
| 510 | 510 | * @param array $forms List of LoginForm instances |
| 511 | - * @return string |
|
| 511 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
| 512 | 512 | */ |
| 513 | 513 | protected function generateLoginFormSet($forms) { |
| 514 | 514 | $viewData = new ArrayData(array( |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | * |
| 894 | 894 | * @param string $username The user name |
| 895 | 895 | * @param string $password The password (in cleartext) |
| 896 | - * @return bool |
|
| 896 | + * @return false|null |
|
| 897 | 897 | */ |
| 898 | 898 | public static function setDefaultAdmin($username, $password) { |
| 899 | 899 | // don't overwrite if already set |
@@ -980,7 +980,7 @@ discard block |
||
| 980 | 980 | * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead |
| 981 | 981 | * @param string $algorithm One of the available password encryption |
| 982 | 982 | * algorithms determined by {@link Security::get_encryption_algorithms()} |
| 983 | - * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 983 | + * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 984 | 984 | */ |
| 985 | 985 | public static function set_password_encryption_algorithm($algorithm) { |
| 986 | 986 | Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead'); |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | /** |
| 1149 | 1149 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
| 1150 | 1150 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
| 1151 | - * @param $flag True or false |
|
| 1151 | + * @param boolean $flag True or false |
|
| 1152 | 1152 | */ |
| 1153 | 1153 | public static function set_ignore_disallowed_actions($flag) { |
| 1154 | 1154 | self::$ignore_disallowed_actions = $flag; |