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

DefaultSerializer::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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