Completed
Push — master ( 463605...f15859 )
by Guillaume
16:46
created

CampagneManager::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
3
namespace Starkerxp\CampagneBundle\Manager;
4
5
use Starkerxp\CampagneBundle\Entity\Campagne;
6
use Starkerxp\StructureBundle\Entity\Entity;
7
use Starkerxp\StructureBundle\Manager\AbstractManager;
8
9
class CampagneManager extends AbstractManager
10
{
11
    public function getSupport(Entity $object)
12
    {
13
        return $object instanceof Campagne;
14
    }
15
16
    public function toArray(Campagne $object, $fields = [])
17
    {
18
        $array = [
19
            "id"     => $object->getId(),
20
            "name"   => $object->getName(),
21
            "status" => $object->getStatus(),
22
        ];
23
24
        return $this->exportFields($array, $fields);
25
    }
26
27
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
28