| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | protected function decorate(string $output): string |
||
| 22 | { |
||
| 23 | foreach (config('view.decorators') as $decorator) { |
||
| 24 | if (! is_subclass_of($decorator, ViewDecoratorInterface::class, true)) { |
||
| 25 | 2 | throw ViewException::invalidDecorator($decorator); |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | $output = $decorator::decorate($output); |
|
| 29 | } |
||
| 30 | |||
| 31 | 2 | return $output; |
|
| 32 | } |
||
| 34 |