Skip to content

Commit db85890

Browse files
committed
Use new config() functionality
1 parent 3341b99 commit db85890

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Config/Services.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ public static function assets(BaseConfig $config = null, RendererInterface $view
1111
return static::getSharedInstance('assets', $config, $view);
1212
endif;
1313

14-
// prioritizes user config in app/Config if found
15-
if (empty($config)):
16-
if (class_exists('\Config\Assets')):
17-
$config = new \Config\Assets();
18-
else:
19-
$config = new \Tatter\Assets\Config\Assets();
20-
endif;
21-
endif;
14+
// If no config was injected then load one
15+
// Prioritizes app/Config if found
16+
if (empty($config))
17+
$config = config('Assets');
2218

2319
return new \Tatter\Assets\Assets($config, $view);
2420
}

0 commit comments

Comments
 (0)