1 | <?php |
||
18 | class RefreshTokenManager extends BaseRefreshTokenManager |
||
19 | { |
||
20 | protected $objectManager; |
||
21 | protected $class; |
||
22 | protected $repository; |
||
23 | protected $maxTokenByUser; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param ObjectManager $om |
||
29 | * @param string $class |
||
30 | 7 | * @param string $maxTokenByUser |
|
31 | */ |
||
32 | 7 | public function __construct(ObjectManager $om, $class, $maxTokenByUser) |
|
40 | |||
41 | /** |
||
42 | * @param string $refreshToken |
||
43 | 1 | * |
|
44 | * @return RefreshTokenInterface |
||
45 | 1 | */ |
|
46 | public function get($refreshToken) |
||
50 | |||
51 | /** |
||
52 | * @param string $username |
||
53 | 1 | * |
|
54 | * @return RefreshTokenInterface |
||
55 | 1 | */ |
|
56 | public function getLastFromUsername($username) |
||
60 | |||
61 | /** |
||
62 | 1 | * @param RefreshTokenInterface $refreshToken |
|
63 | * @param bool|true $andFlush |
||
64 | 1 | */ |
|
65 | public function save(RefreshTokenInterface $refreshToken, $andFlush = true) |
||
81 | 1 | ||
82 | 1 | /** |
|
83 | * @param RefreshTokenInterface $refreshToken |
||
84 | * @param bool $andFlush |
||
85 | */ |
||
86 | public function delete(RefreshTokenInterface $refreshToken, $andFlush = true) |
||
94 | 1 | ||
95 | 1 | /** |
|
96 | 1 | * @param \DateTime $datetime |
|
97 | * @param bool $andFlush |
||
98 | 1 | * |
|
99 | 1 | * @return RefreshTokenInterface[] |
|
100 | 1 | */ |
|
101 | public function revokeAllInvalid($datetime = null, $andFlush = true) |
||
107 | |||
108 | /** |
||
109 | * @param RefreshTokenInterface[] $tokens |
||
110 | 1 | * @param bool $andFlush |
|
111 | * |
||
112 | 1 | * @return RefreshTokenInterface[] |
|
113 | */ |
||
114 | public function revokeTokens($tokens, $andFlush) |
||
126 | |||
127 | /** |
||
128 | * @param string $username |
||
129 | * @param bool $andFlush |
||
130 | * |
||
131 | * @return RefreshTokenInterface[] |
||
132 | */ |
||
133 | public function revokeAllTokenByUsername($username, $andFlush = true) |
||
139 | |||
140 | /** |
||
141 | * Returns the RefreshToken fully qualified class name. |
||
142 | * |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getClass() |
||
149 | } |
||
150 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.