| Total Complexity | 4 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class Car |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @Id |
||
| 22 | * @Column(type="integer") |
||
| 23 | * @GeneratedValue(strategy="IDENTITY") |
||
| 24 | */ |
||
| 25 | private $id; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var Engine |
||
| 29 | * @Cache("READ_ONLY") |
||
| 30 | * @ManyToOne(targetEntity="Engine") |
||
| 31 | * @JoinColumn(name="engine", referencedColumnName="id", nullable=false) |
||
| 32 | */ |
||
| 33 | protected $engine; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | * @Column(name="color", type="text", nullable=false) |
||
| 38 | */ |
||
| 39 | protected $color; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Car constructor. |
||
| 43 | * @param Engine $engine |
||
| 44 | * @param string $color |
||
| 45 | */ |
||
| 46 | public function __construct(string $color, Engine $engine) |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return mixed |
||
| 54 | */ |
||
| 55 | public function getId() |
||
| 56 | { |
||
| 57 | return $this->id; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return Engine |
||
| 62 | */ |
||
| 63 | public function getEngine(): Engine |
||
| 64 | { |
||
| 65 | return $this->engine; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | public function getColor(): string |
||
| 74 | } |
||
| 75 | } |
||
| 76 |