| 1 | <?php |
||
| 13 | class DeleteArchivist implements ArchivistInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var EntityRepository |
||
| 17 | */ |
||
| 18 | private $tokenRepository; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param EntityRepository $tokenRepository The token entity repository |
||
| 22 | */ |
||
| 23 | public function __construct(EntityRepository $tokenRepository) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritDoc |
||
| 30 | */ |
||
| 31 | public function archive(string $purpose = null): int |
||
| 50 | } |
||
| 51 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: