Used setters into class constructors

This commit is contained in:
ErickSkrauch committed 2016-04-30 12:26:39 +03:00
1 parent 676d2bee6d
commit 094ef807c5
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ class Storage implements StorageInterface
*/
public function __construct(array $items = [])
{
$this->items = $items;
$this->setItems($items);
}
/**
+2 -2
View File
@@ -22,8 +22,8 @@ class Validator
*/
public function __construct(StorageInterface $primaryStorage, StorageInterface $secondaryStorage = null)
{
$this->primaryStorage = $primaryStorage;
$this->secondaryStorage = $secondaryStorage;
$this->setPrimaryStorage($primaryStorage);
$this->setSecondaryStorage($secondaryStorage);
}
/**