SocialComposer::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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
}