Passed
Push — master ( adf913...831269 )
by Stephen
01:02 queued 11s
created

ExcelView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 25
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A view() 0 3 1
1
<?php
2
3
namespace Sfneal\ViewExport\Excel\Utils;
4
5
use Illuminate\Contracts\View\View;
6
use Maatwebsite\Excel\Concerns\FromView;
7
8
class ExcelView implements FromView
9
{
10
    /**
11
     * @var View
12
     */
13
    private $view;
14
15
    /**
16
     * Excel constructor.
17
     *
18
     * @param View $view
19
     */
20
    public function __construct(View $view)
21
    {
22
        $this->view = $view;
23
    }
24
25
    /**
26
     * Return a used in the Excel export.
27
     *
28
     * @return View
29
     */
30
    public function view(): View
31
    {
32
        return $this->view;
33
    }
34
}
35