Added Decorator and observer Patterns along with UnitTest for Observer

This commit is contained in:
2025-07-06 14:36:53 +03:00
parent dabbf541dc
commit f76eb08fe0
20 changed files with 1887 additions and 126 deletions

View File

@@ -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();