| Conditions | 5 |
| Paths | 7 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function getChildClassName($type, $name): ?string |
||
| 21 | { |
||
| 22 | foreach (Arr::wrap(config('storyblok.component_class_namespace')) as $namespace) { |
||
| 23 | if (class_exists($namespace . Str::pluralStudly($type) . '\\' . Str::studly($name))) { |
||
| 24 | return $namespace . Str::pluralStudly($type) . '\\' . Str::studly($name); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | foreach (Arr::wrap(config('storyblok.component_class_namespace')) as $namespace) { |
||
| 29 | if (class_exists($namespace . Str::studly($type))) { |
||
| 30 | return $namespace . Str::studly($type); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | return null; |
||
| 35 | } |
||
| 36 | } |