| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | use Assetic\Factory\AssetFactory; |
||
| 10 | |||
| 11 | class LastModifiedStrategy implements WorkerInterface |
||
| 12 | { |
||
| 13 | |||
| 14 | public function process(AssetInterface $asset, AssetFactory $factory): ?AssetInterface |
||
| 15 | { |
||
| 16 | $path = $asset->getTargetPath(); |
||
| 17 | if (null === $path) { |
||
| 18 | return null; |
||
| 19 | } |
||
| 20 | |||
| 21 | $ext = pathinfo($path, PATHINFO_EXTENSION); |
||
| 22 | |||
| 23 | $lastModified = $factory->getLastModified($asset); |
||
| 24 | if (null !== $lastModified) { |
||
| 25 | $path = substr_replace( |
||
| 36 |