Completed
Push — master ( 9dd409...b5065b )
by Arjay
01:22
created

DataTablesExportHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A collection() 0 4 1
1
<?php
2
3
namespace Yajra\DataTables\Services;
4
5
use Illuminate\Support\Collection;
6
use Maatwebsite\Excel\Concerns\Exportable;
7
use Maatwebsite\Excel\Concerns\FromCollection;
8
9
class DataTablesExportHandler implements FromCollection
10
{
11
    use Exportable;
12
13
    /**
14
     * @var Collection
15
     */
16
    protected $collection;
17
18
    /**
19
     * DataTablesExportHandler constructor.
20
     *
21
     * @param Collection $collection
22
     */
23
    public function __construct(Collection $collection)
24
    {
25
        $this->collection = $collection;
26
    }
27
28
    /**
29
     * @return Collection
30
     */
31
    public function collection()
32
    {
33
        return $this->collection;
34
    }
35
}
36