@@ -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. |
@@ -42,6 +42,9 @@ discard block |
||
| 42 | 42 | ); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $action |
|
| 47 | + */ |
|
| 45 | 48 | public function Link($action = null) { |
| 46 | 49 | return Controller::join_links(Director::baseURL(), "CMSSecurity", $action); |
| 47 | 50 | } |
@@ -57,6 +60,9 @@ discard block |
||
| 57 | 60 | } |
| 58 | 61 | } |
| 59 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $title |
|
| 65 | + */ |
|
| 60 | 66 | public function getResponseController($title) { |
| 61 | 67 | // Use $this to prevent use of Page to render underlying templates |
| 62 | 68 | return $this; |
@@ -172,6 +178,9 @@ discard block |
||
| 172 | 178 | user_error('Passed invalid authentication method', E_USER_ERROR); |
| 173 | 179 | } |
| 174 | 180 | |
| 181 | + /** |
|
| 182 | + * @param string $action |
|
| 183 | + */ |
|
| 175 | 184 | public function getTemplatesFor($action) { |
| 176 | 185 | return array("CMSSecurity_{$action}", "CMSSecurity") |
| 177 | 186 | + parent::getTemplatesFor($action); |
@@ -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)); |
@@ -1563,7 +1563,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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)) { |
@@ -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. |
@@ -76,6 +76,9 @@ |
||
| 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 | } |