Completed
Push — 3.x-dev-kit ( cc4dbe )
by
unknown
03:15
created

BaseMessage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 3 Features 0
Metric Value
wmc 2
c 4
b 3
f 0
lcom 0
cbo 1
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __clone() 0 6 1
A getId() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\NotificationBundle\Entity;
13
14
use Sonata\NotificationBundle\Model\Message;
15
16
class BaseMessage extends Message
17
{
18
    /**
19
     * @var int
20
     */
21
    protected $id;
22
23
    /**
24
     * Override clone in order to avoid duplicating entries in Doctrine.
25
     */
26
    public function __clone()
27
    {
28
        parent::__clone();
29
30
        $this->id = null;
31
    }
32
33
    /**
34
     * Get id.
35
     *
36
     * @return int $id
37
     */
38
    public function getId()
39
    {
40
        return $this->id;
41
    }
42
}
43