@@ -46,7 +46,7 @@ |
||
46 | 46 | * @param array $data |
47 | 47 | * @return EntityEvent |
48 | 48 | */ |
49 | - public function createEvent($event, EntityInterface $entity = null, array $data = []) |
|
49 | + public function createEvent($event, EntityInterface $entity = null, array $data = [ ]) |
|
50 | 50 | { |
51 | 51 | return new EntityEvent($event, $entity, $data); |
52 | 52 | } |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * @var array |
23 | 23 | */ |
24 | - protected $data = []; |
|
24 | + protected $data = [ ]; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @var array |
28 | 28 | */ |
29 | - protected $validData = []; |
|
29 | + protected $validData = [ ]; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @var array |
33 | 33 | */ |
34 | - protected $errors = []; |
|
34 | + protected $errors = [ ]; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * EntityEvent constructor. |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * @param EntityInterface $entity |
40 | 40 | * @param array $data |
41 | 41 | */ |
42 | - public function __construct($name, EntityInterface $entity = null, array $data = []) |
|
42 | + public function __construct($name, EntityInterface $entity = null, array $data = [ ]) |
|
43 | 43 | { |
44 | 44 | $this->name = $name; |
45 | 45 | $this->entity = $entity; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function getValidData() |
102 | 102 | { |
103 | 103 | if (!empty($this->errors)) { |
104 | - return []; |
|
104 | + return [ ]; |
|
105 | 105 | } |
106 | 106 | return $this->validData; |
107 | 107 | } |
@@ -27,18 +27,18 @@ |
||
27 | 27 | $namespaceParts = explode('\\', trim($namespace, "\\")); |
28 | 28 | |
29 | 29 | if (count($namespaceParts) > 1) { |
30 | - $entityName = $namespaceParts[1]; |
|
30 | + $entityName = $namespaceParts[ 1 ]; |
|
31 | 31 | } else { |
32 | - $entityName = $namespaceParts[0]; |
|
32 | + $entityName = $namespaceParts[ 0 ]; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $config = $serviceManager->get('Config'); |
36 | 36 | |
37 | - if (!isset($config['entity_map'])) { |
|
37 | + if (!isset($config[ 'entity_map' ])) { |
|
38 | 38 | throw new ServiceNotCreatedException("You must define |
39 | 39 | and configure $entityName in 'entity_map' config entry"); |
40 | 40 | } |
41 | 41 | |
42 | - return new Config($config['entity_map']); |
|
42 | + return new Config($config[ 'entity_map' ]); |
|
43 | 43 | } |
44 | 44 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $mapper = $serviceManager->get("$moduleName\\$entityName\\Infrastructure\\Mapper"); |
37 | 37 | $entityFactory = $serviceManager->get("$moduleName\\$entityName\\EntityFactory"); |
38 | 38 | } else { |
39 | - $entityName = $namespaceParts[0]; |
|
39 | + $entityName = $namespaceParts[ 0 ]; |
|
40 | 40 | /** @var Config $config */ |
41 | 41 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
42 | 42 | $criteriaFactory = $serviceManager->get("$entityName\\Infrastructure\\CriteriaFactory"); |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | $entityFactory = $serviceManager->get("$entityName\\EntityFactory"); |
45 | 45 | } |
46 | 46 | |
47 | - $features = []; |
|
47 | + $features = [ ]; |
|
48 | 48 | $tableSequence = $config->getSequence($entityName); |
49 | 49 | $tablePrimaryKey = $config->getPrimaryKey($entityName); |
50 | 50 | if (!empty($tableSequence) && !empty($tablePrimaryKey)) { |
51 | - $features[] = new SequenceFeature($tablePrimaryKey, $tableSequence); |
|
51 | + $features[ ] = new SequenceFeature($tablePrimaryKey, $tableSequence); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $dbAdapter = $serviceManager->get('Zend\Db\Adapter\Adapter'); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | list($moduleName, $entityName) = $namespaceParts; |
31 | 31 | $entityClass = "$moduleName\\$entityName\\$entityName"; |
32 | 32 | } else { |
33 | - $entityName = $namespaceParts[0]; |
|
33 | + $entityName = $namespaceParts[ 0 ]; |
|
34 | 34 | |
35 | 35 | /** @var Config $config */ |
36 | 36 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | list($moduleName, $entityName) = $namespaceParts; |
31 | 31 | $entityClass = "$moduleName\\$entityName\\$entityName"; |
32 | 32 | } else { |
33 | - $entityName = $namespaceParts[0]; |
|
33 | + $entityName = $namespaceParts[ 0 ]; |
|
34 | 34 | |
35 | 35 | /** @var Config $config */ |
36 | 36 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | list($moduleName, $entityName) = $namespaceParts; |
31 | 31 | $entityClass = "$moduleName\\$entityName\\$entityName"; |
32 | 32 | } else { |
33 | - $entityName = $namespaceParts[0]; |
|
33 | + $entityName = $namespaceParts[ 0 ]; |
|
34 | 34 | |
35 | 35 | /** @var Config $config */ |
36 | 36 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | list($moduleName, $entityName) = $namespaceParts; |
31 | 31 | $entityClass = "$moduleName\\$entityName\\$entityName"; |
32 | 32 | } else { |
33 | - $entityName = $namespaceParts[0]; |
|
33 | + $entityName = $namespaceParts[ 0 ]; |
|
34 | 34 | |
35 | 35 | /** @var Config $config */ |
36 | 36 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | list($moduleName, $entityName) = $namespaceParts; |
31 | 31 | $entityClass = "$moduleName\\$entityName\\$entityName"; |
32 | 32 | } else { |
33 | - $entityName = $namespaceParts[0]; |
|
33 | + $entityName = $namespaceParts[ 0 ]; |
|
34 | 34 | |
35 | 35 | /** @var Config $config */ |
36 | 36 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |