77use GraphAware \Bolt \Driver as BoltDriver ;
88use GraphAware \Neo4j \Client \ClientInterface ;
99use GraphAware \Neo4j \Client \Connection \Connection ;
10- use GraphAware \Neo4j \OGM \EntityManager ;
1110use GraphAware \Neo4j \Client \HttpDriver \Driver as HttpDriver ;
11+ use GraphAware \Neo4j \OGM \EntityManager ;
1212use GraphAware \Neo4j \OGM \EntityManagerInterface ;
1313use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
1414use Symfony \Component \Config \FileLocator ;
@@ -75,9 +75,6 @@ public function getAlias(): string
7575 }
7676
7777 /**
78- * @param array $config
79- * @param ContainerBuilder $container
80- *
8178 * @return array with service ids
8279 */
8380 private function handleClients (array &$ config , ContainerBuilder $ container ): array
@@ -93,11 +90,7 @@ private function handleClients(array &$config, ContainerBuilder $container): arr
9390 $ serviceIds [$ name ] = $ serviceId = sprintf ('neo4j.client.%s ' , $ name );
9491 foreach ($ data ['connections ' ] as $ connectionName ) {
9592 if (empty ($ config ['connections ' ][$ connectionName ])) {
96- throw new InvalidConfigurationException (sprintf (
97- 'Client "%s" is configured to use connection named "%s" but there is no such connection ' ,
98- $ name ,
99- $ connectionName
100- ));
93+ throw new InvalidConfigurationException (sprintf ('Client "%s" is configured to use connection named "%s" but there is no such connection ' , $ name , $ connectionName ));
10194 }
10295 $ connections [] = $ connectionName ;
10396 }
@@ -117,25 +110,14 @@ private function handleClients(array &$config, ContainerBuilder $container): arr
117110 return $ serviceIds ;
118111 }
119112
120- /**
121- * @param array $config
122- * @param ContainerBuilder $container
123- * @param array $clientServiceIds
124- *
125- * @return array
126- */
127113 private function handleEntityManagers (array &$ config , ContainerBuilder $ container , array $ clientServiceIds ): array
128114 {
129115 $ serviceIds = [];
130116 foreach ($ config ['entity_managers ' ] as $ name => $ data ) {
131117 $ serviceIds [] = $ serviceId = sprintf ('neo4j.entity_manager.%s ' , $ name );
132118 $ clientName = $ data ['client ' ];
133119 if (empty ($ clientServiceIds [$ clientName ])) {
134- throw new InvalidConfigurationException (sprintf (
135- 'EntityManager "%s" is configured to use client named "%s" but there is no such client ' ,
136- $ name ,
137- $ clientName
138- ));
120+ throw new InvalidConfigurationException (sprintf ('EntityManager "%s" is configured to use client named "%s" but there is no such client ' , $ name , $ clientName ));
139121 }
140122
141123 $ definition = class_exists (ChildDefinition::class)
@@ -154,9 +136,6 @@ private function handleEntityManagers(array &$config, ContainerBuilder $containe
154136 }
155137
156138 /**
157- * @param array $config
158- * @param ContainerBuilder $container
159- *
160139 * @return array with service ids
161140 */
162141 private function handleConnections (array &$ config , ContainerBuilder $ container ): array
@@ -191,10 +170,6 @@ private function handleConnections(array &$config, ContainerBuilder $container):
191170
192171 /**
193172 * Get URL form config.
194- *
195- * @param array $config
196- *
197- * @return string
198173 */
199174 private function getUrl (array $ config ): string
200175 {
@@ -215,8 +190,6 @@ private function getUrl(array $config): string
215190 /**
216191 * Return the correct default port if not manually set.
217192 *
218- * @param array $config
219- *
220193 * @return int
221194 */
222195 private function getPort (array $ config )
@@ -246,9 +219,7 @@ private function validateEntityManagers(array &$config): bool
246219 // Add default entity manager if none set.
247220 $ config ['entity_managers ' ]['default ' ] = ['client ' => 'default ' ];
248221 } elseif (!$ dependenciesInstalled && $ entityManagersConfigured ) {
249- throw new \LogicException (
250- 'You need to install "graphaware/neo4j-php-ogm" to be able to use the EntityManager '
251- );
222+ throw new \LogicException ('You need to install "graphaware/neo4j-php-ogm" to be able to use the EntityManager ' );
252223 }
253224
254225 return $ dependenciesInstalled ;
0 commit comments