Completed
Push — master ( 2e5350...f0c5b4 )
by Tobias
10:07
created

Owner   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 1 Features 1
Metric Value
wmc 3
c 4
b 1
f 1
lcom 0
cbo 1
dl 0
loc 28
rs 10
1
<?php
2
3
namespace Happyr\SerializerBundle\Tests\Fixtures\Composition;
4
5
use Happyr\SerializerBundle\Annotation as Serializer;
6
7
class Owner
8
{
9
    private $name;
10
11
    /**
12
     * @Serializer\Type("Happyr\SerializerBundle\Tests\Fixtures\Composition\Car")
13
     */
14
    private $car;
15
16
    private $birthday;
17
18
    public function __construct($withValues = false)
19
    {
20
        if ($withValues) {
21
            $this->name = 'Foobar';
22
            $this->car = new Car(true);
23
            $this->birthday = new \DateTime('-21years');
24
        }
25
    }
26
27
    /**
28
     * @return Car
29
     */
30
    public function getCar()
31
    {
32
        return $this->car;
33
    }
34
}
35