mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-05 22:47:34 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -2,31 +2,31 @@
|
||||
|
||||
require '../../vendor/autoload.php';
|
||||
|
||||
use DesignPatterns\More\EAV\Entity;
|
||||
use DesignPatterns\More\EAV\Attribute;
|
||||
use DesignPatterns\More\EAV\Entity;
|
||||
use DesignPatterns\More\EAV\Value;
|
||||
|
||||
// Create color attribute
|
||||
$color = (new Attribute())->setName('Color');
|
||||
// Create color values
|
||||
$colorSilver = (new Value($color))->setName('Silver');
|
||||
$colorGold = (new Value($color))->setName('Gold');
|
||||
$colorSilver = (new Value($color))->setName('Silver');
|
||||
$colorGold = (new Value($color))->setName('Gold');
|
||||
$colorSpaceGrey = (new Value($color))->setName('Space Grey');
|
||||
|
||||
// Create memory attribute
|
||||
$memory = (new Attribute())->setName('Memory');
|
||||
$memory = (new Attribute())->setName('Memory');
|
||||
// Create memory values
|
||||
$memory4Gb = (new Value($memory))->setName('4GB');
|
||||
$memory8Gb = (new Value($memory))->setName('8GB');
|
||||
$memory4Gb = (new Value($memory))->setName('4GB');
|
||||
$memory8Gb = (new Value($memory))->setName('8GB');
|
||||
$memory16Gb = (new Value($memory))->setName('16GB');
|
||||
|
||||
// Create storage attribute
|
||||
$storage = (new Attribute())->setName('Storage');
|
||||
$storage = (new Attribute())->setName('Storage');
|
||||
// Create storage values
|
||||
$storage128Gb = (new Value($storage))->setName('128GB');
|
||||
$storage256Gb = (new Value($storage))->setName('256GB');
|
||||
$storage512Gb = (new Value($storage))->setName('512GB');
|
||||
$storage1Tb = (new Value($storage))->setName('1TB');
|
||||
$storage128Gb = (new Value($storage))->setName('128GB');
|
||||
$storage256Gb = (new Value($storage))->setName('256GB');
|
||||
$storage512Gb = (new Value($storage))->setName('512GB');
|
||||
$storage1Tb = (new Value($storage))->setName('1TB');
|
||||
|
||||
// Create entities with specific values
|
||||
$mac = (new Entity())
|
||||
@@ -39,8 +39,7 @@ $mac = (new Entity())
|
||||
->addValue($memory8Gb)
|
||||
// storages
|
||||
->addValue($storage256Gb)
|
||||
->addValue($storage512Gb)
|
||||
;
|
||||
->addValue($storage512Gb);
|
||||
|
||||
$macAir = (new Entity())
|
||||
->setName('MacBook Air')
|
||||
@@ -52,8 +51,7 @@ $macAir = (new Entity())
|
||||
// storages
|
||||
->addValue($storage128Gb)
|
||||
->addValue($storage256Gb)
|
||||
->addValue($storage512Gb)
|
||||
;
|
||||
->addValue($storage512Gb);
|
||||
|
||||
$macPro = (new Entity())
|
||||
->setName('MacBook Pro')
|
||||
@@ -66,5 +64,4 @@ $macPro = (new Entity())
|
||||
->addValue($storage128Gb)
|
||||
->addValue($storage256Gb)
|
||||
->addValue($storage512Gb)
|
||||
->addValue($storage1Tb)
|
||||
;
|
||||
->addValue($storage1Tb);
|
||||
|
Reference in New Issue
Block a user