| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __construct(string $bladeViewName, string $name = '') |
||
| 25 | { |
||
| 26 | $bladeViewName = str_replace('.', '/', $bladeViewName); |
||
| 27 | |||
| 28 | if ($name === '') { |
||
| 29 | $baseComponentName = explode('/', $bladeViewName); |
||
| 30 | |||
| 31 | $name = kebab_case(end($baseComponentName)); |
||
| 32 | } |
||
| 33 | |||
| 34 | if (! view()->exists($bladeViewName)) { |
||
| 35 | throw CouldNotRegisterBladeXComponent::viewNotFound($bladeViewName, $name); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->bladeViewName = $bladeViewName; |
||
| 39 | |||
| 40 | $this->name = $name; |
||
| 41 | } |
||
| 42 | |||
| 58 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.