ThemeComposer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A compose() 0 4 1
1
<?php namespace Modules\Core\Composers;
2
3
use Illuminate\Contracts\View\View;
4
use Modules\Core\Foundation\Theme\ThemeManager;
5
6
class ThemeComposer
7
{
8
    /**
9
     * @var ThemeManager
10
     */
11
    private $themeManager;
12
13
    public function __construct(ThemeManager $themeManager)
14
    {
15
        $this->themeManager = $themeManager;
16
    }
17
18
    public function compose(View $view)
19
    {
20
        $view->with('themes', $this->themeManager->allPublicThemes());
21
    }
22
}
23