1 | <?php declare(strict_types=1); |
||
32 | class Auth { |
||
33 | use CacheTrait; |
||
34 | use ContainerAware; |
||
35 | |||
36 | /** |
||
37 | * Anime API Model |
||
38 | * |
||
39 | * @var \Aviat\AnimeClient\API\Kitsu\Model |
||
40 | */ |
||
41 | protected $model; |
||
42 | |||
43 | /** |
||
44 | * Session object |
||
45 | * |
||
46 | * @var Aura\Session\Segment |
||
47 | */ |
||
48 | protected $segment; |
||
49 | |||
50 | /** |
||
51 | * Constructor |
||
52 | * |
||
53 | * @param ContainerInterface $container |
||
|
|||
54 | */ |
||
55 | public function __construct(ContainerInterface $container) |
||
63 | |||
64 | /** |
||
65 | * Make the appropriate authentication call, |
||
66 | * and save the resulting auth token if successful |
||
67 | * |
||
68 | * @param string $password |
||
69 | * @return boolean |
||
70 | */ |
||
71 | public function authenticate($password) |
||
99 | |||
100 | /** |
||
101 | * Check whether the current user is authenticated |
||
102 | * |
||
103 | * @return boolean |
||
104 | */ |
||
105 | public function is_authenticated() |
||
109 | |||
110 | /** |
||
111 | * Clear authentication values |
||
112 | * |
||
113 | * @return void |
||
114 | */ |
||
115 | public function logout() |
||
119 | |||
120 | /** |
||
121 | * Retrieve the authentication token from the session |
||
122 | * |
||
123 | * @return string|false |
||
124 | */ |
||
125 | public function get_auth_token() |
||
129 | } |
||
130 | // End of KitsuAuth.php |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.