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

ViewExcelExport::view()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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