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\Exception; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Exception thrown when token is not found. |
||
| 7 | * |
||
| 8 | * @author Yann Eugoné <[email protected]> |
||
| 9 | */ |
||
| 10 | class TokenNotFoundException extends InvalidTokenException |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Create an instance of this class. |
||
| 14 | * |
||
| 15 | * @param string $value The token value |
||
| 16 | * @param string $purpose The token purpose |
||
| 17 | * |
||
| 18 | * @return TokenNotFoundException |
||
|
0 ignored issues
–
show
|
|||
| 19 | */ |
||
| 20 | 2 | public static function create(string $value, string $purpose): self |
|
| 21 | { |
||
| 22 | 2 | return new self( |
|
| 23 | 2 | sprintf( |
|
| 24 | 2 | 'The "%s" token with value "%s" was not found.', |
|
| 25 | 2 | $purpose, |
|
| 26 | 2 | $value |
|
| 27 | ) |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.