1 | <?php |
||
6 | class LastModifyStrategy implements VersionStrategyInterface |
||
7 | { |
||
8 | /** @var string */ |
||
9 | protected $staticDir; |
||
10 | /** @var null|string */ |
||
11 | protected $cdnHost; |
||
12 | |||
13 | /** |
||
14 | * @param string $staticDir |
||
15 | * @param string|null $cdnHost |
||
16 | */ |
||
17 | 6 | public function __construct(string $staticDir, string $cdnHost = null) |
|
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | 5 | public function getVersion($path): string |
|
31 | |||
32 | /** |
||
33 | * @inheritdoc |
||
34 | */ |
||
35 | 5 | public function applyVersion($relPath): string |
|
50 | } |
||
51 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: