Added Decorator and observer Patterns along with UnitTest for Observer
This commit is contained in:
@@ -9,4 +9,9 @@
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
dump('Decorator');
|
||||
use Pattern\Structural\Decorator\{BasicInspection, OilChange, TireRotation};
|
||||
|
||||
$service = new TireRotation(new OilChange(new BasicInspection()));
|
||||
|
||||
echo $service->getDescription() . ': $';
|
||||
echo $service->getCost();
|
||||
|
||||
Reference in New Issue
Block a user