Factory Method

This commit is contained in:
2025-07-03 19:35:54 +03:00
parent 91f8ded888
commit 0f4618edf5
24 changed files with 409 additions and 31 deletions

View File

@@ -0,0 +1,22 @@
<?php
/**
* @package: patterns
* @author: Yevhen Odynets
* @date: 2025-07-03
* @time: 12:08
*/
declare(strict_types = 1);
namespace Pattern\Creational\FactoryMethod;
final readonly class Order
{
public function __construct(private float $sum) {}
public function getSum(): float
{
return $this->sum;
}
}