FaqComposer::__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\FaqRepository;
6
use Illuminate\Contracts\View\View;
7
8
class FaqComposer extends Composer
9
{
10
    /**
11
     * @var FaqRepository
12
     */
13
    protected $faqRepository;
14
15
    /**
16
     * FaqComposer constructor.
17
     * @param FaqRepository $faqRepository
18
     */
19
    public function __construct(FaqRepository $faqRepository)
20
    {
21
        $this->faqRepository = $faqRepository;
22
    }
23
24
    /**
25
     * @param View $view
26
     *
27
     * @return $view
0 ignored issues
show
Documentation introduced by
The doc-type $view could not be parsed: Unknown type name "$view" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
28
     */
29
    public function compose(View $view)
30
    {
31
        return $view->with('faq', $this->faqRepository->getPublic());
32
    }
33
}