Skip to content

Commit 67f8876

Browse files
refactor: ViewDecoratorTrait
Use `View::$config` instead of `config()` function
1 parent f277814 commit 67f8876

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

system/View/ViewDecoratorTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace CodeIgniter\View;
1313

1414
use CodeIgniter\View\Exceptions\ViewException;
15-
use Config\View as ViewConfig;
1615

1716
trait ViewDecoratorTrait
1817
{
@@ -22,9 +21,7 @@ trait ViewDecoratorTrait
2221
*/
2322
protected function decorateOutput(string $html): string
2423
{
25-
$decorators = \config(ViewConfig::class)->decorators;
26-
27-
foreach ($decorators as $decorator) {
24+
foreach ($this->config->decorators as $decorator) {
2825
if (! is_subclass_of($decorator, ViewDecoratorInterface::class)) {
2926
throw ViewException::forInvalidDecorator($decorator);
3027
}

0 commit comments

Comments
 (0)