yokai-php /
security-token-bundle
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Yokai\SecurityTokenBundle\Repository; |
||
| 4 | |||
| 5 | use Yokai\SecurityTokenBundle\Entity\Token; |
||
| 6 | use Yokai\SecurityTokenBundle\Exception\TokenExpiredException; |
||
| 7 | use Yokai\SecurityTokenBundle\Exception\TokenNotFoundException; |
||
| 8 | use Yokai\SecurityTokenBundle\Exception\TokenUsedException; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @author Yann Eugoné <[email protected]> |
||
| 12 | */ |
||
| 13 | interface TokenRepositoryInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param string $value |
||
| 17 | * @param string $purpose |
||
| 18 | * |
||
| 19 | * @return Token |
||
| 20 | * |
||
| 21 | * @throws TokenNotFoundException if the token cannot be found |
||
| 22 | * @throws TokenExpiredException if the token is expired |
||
| 23 | * @throws TokenUsedException if the token is used |
||
| 24 | */ |
||
| 25 | public function get($value, $purpose); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $value |
||
| 29 | * @param string $purpose |
||
| 30 | * |
||
| 31 | * @return boolean |
||
| 32 | */ |
||
| 33 | public function exists($value, $purpose); |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param Token $token |
||
| 37 | */ |
||
| 38 | public function create(Token $token); |
||
|
0 ignored issues
–
show
|
|||
| 39 | |||
| 40 | /** |
||
| 41 | * @param Token $token |
||
| 42 | */ |
||
| 43 | public function update(Token $token); |
||
|
0 ignored issues
–
show
For interfaces and abstract methods it is generally a good practice to add a
@return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.
For interface and abstract methods, it is impossible to infer the return type
from the immediate code. In these cases, it is generally advisible to explicitly
annotate these methods with a Loading history...
|
|||
| 44 | } |
||
| 45 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.