Closed
Description
Subject | Details |
---|---|
Plugin | Php Inspections (EA Extended) |
Language level | PHP 7.2 |
Current behaviour
interface TokenInterface {
public const NEW_TOKEN_LIFETIME = 3600 * 24;
public function generate(int $timestamp = NULL);
}
class Token implements TokenInterface {
public function generate(int $timestamp = NULL) {
$expired = $timestamp ?? time() + self::NEW_TOKEN_LIFETIME;
}
}
Inspection warning on $timestamp ?? time() + self::NEW_TOKEN_LIFETIME
with message [EA] Resolved operands types are not complimentary, while they should be ([int] vs [float])
.
Expected behaviour
No warnings.
Activity