mirror of
https://github.com/jupeter/clean-code-php.git
synced 2025-09-26 05:59:04 +02:00
separate client is not good way
This commit is contained in:
@@ -1199,7 +1199,10 @@ foreach ($rectangles as $rectangle) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Good:**
|
**Not good:**
|
||||||
|
|
||||||
|
You can separate client for differen shapes.
|
||||||
|
But this is not a best solution becous the square is still must be a subtype of the rectangle.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
interface Shape
|
interface Shape
|
||||||
|
Reference in New Issue
Block a user