SocialComposer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A compose() 0 4 1
1
<?php
2
3
namespace App\Http\ViewComposers;
4
5
use App\Repositories\SocialRepository;
6
use Illuminate\Contracts\View\View;
7
8
class SocialComposer extends Composer
9
{
10
    /**
11
     * @var SocialRepository
12
     */
13
    protected $socials;
14
15
    /**
16
     * SocialComposer constructor.
17
     * @param SocialRepository $socialRepository
18
     */
19
    public function __construct(SocialRepository $socialRepository)
20
    {
21
        $this->socials = $socialRepository;
22
    }
23
24
    /**
25
     * @param View $view
26
     * @return $this
27
     */
28
    public function compose(View $view)
29
    {
30
        return $view->with('socials', $this->socials->getFooterList());
31
    }
32
}