Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed May 6, 2023
1 parent a3d5239 commit f9c311b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<report>
<clover outputFile="coverage/clover.xml"/>
<html outputDirectory="coverage/html" lowUpperBound="50" highLowerBound="90"/>
<php outputFile="coverage/coverage.php"/>
<text outputFile="coverage/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<text outputFile="coverage/coverage.txt" showUncoveredFiles="false" />
<xml outputDirectory="coverage/xml"/>
</report>
</coverage>
Expand Down
4 changes: 0 additions & 4 deletions src/FakeCar.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function vehicleRegistration(string $regex = '[A-Z]{3}-[0-9]{3}'): string
public function vehicleType(): string
{
return (string) $this->dataProvider->getVehicleType();
//return (string) static::randomElement(FakeCarData::getVehicleTypes());
}

/**
Expand All @@ -138,7 +137,6 @@ public function vehicleFuelType(int $count = 1): string
public function vehicleDoorCount(): int
{
return (int) $this->dataProvider->getVehicleDoorCount();
//return (int) static::getWeighted(FakeCarData::getVehicleDoorCount());
}

/**
Expand All @@ -150,7 +148,6 @@ public function vehicleDoorCount(): int
public function vehicleSeatCount(): int
{
return (int) $this->dataProvider->getVehicleSeatCount();
//return (int) static::getWeighted(FakeCarData::getVehicleSeatCount());
}

/**
Expand All @@ -164,7 +161,6 @@ public function vehicleSeatCount(): int
public function vehicleProperties(int $count = 0): array
{
return $this->dataProvider->getVehicleProperties($count);
return static::getRandomElementsFromArray(FakeCarData::getVehicleProperties(), $count);
}

/**
Expand Down
4 changes: 0 additions & 4 deletions src/Fakecar.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function vehicleRegistration(string $regex = '[A-Z]{3}-[0-9]{3}'): string
public function vehicleType(): string
{
return (string) $this->dataProvider->getVehicleType();
//return (string) static::randomElement(FakeCarData::getVehicleTypes());
}

/**
Expand All @@ -138,7 +137,6 @@ public function vehicleFuelType(int $count = 1): string
public function vehicleDoorCount(): int
{
return (int) $this->dataProvider->getVehicleDoorCount();
//return (int) static::getWeighted(FakeCarData::getVehicleDoorCount());
}

/**
Expand All @@ -150,7 +148,6 @@ public function vehicleDoorCount(): int
public function vehicleSeatCount(): int
{
return (int) $this->dataProvider->getVehicleSeatCount();
//return (int) static::getWeighted(FakeCarData::getVehicleSeatCount());
}

/**
Expand All @@ -164,7 +161,6 @@ public function vehicleSeatCount(): int
public function vehicleProperties(int $count = 0): array
{
return $this->dataProvider->getVehicleProperties($count);
return static::getRandomElementsFromArray(FakeCarData::getVehicleProperties(), $count);
}

/**
Expand Down

0 comments on commit f9c311b

Please sign in to comment.