@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/src/Module.php'; |
|
3 | +require_once __DIR__.'/src/Module.php'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $mapper = $serviceManager->get("$moduleName\\$entityName\\Infrastructure\\Mapper"); |
38 | 38 | $entityFactory = $serviceManager->get("$moduleName\\$entityName\\EntityFactory"); |
39 | 39 | } else { |
40 | - $entityName = $namespaceParts[0]; |
|
40 | + $entityName = $namespaceParts[ 0 ]; |
|
41 | 41 | /** @var Config $config */ |
42 | 42 | $config = $serviceManager->get("$entityName\\Infrastructure\\Config"); |
43 | 43 | $repository = $serviceManager->get("$entityName\\Infrastructure\\Repository"); |
@@ -47,24 +47,24 @@ discard block |
||
47 | 47 | |
48 | 48 | $appConfig = $serviceManager->get('Config'); |
49 | 49 | |
50 | - if (!isset($appConfig['entity_map'])) { |
|
50 | + if (!isset($appConfig[ 'entity_map' ])) { |
|
51 | 51 | throw new ServiceNotCreatedException("You must define |
52 | 52 | and configure Comments\\Comment in 'entity_map' config entry"); |
53 | 53 | } |
54 | 54 | |
55 | - $relationsConfig = $appConfig['entity_map'][$entityName]['relations']; |
|
55 | + $relationsConfig = $appConfig[ 'entity_map' ][ $entityName ][ 'relations' ]; |
|
56 | 56 | |
57 | - $relatedRepository = []; |
|
57 | + $relatedRepository = [ ]; |
|
58 | 58 | foreach ($relationsConfig as $relatedEntity => $joinRule) { |
59 | - $repositoryClass = $relatedEntity . '\Infrastructure\Repository'; |
|
60 | - $relatedRepository[$relatedEntity] = $serviceManager->get($repositoryClass); |
|
59 | + $repositoryClass = $relatedEntity.'\Infrastructure\Repository'; |
|
60 | + $relatedRepository[ $relatedEntity ] = $serviceManager->get($repositoryClass); |
|
61 | 61 | } |
62 | 62 | |
63 | - $features = []; |
|
63 | + $features = [ ]; |
|
64 | 64 | $tableSequence = $config->getSequence($entityName); |
65 | 65 | $tablePrimaryKey = $config->getPrimaryKey($entityName); |
66 | 66 | if (!empty($tableSequence) && !empty($tablePrimaryKey)) { |
67 | - $features[] = new SequenceFeature($tablePrimaryKey, $tableSequence); |
|
67 | + $features[ ] = new SequenceFeature($tablePrimaryKey, $tableSequence); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $dbAdapter = $serviceManager->get('Zend\Db\Adapter\Adapter'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | public function getConfig($env = null) |
30 | 30 | { |
31 | - return include dirname(__DIR__) . '/config/module.config.php'; |
|
31 | + return include dirname(__DIR__).'/config/module.config.php'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getAutoloaderConfig() |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | return [ |
37 | 37 | 'Zend\Loader\StandardAutoloader' => [ |
38 | 38 | 'namespaces' => [ |
39 | - __NAMESPACE__ => dirname(__DIR__) . '/src', |
|
39 | + __NAMESPACE__ => dirname(__DIR__).'/src', |
|
40 | 40 | ], |
41 | 41 | ], |
42 | 42 | ]; |
@@ -19,8 +19,8 @@ |
||
19 | 19 | $entityEventManager = new EntityEventManager($eventManager); |
20 | 20 | |
21 | 21 | $entityParams = explode('\\', $requestedName); |
22 | - if (isset($entityParams[0])) { |
|
23 | - $eventManager->setIdentifiers($entityParams[0]); |
|
22 | + if (isset($entityParams[ 0 ])) { |
|
23 | + $eventManager->setIdentifiers($entityParams[ 0 ]); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | return $entityEventManager; |