| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 61.53% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | trait HasEntrypointLookup |
||
| 12 | { |
||
| 13 | 1 | protected function getEntrypointLookup(string $entrypointName): EntrypointLookupInterface |
|
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $entrypointName |
||
| 20 | * @return bool|false |
||
| 21 | */ |
||
| 22 | public function hasEntrypoint(string $entrypointName) |
||
| 23 | { |
||
| 24 | try { |
||
| 25 | $this->getEntrypointLookup($entrypointName); |
||
| 26 | } catch (\Exception $e) { |
||
| 27 | return false; |
||
| 28 | } |
||
| 29 | return true; |
||
| 30 | } |
||
| 31 | |||
| 32 | 1 | public function getWebpackJsFiles(string $entryName, string $entrypointName = '_default'): array |
|
| 33 | { |
||
| 34 | 1 | return $this->getEntrypointLookup($entrypointName) |
|
| 35 | 1 | ->getJavaScriptFiles($entryName); |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function getWebpackCssFiles(string $entryName, string $entrypointName = '_default'): array |
|
| 42 | } |
||
| 43 | } |
||
| 44 |