mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-09 16:36:37 +02:00
update deps & install rector
This commit is contained in:
@@ -7,7 +7,7 @@ class AndSpecification implements Specification
|
||||
/**
|
||||
* @var Specification[]
|
||||
*/
|
||||
private $specifications;
|
||||
private array $specifications;
|
||||
|
||||
/**
|
||||
* @param Specification[] $specifications
|
||||
|
@@ -4,10 +4,7 @@ namespace DesignPatterns\Behavioral\Specification;
|
||||
|
||||
class Item
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $price;
|
||||
private float $price;
|
||||
|
||||
public function __construct(float $price)
|
||||
{
|
||||
|
@@ -4,10 +4,7 @@ namespace DesignPatterns\Behavioral\Specification;
|
||||
|
||||
class NotSpecification implements Specification
|
||||
{
|
||||
/**
|
||||
* @var Specification
|
||||
*/
|
||||
private $specification;
|
||||
private Specification $specification;
|
||||
|
||||
public function __construct(Specification $specification)
|
||||
{
|
||||
|
@@ -7,7 +7,7 @@ class OrSpecification implements Specification
|
||||
/**
|
||||
* @var Specification[]
|
||||
*/
|
||||
private $specifications;
|
||||
private array $specifications;
|
||||
|
||||
/**
|
||||
* @param Specification[] $specifications
|
||||
@@ -27,6 +27,7 @@ class OrSpecification implements Specification
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -4,21 +4,10 @@ namespace DesignPatterns\Behavioral\Specification;
|
||||
|
||||
class PriceSpecification implements Specification
|
||||
{
|
||||
/**
|
||||
* @var float|null
|
||||
*/
|
||||
private $maxPrice;
|
||||
private ?float $maxPrice;
|
||||
private ?float $minPrice;
|
||||
|
||||
/**
|
||||
* @var float|null
|
||||
*/
|
||||
private $minPrice;
|
||||
|
||||
/**
|
||||
* @param float $minPrice
|
||||
* @param float $maxPrice
|
||||
*/
|
||||
public function __construct($minPrice, $maxPrice)
|
||||
public function __construct(?float $minPrice, ?float $maxPrice)
|
||||
{
|
||||
$this->minPrice = $minPrice;
|
||||
$this->maxPrice = $maxPrice;
|
||||
|
Reference in New Issue
Block a user