23 lines
337 B
PHP
23 lines
337 B
PHP
<?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;
|
|
}
|
|
}
|