Passed
Push — master ( 831269...80f51c )
by Stephen
02:10 queued 12s
created

ViewExcelExport   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

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\Exports;
4
5
use Illuminate\Contracts\View\View;
6
use Maatwebsite\Excel\Concerns\FromView;
7
use Sfneal\ViewExport\Support\ExcelExport;
8
9
class ViewExcelExport extends ExcelExport implements FromView
10
{
11
    /**
12
     * @var View
13
     */
14
    private $view;
15
16
    /**
17
     * Excel constructor.
18
     *
19
     * @param View $view
20
     */
21
    public function __construct(View $view)
22
    {
23
        $this->view = $view;
24
    }
25
26
    /**
27
     * Return a used in the Excel export.
28
     *
29
     * @return View
30
     */
31
    public function view(): View
32
    {
33
        return $this->view;
34
    }
35
}
36