| Total Complexity | 4 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class Power |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @Id |
||
| 22 | * @Column(type="integer") |
||
| 23 | * @GeneratedValue(strategy="IDENTITY") |
||
| 24 | */ |
||
| 25 | private $id; |
||
|
|
|||
| 26 | |||
| 27 | /** |
||
| 28 | * @var integer |
||
| 29 | * @Column(name="horse_power", type="integer", nullable=false) |
||
| 30 | */ |
||
| 31 | protected $horsePower; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var integer |
||
| 35 | * @Column(name="kilowatt", type="integer", nullable=false) |
||
| 36 | */ |
||
| 37 | protected $kilowatt; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var Engine |
||
| 41 | * @OneToOne(targetEntity="Engine") |
||
| 42 | * @Cache("READ_ONLY") |
||
| 43 | * @JoinColumn(name="engine_id", referencedColumnName="id", onDelete="CASCADE") |
||
| 44 | */ |
||
| 45 | protected $engine; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Power constructor. |
||
| 49 | * @param int $horsePower |
||
| 50 | * @param int $kilowatt |
||
| 51 | * @param Engine $engine |
||
| 52 | */ |
||
| 53 | public function __construct(int $horsePower, int $kilowatt, Engine $engine) |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getHorsePower(): int |
||
| 64 | { |
||
| 65 | return $this->horsePower; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return int |
||
| 70 | */ |
||
| 71 | public function getKilowatt(): int |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return Engine |
||
| 78 | */ |
||
| 79 | public function getEngine(): Engine |
||
| 82 | } |
||
| 83 | } |
||
| 84 |