Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class Engine |
||
18 | { |
||
19 | /** |
||
20 | * @Id |
||
21 | * @Column(type="integer") |
||
22 | * @GeneratedValue(strategy="IDENTITY") |
||
23 | */ |
||
24 | private $id; |
||
25 | |||
26 | /** |
||
27 | * @var Power |
||
28 | * @Cache("READ_ONLY") |
||
29 | * @OneToOne(targetEntity="Power", mappedBy="engine") |
||
30 | */ |
||
31 | private $power; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | * @Column(name="model", type="string", nullable=false) |
||
36 | */ |
||
37 | private $model; |
||
38 | |||
39 | /** |
||
40 | * Engine constructor. |
||
41 | * @param string $model |
||
42 | */ |
||
43 | public function __construct(string $model) |
||
44 | { |
||
45 | $this->model = $model; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return Power |
||
50 | */ |
||
51 | public function getPower(): Power |
||
52 | { |
||
53 | return $this->power; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return mixed |
||
58 | */ |
||
59 | public function getId() |
||
60 | { |
||
61 | return $this->id; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getModel(): string |
||
70 | } |
||
71 | } |
||
72 |