mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-05-07 06:56:25 +02:00
22 lines
298 B
PHP
22 lines
298 B
PHP
<?php
|
|
|
|
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;
|
|
}
|
|
}
|