BlogSettingsComposer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A compose() 0 7 1
1
<?php
2
3
namespace App\Http\ViewComposers;
4
5
use App\Services\BlogThemeServices;
6
use Illuminate\View\View;
7
8
class BlogSettingsComposer
9
{
10
    protected $theme;
11
12
    /**
13
     * Create a new instance.
14
     *
15
     * @return void
16
     */
17
    public function __construct()
18
    {
19
        $this->theme = BlogThemeServices::getBlogTheme();
20
    }
21
22
    /**
23
     * Bind data to the view.
24
     *
25
     * @param View $view
26
     *
27
     * @return void
28
     */
29
    public function compose(View $view)
30
    {
31
        $data = [
32
            'theme' => $this->theme,
33
        ];
34
35
        $view->with($data);
36
    }
37
}
38