mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
23 lines
323 B
PHP
23 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;
|
|
}
|
|
}
|