mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-24 15:22:51 +02:00
Builder :: added missing return types
This commit is contained in:
@@ -14,19 +14,19 @@ class CarBuilder implements Builder
|
||||
{
|
||||
private Car $car;
|
||||
|
||||
public function addDoors()
|
||||
public function addDoors(): void
|
||||
{
|
||||
$this->car->setPart('rightDoor', new Door());
|
||||
$this->car->setPart('leftDoor', new Door());
|
||||
$this->car->setPart('trunkLid', new Door());
|
||||
}
|
||||
|
||||
public function addEngine()
|
||||
public function addEngine(): void
|
||||
{
|
||||
$this->car->setPart('engine', new Engine());
|
||||
}
|
||||
|
||||
public function addWheel()
|
||||
public function addWheel(): void
|
||||
{
|
||||
$this->car->setPart('wheelLF', new Wheel());
|
||||
$this->car->setPart('wheelRF', new Wheel());
|
||||
@@ -34,7 +34,7 @@ class CarBuilder implements Builder
|
||||
$this->car->setPart('wheelRR', new Wheel());
|
||||
}
|
||||
|
||||
public function createVehicle()
|
||||
public function createVehicle(): void
|
||||
{
|
||||
$this->car = new Car();
|
||||
}
|
||||
|
Reference in New Issue
Block a user