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