mirror of
https://github.com/jupeter/clean-code-php.git
synced 2025-09-26 05:59:04 +02:00
Merge pull request #155 from domnikl/avoid-type-checking-part-1-naming
used a better name for Vehicle abstraction
This commit is contained in:
@@ -1059,7 +1059,7 @@ function travelToTexas($vehicle): void
|
|||||||
**Good:**
|
**Good:**
|
||||||
|
|
||||||
```php
|
```php
|
||||||
function travelToTexas(Traveler $vehicle): void
|
function travelToTexas(Vehicle $vehicle): void
|
||||||
{
|
{
|
||||||
$vehicle->travelTo(new Location('texas'));
|
$vehicle->travelTo(new Location('texas'));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user