Completed
Pull Request — master (#6829)
by Simon
08:38
created
src/Security/MemberAuthenticator/LostPasswordHandler.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,6 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Return a link to this request handler.
57 57
      * The link returned is supplied in the constructor
58
+     * @param string $action
58 59
      * @return string
59 60
      */
60 61
     public function link($action = null)
@@ -115,7 +116,7 @@  discard block
 block discarded – undo
115 116
      * Factory method for the lost password form
116 117
      *
117 118
      * @skipUpgrade
118
-     * @return Form Returns the lost password form
119
+     * @return LoginForm Returns the lost password form
119 120
      */
120 121
     public function lostPasswordForm()
121 122
     {
@@ -247,6 +248,8 @@  discard block
 block discarded – undo
247 248
 
248 249
     /**
249 250
      * @todo copypaste from FormRequestHandler - refactor
251
+     * @param string $link
252
+     * @return string
250 253
      */
251 254
     protected function addBackURLParam($link)
252 255
     {
Please login to merge, or discard this patch.
src/Security/MemberAuthenticator/Authenticator.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -53,6 +53,7 @@
 block discarded – undo
53 53
      * @param $message
54 54
      * @param bool &$success Success flag
55 55
      * @param null|Member $member If the parent method already identified the member, it can be passed in
56
+     * @param null|boolean $success
56 57
      * @return Member Found member, regardless of successful login
57 58
      */
58 59
     protected function authenticateMember($data, &$message, &$success, $member = null)
Please login to merge, or discard this patch.
src/Dev/FunctionalTest.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      * Find an attribute in a SimpleXMLElement object by name.
231 231
      * @param SimpleXMLElement $object
232 232
      * @param string $attribute Name of attribute to find
233
-     * @return SimpleXMLElement object of the attribute
233
+     * @return boolean object of the attribute
234 234
      */
235 235
     public function findAttribute($object, $attribute)
236 236
     {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      * Note:   characters are stripped from the content; make sure that your assertions take this into account.
265 265
      *
266 266
      * @param string $selector A basic CSS selector, e.g. 'li.jobs h3'
267
-     * @param array|string $expectedMatches The content of at least one of the matched tags
267
+     * @param string[] $expectedMatches The content of at least one of the matched tags
268 268
      * @param string $message
269 269
      * @throws PHPUnit_Framework_AssertionFailedError
270 270
      */
@@ -419,7 +419,6 @@  discard block
 block discarded – undo
419 419
     /**
420 420
      * Log in as the given member
421 421
      *
422
-     * @param Member|int|string $member The ID, fixture codename, or Member object of the member that you want to log in
423 422
      */
424 423
     public function logOut()
425 424
     {
Please login to merge, or discard this patch.
src/Security/MemberAuthenticator/CookieAuthenticationHandler.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Set the name of the cookie used to track this device
38 38
      *
39
-     * @param string $cookieName
39
+     * @param string $deviceCookieName
40 40
      * @return null
41 41
      */
42 42
     public function setDeviceCookieName($deviceCookieName)
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     /**
58 58
      * Set the name of the cookie used to store an login token
59 59
      *
60
-     * @param string $cookieName
60
+     * @param string $tokenCookieName
61 61
      * @return null
62 62
      */
63 63
     public function setTokenCookieName($tokenCookieName)
Please login to merge, or discard this patch.
src/Security/MemberAuthenticator/LoginHandler.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,6 @@  discard block
 block discarded – undo
137 137
      *   [Optional: 'Remember' => 1 ]
138 138
      * )
139 139
      *
140
-     * @param array $data
141 140
      * @return HTTPResponse
142 141
      */
143 142
     protected function redirectAfterSuccessfulLogin()
@@ -219,6 +218,8 @@  discard block
 block discarded – undo
219 218
      * Try to authenticate the user
220 219
      *
221 220
      * @param array $data Submitted data
221
+     * @param Member $member
222
+     * @param \SilverStripe\Control\HTTPRequest $request
222 223
      * @return Member Returns the member object on successful authentication
223 224
      *                or NULL on failure.
224 225
      */
@@ -249,6 +250,7 @@  discard block
 block discarded – undo
249 250
 
250 251
     /**
251 252
      * @todo copypaste from FormRequestHandler - refactor
253
+     * @param string $link
252 254
      */
253 255
     protected function addBackURLParam($link)
254 256
     {
Please login to merge, or discard this patch.
src/Security/CMSSecurity.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@  discard block
 block discarded – undo
49 49
         return parent::login($request, Authenticator::CMS_LOGIN);
50 50
     }
51 51
 
52
+    /**
53
+     * @param string $action
54
+     */
52 55
     public function Link($action = null)
53 56
     {
54 57
         /** @skipUpgrade */
@@ -79,6 +82,9 @@  discard block
 block discarded – undo
79 82
         return null;
80 83
     }
81 84
 
85
+    /**
86
+     * @param string $title
87
+     */
82 88
     public function getResponseController($title)
83 89
     {
84 90
         // Use $this to prevent use of Page to render underlying templates
Please login to merge, or discard this patch.
src/Security/Member.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -422,7 +422,6 @@  discard block
 block discarded – undo
422 422
     /**
423 423
      * @deprecated Use Security::setCurrentUser() or IdentityStore::logIn()
424 424
      *
425
-     * @param bool $remember If set to TRUE, the member will be logged in automatically the next time.
426 425
      */
427 426
     public function logIn()
428 427
     {
@@ -737,9 +736,9 @@  discard block
 block discarded – undo
737 736
      * });
738 737
      * </code>
739 738
      *
740
-     * @param Member|null|int $member Member or member ID to log in as.
739
+     * @param null|Member $member Member or member ID to log in as.
741 740
      * Set to null or 0 to act as a logged out user.
742
-     * @param $callback
741
+     * @param \Closure $callback
743 742
      */
744 743
     public static function actAs($member, $callback)
745 744
     {
@@ -1489,7 +1488,7 @@  discard block
 block discarded – undo
1489 1488
      * This is likely to be customized for social sites etc. with a looser permission model.
1490 1489
      *
1491 1490
      * @param Member $member
1492
-     * @return bool
1491
+     * @return boolean|string
1493 1492
      */
1494 1493
     public function canView($member = null)
1495 1494
     {
@@ -1520,7 +1519,7 @@  discard block
 block discarded – undo
1520 1519
      * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1521 1520
      *
1522 1521
      * @param Member $member
1523
-     * @return bool
1522
+     * @return boolean|string
1524 1523
      */
1525 1524
     public function canEdit($member = null)
1526 1525
     {
@@ -1555,7 +1554,7 @@  discard block
 block discarded – undo
1555 1554
      * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions
1556 1555
      *
1557 1556
      * @param Member $member
1558
-     * @return bool
1557
+     * @return boolean|string
1559 1558
      */
1560 1559
     public function canDelete($member = null)
1561 1560
     {
Please login to merge, or discard this patch.
src/Security/Security.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      * Combine the given forms into a formset with a tabbed interface
602 602
      *
603 603
      * @param $forms
604
-     * @return string
604
+     * @return \SilverStripe\ORM\FieldType\DBHTMLText
605 605
      */
606 606
     protected function generateLoginFormSet($forms)
607 607
     {
@@ -1241,6 +1241,7 @@  discard block
 block discarded – undo
1241 1241
 
1242 1242
     /**
1243 1243
      * For the database_is_ready call to return a certain value - used for testing
1244
+     * @param boolean $isReady
1244 1245
      */
1245 1246
     public static function force_database_is_ready($isReady)
1246 1247
     {
@@ -1284,7 +1285,7 @@  discard block
 block discarded – undo
1284 1285
     /**
1285 1286
      * Set to true to ignore access to disallowed actions, rather than returning permission failure
1286 1287
      * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1287
-     * @param $flag True or false
1288
+     * @param boolean $flag True or false
1288 1289
      */
1289 1290
     public static function set_ignore_disallowed_actions($flag)
1290 1291
     {
Please login to merge, or discard this patch.