Completed
Pull Request — master (#3)
by ARCANEDEV
06:36
created

DefaultSerializer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 28
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 4 1
A getHeader() 0 4 1
1
<?php namespace Arcanedev\LaravelExcel\Exporters;
2
3
use Arcanedev\LaravelExcel\Contracts\Serializer as SerializerContract;
4
5
/**
6
 * Class     DefaultSerializer
7
 *
8
 * @package  Arcanedev\LaravelExcel\Exporter
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class DefaultSerializer implements SerializerContract
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Getters & Setters
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Get the serialized data.
19
     *
20
     * @param  \Illuminate\Database\Eloquent\Model  $data
21
     *
22
     * @return array
23
     */
24 6
    public function getData($data)
25
    {
26 6
        return $data->toArray();
27
    }
28
29
    /**
30
     * Get the header.
31
     *
32
     * @return array
33
     */
34 12
    public function getHeader()
35
    {
36 12
        return [];
37
    }
38
}
39