Completed
Pull Request — master (#96)
by
unknown
03:45
created

SiteNameViewComposer::compose()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Modules\Core\Composers;
4
5
use Illuminate\Contracts\View\View;
6
use Illuminate\Support\Facades\App;
7
use Modules\Setting\Contracts\Setting;
8
9
class SiteNameViewComposer
10
{
11
    /**
12
     * @var Setting
13
     */
14
    private $setting;
15
16
    public function __construct(Setting $setting)
17
    {
18
        $this->setting = $setting;
19
    }
20
21
    public function compose(View $view)
22
    {
23
        $view->with('sitename', $this->setting->get('core::site-name', App::getLocale()));
24
    }
25
}
26