DefaultSerializer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

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
    /**
19
     * Get the serialized data.
20
     *
21
     * @param  \Illuminate\Database\Eloquent\Model  $data
22
     *
23
     * @return array
24
     */
25 6
    public function getData($data)
26
    {
27 6
        return $data->toArray();
28
    }
29
30
    /**
31
     * Get the header.
32
     *
33
     * @return array
34
     */
35 9
    public function getHeader()
36
    {
37 9
        return [];
38
    }
39
}
40