mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
add psalm and travis check
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace DesignPatterns\More\EAV;
|
||||
|
||||
use SplObjectStorage;
|
||||
|
||||
class Entity
|
||||
{
|
||||
/**
|
||||
* @var \SplObjectStorage
|
||||
* @var SplObjectStorage<Value,Value>
|
||||
*/
|
||||
private $values;
|
||||
|
||||
@@ -20,7 +22,7 @@ class Entity
|
||||
*/
|
||||
public function __construct(string $name, $values)
|
||||
{
|
||||
$this->values = new \SplObjectStorage();
|
||||
$this->values = new SplObjectStorage();
|
||||
$this->name = $name;
|
||||
|
||||
foreach ($values as $value) {
|
||||
|
@@ -24,6 +24,6 @@ class Value
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return sprintf('%s: %s', $this->attribute, $this->name);
|
||||
return sprintf('%s: %s', (string) $this->attribute, $this->name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user