Test Failed
Push — feature-laravel-5.4 ( dbda8c...02b5b6 )
by Kirill
03:30
created

NavComposer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A compose() 0 4 1
1
<?php
2
/**
3
 * This file is part of laravel.su package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace App\Views\Composers;
10
11
use Illuminate\View\View;
12
use App\Services\NavMatcher;
13
14
/**
15
 * Class NavComposer.
16
 */
17
class NavComposer
18
{
19
    /**
20
     * @var NavMatcher
21
     */
22
    private $matcher;
23
24
    /**
25
     * NavComposer constructor.
26
     * @param NavMatcher $matcher
27
     */
28
    public function __construct(NavMatcher $matcher)
29
    {
30
        $this->matcher = $matcher;
31
    }
32
33
    /**
34
     * @param View $view
35
     */
36
    public function compose(View $view)
37
    {
38
        $view->with('nav', $this->matcher);
39
    }
40
}