update deps & install rector

This commit is contained in:
Dominik Liebler
2019-12-14 12:50:05 +01:00
parent 04acce6759
commit 579a5ac946
87 changed files with 2432 additions and 786 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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)
{