mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 18:50:11 +02:00
19 lines
295 B
PHP
19 lines
295 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Behavioral\Specification;
|
|
|
|
class Item
|
|
{
|
|
private float $price;
|
|
|
|
public function __construct(float $price)
|
|
{
|
|
$this->price = $price;
|
|
}
|
|
|
|
public function getPrice(): float
|
|
{
|
|
return $this->price;
|
|
}
|
|
}
|