Skip to content

Commit 97cf0c0

Browse files
committed
docs: add/update doc comments
1 parent 7774592 commit 97cf0c0

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/Auth.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use CodeIgniter\Shield\Models\UserModel;
1313

1414
/**
15+
* Facade for Authentication
16+
*
1517
* @method Result attempt(array $credentials)
1618
* @method Result check(array $credentials)
1719
* @method bool checkAction(string $token, string $type) [Session]
@@ -148,7 +150,7 @@ public function getProvider(): UserModel
148150

149151
/**
150152
* Provide magic function-access to Authenticators to save use
151-
* from repeating code here, and to allow them have their
153+
* from repeating code here, and to allow them to have their
152154
* own, additional, features on top of the required ones,
153155
* like "remember-me" functionality.
154156
*

src/Authentication/Authentication.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use CodeIgniter\Shield\Config\Auth as AuthConfig;
88
use CodeIgniter\Shield\Models\UserModel;
99

10+
/**
11+
* Factory for Authenticators.
12+
*/
1013
class Authentication
1114
{
1215
/**
@@ -26,13 +29,10 @@ public function __construct(AuthConfig $config)
2629
}
2730

2831
/**
29-
* Returns an instance of the specified Authenticator.
32+
* Creates and returns the shared instance of the specified Authenticator.
3033
*
31-
* You can pass 'default' as the Authenticator and it
32-
* will return an instance of the first Authenticator specified
33-
* in the Auth config file.
34-
*
35-
* @param string|null $alias Authenticator alias
34+
* @param string|null $alias Authenticator alias. Passing `null` returns the
35+
* default authenticator.
3636
*
3737
* @throws AuthenticationException
3838
*/
@@ -61,7 +61,7 @@ public function factory(?string $alias = null): AuthenticatorInterface
6161
}
6262

6363
/**
64-
* Sets the User provider to use
64+
* Sets the User Provider to use.
6565
*
6666
* @return $this
6767
*/

src/Helpers/auth_helper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ function auth(?string $alias = null): Auth
2222

2323
if (! function_exists('user_id')) {
2424
/**
25-
* Returns the ID for the current logged in user.
26-
* Note: For \CodeIgniter\Shield\Entities\User this will always return an int.
25+
* Returns the ID for the current logged-in user.
2726
*
2827
* @return int|string|null
2928
*/

0 commit comments

Comments
 (0)