Completed
Push — master ( db4111...70a8a6 )
by Guillaume
02:27
created

LeadManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSupport() 0 4 1
A delete() 0 4 1
A update() 0 4 1
1
<?php
2
3
namespace Starkerxp\LeadBundle\Manager;
4
5
use Starkerxp\LeadBundle\Entity\Lead;
6
use Starkerxp\StructureBundle\Entity\Entity;
7
use Starkerxp\StructureBundle\Manager\AbstractManager;
8
use Starkerxp\StructureBundle\Manager\Exception\DeleteObjectNotAllowedException;
9
use Starkerxp\StructureBundle\Manager\Exception\UpdateObjectNotAllowedException;
10
11
class LeadManager extends AbstractManager
12
{
13
14
    public function getSupport(Entity $object)
15
    {
16
        return $object instanceof Lead;
17
    }
18
19
    /**
20
     * @param Entity $object
21
     * @throws DeleteObjectNotAllowedException
22
     */
23
    public function delete(Entity $object)
24
    {
25
        throw new DeleteObjectNotAllowedException();
26
    }
27
28
    /**
29
     * @param Entity $object
30
     * @return bool|Entity|void
31
     * @throws UpdateObjectNotAllowedException
32
     */
33
    public function update(Entity $object)
34
    {
35
        throw new UpdateObjectNotAllowedException();
36
    }
37
}
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...
38