mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
update deps & install rector
This commit is contained in:
@@ -2,21 +2,16 @@
|
||||
|
||||
namespace DesignPatterns\More\EAV;
|
||||
|
||||
use SplObjectStorage;
|
||||
|
||||
class Attribute
|
||||
{
|
||||
/**
|
||||
* @var \SplObjectStorage
|
||||
*/
|
||||
private $values;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
private SplObjectStorage $values;
|
||||
private string $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->values = new \SplObjectStorage();
|
||||
$this->values = new SplObjectStorage();
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
@@ -25,10 +20,7 @@ class Attribute
|
||||
$this->values->attach($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SplObjectStorage
|
||||
*/
|
||||
public function getValues(): \SplObjectStorage
|
||||
public function getValues(): SplObjectStorage
|
||||
{
|
||||
return $this->values;
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ class Entity
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
private string $name;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
@@ -22,6 +22,7 @@ class Entity
|
||||
*/
|
||||
public function __construct(string $name, $values)
|
||||
{
|
||||
/** @var SplObjectStorage<Value,Value> values */
|
||||
$this->values = new SplObjectStorage();
|
||||
$this->name = $name;
|
||||
|
||||
|
@@ -4,15 +4,8 @@ namespace DesignPatterns\More\EAV;
|
||||
|
||||
class Value
|
||||
{
|
||||
/**
|
||||
* @var Attribute
|
||||
*/
|
||||
private $attribute;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
private Attribute $attribute;
|
||||
private string $name;
|
||||
|
||||
public function __construct(Attribute $attribute, string $name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user