@@ -82,7 +82,7 @@ |
||
| 82 | 82 | { |
| 83 | 83 | $reflectionClass = new \ReflectionClass($className); |
| 84 | 84 | |
| 85 | - if (!$reflectionClass->implementsInterface(ObjectRepository::class)) { |
|
| 85 | + if ( ! $reflectionClass->implementsInterface(ObjectRepository::class)) { |
|
| 86 | 86 | throw new \InvalidArgumentException(sprintf( |
| 87 | 87 | 'Invalid repository class "%s". It must be a Doctrine\Common\Persistence\ObjectRepository.', |
| 88 | 88 | $className |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $this->wipe(); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - if (!$this->manager instanceof EntityManager) { |
|
| 113 | + if ( ! $this->manager instanceof EntityManager) { |
|
| 114 | 114 | $this->manager = $this->buildManager(); |
| 115 | 115 | } |
| 116 | 116 | |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | protected function getRepositoryFactory() |
| 220 | 220 | { |
| 221 | - if (!array_key_exists('repository_factory', $this->options)) { |
|
| 221 | + if ( ! array_key_exists('repository_factory', $this->options)) { |
|
| 222 | 222 | return; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | $repositoryFactory = $this->options['repository_factory']; |
| 226 | 226 | |
| 227 | - if (!$repositoryFactory instanceof RepositoryFactory) { |
|
| 227 | + if ( ! $repositoryFactory instanceof RepositoryFactory) { |
|
| 228 | 228 | throw new \InvalidArgumentException(sprintf( |
| 229 | 229 | 'Invalid factory class "%s". It must be a Doctrine\ORM\Repository\RepositoryFactory.', |
| 230 | 230 | get_class($repositoryFactory) |
@@ -243,11 +243,11 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | public function getQueryCacheDriver() |
| 245 | 245 | { |
| 246 | - if (!$this->queryCacheDriver instanceof CacheProvider) { |
|
| 246 | + if ( ! $this->queryCacheDriver instanceof CacheProvider) { |
|
| 247 | 247 | $queryCacheDriver = $this->getOption('query_cache_driver'); |
| 248 | 248 | $cacheNamespace = (string) $this->getOption('query_cache_namespace'); |
| 249 | 249 | |
| 250 | - if (!$queryCacheDriver instanceof CacheProvider) { |
|
| 250 | + if ( ! $queryCacheDriver instanceof CacheProvider) { |
|
| 251 | 251 | $queryCacheDriver = clone $this->getMetadataCacheDriver(); |
| 252 | 252 | $queryCacheDriver->setNamespace($cacheNamespace); |
| 253 | 253 | } |
@@ -281,11 +281,11 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | public function getResultCacheDriver() |
| 283 | 283 | { |
| 284 | - if (!$this->resultCacheDriver instanceof CacheProvider) { |
|
| 284 | + if ( ! $this->resultCacheDriver instanceof CacheProvider) { |
|
| 285 | 285 | $resultCacheDriver = $this->getOption('result_cache_driver'); |
| 286 | 286 | $cacheNamespace = (string) $this->getOption('result_cache_namespace'); |
| 287 | 287 | |
| 288 | - if (!$resultCacheDriver instanceof CacheProvider) { |
|
| 288 | + if ( ! $resultCacheDriver instanceof CacheProvider) { |
|
| 289 | 289 | $resultCacheDriver = clone $this->getMetadataCacheDriver(); |
| 290 | 290 | $resultCacheDriver->setNamespace($cacheNamespace); |
| 291 | 291 | } |
@@ -317,10 +317,10 @@ discard block |
||
| 317 | 317 | */ |
| 318 | 318 | protected function getNamingStrategy() |
| 319 | 319 | { |
| 320 | - if (!$this->namingStrategy instanceof NamingStrategy) { |
|
| 320 | + if ( ! $this->namingStrategy instanceof NamingStrategy) { |
|
| 321 | 321 | $namingStrategy = $this->getOption('naming_strategy'); |
| 322 | 322 | |
| 323 | - if (!$namingStrategy instanceof NamingStrategy) { |
|
| 323 | + if ( ! $namingStrategy instanceof NamingStrategy) { |
|
| 324 | 324 | $namingStrategy = new UnderscoreNamingStrategy(CASE_LOWER); |
| 325 | 325 | } |
| 326 | 326 | |
@@ -339,10 +339,10 @@ discard block |
||
| 339 | 339 | */ |
| 340 | 340 | protected function getQuoteStrategy() |
| 341 | 341 | { |
| 342 | - if (!$this->quoteStrategy instanceof QuoteStrategy) { |
|
| 342 | + if ( ! $this->quoteStrategy instanceof QuoteStrategy) { |
|
| 343 | 343 | $quoteStrategy = $this->getOption('quote_strategy'); |
| 344 | 344 | |
| 345 | - if (!$quoteStrategy instanceof QuoteStrategy) { |
|
| 345 | + if ( ! $quoteStrategy instanceof QuoteStrategy) { |
|
| 346 | 346 | $quoteStrategy = new DefaultQuoteStrategy; |
| 347 | 347 | } |
| 348 | 348 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | */ |
| 360 | 360 | protected function getSQLLogger() |
| 361 | 361 | { |
| 362 | - if (!$this->SQLLogger instanceof SQLLogger) { |
|
| 362 | + if ( ! $this->SQLLogger instanceof SQLLogger) { |
|
| 363 | 363 | $sqlLogger = $this->getOption('sql_logger'); |
| 364 | 364 | |
| 365 | 365 | if ($sqlLogger instanceof SQLLogger) { |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | return array_filter( |
| 383 | 383 | $functions, |
| 384 | - function ($name) { |
|
| 384 | + function($name) { |
|
| 385 | 385 | return is_string($name); |
| 386 | 386 | }, |
| 387 | 387 | ARRAY_FILTER_USE_KEY |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | |
| 400 | 400 | return array_filter( |
| 401 | 401 | $functions, |
| 402 | - function ($name) { |
|
| 402 | + function($name) { |
|
| 403 | 403 | return is_string($name); |
| 404 | 404 | }, |
| 405 | 405 | ARRAY_FILTER_USE_KEY |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | return array_filter( |
| 419 | 419 | $functions, |
| 420 | - function ($name) { |
|
| 420 | + function($name) { |
|
| 421 | 421 | return is_string($name); |
| 422 | 422 | }, |
| 423 | 423 | ARRAY_FILTER_USE_KEY |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | return array_filter( |
| 437 | 437 | $types, |
| 438 | - function ($name) { |
|
| 438 | + function($name) { |
|
| 439 | 439 | return is_string($name); |
| 440 | 440 | }, |
| 441 | 441 | ARRAY_FILTER_USE_KEY |
@@ -484,9 +484,9 @@ discard block |
||
| 484 | 484 | |
| 485 | 485 | if ($commandPrefix !== '') { |
| 486 | 486 | $commands = array_map( |
| 487 | - function (Command $command) use ($commandPrefix) { |
|
| 487 | + function(Command $command) use ($commandPrefix) { |
|
| 488 | 488 | $commandNames = array_map( |
| 489 | - function ($commandName) use ($commandPrefix) { |
|
| 489 | + function($commandName) use ($commandPrefix) { |
|
| 490 | 490 | return preg_replace('/^(dbal|orm):/', $commandPrefix . ':$1:', $commandName); |
| 491 | 491 | }, |
| 492 | 492 | array_merge([$command->getName()], $command->getAliases()) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $this->wipe(); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if (!$this->manager instanceof DocumentManager) { |
|
| 80 | + if ( ! $this->manager instanceof DocumentManager) { |
|
| 81 | 81 | $this->manager = $this->buildManager(); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -217,13 +217,13 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | protected function getRepositoryFactory() |
| 219 | 219 | { |
| 220 | - if (!array_key_exists('repository_factory', $this->options)) { |
|
| 220 | + if ( ! array_key_exists('repository_factory', $this->options)) { |
|
| 221 | 221 | return; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | $repositoryFactory = $this->options['repository_factory']; |
| 225 | 225 | |
| 226 | - if (!$repositoryFactory instanceof RepositoryFactory) { |
|
| 226 | + if ( ! $repositoryFactory instanceof RepositoryFactory) { |
|
| 227 | 227 | throw new \InvalidArgumentException(sprintf( |
| 228 | 228 | 'Invalid factory class "%s". It must be a Doctrine\ODM\MongoDB\Repository\RepositoryFactory.', |
| 229 | 229 | get_class($repositoryFactory) |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | protected function getLoggerCallable() |
| 316 | 316 | { |
| 317 | - if (!is_callable($this->loggerCallable)) { |
|
| 317 | + if ( ! is_callable($this->loggerCallable)) { |
|
| 318 | 318 | $loggerCallable = $this->getOption('logger_callable'); |
| 319 | 319 | |
| 320 | 320 | if (is_callable($loggerCallable)) { |
@@ -355,9 +355,9 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | if ($commandPrefix !== '') { |
| 357 | 357 | $commands = array_map( |
| 358 | - function (Command $command) use ($commandPrefix) { |
|
| 358 | + function(Command $command) use ($commandPrefix) { |
|
| 359 | 359 | $commandNames = array_map( |
| 360 | - function ($commandName) use ($commandPrefix) { |
|
| 360 | + function($commandName) use ($commandPrefix) { |
|
| 361 | 361 | return preg_replace('/^odm:/', $commandPrefix . ':odm:', $commandName); |
| 362 | 362 | }, |
| 363 | 363 | array_merge([$command->getName()], $command->getAliases()) |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->wipe(); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if (!$this->manager instanceof DocumentManager) { |
|
| 66 | + if ( ! $this->manager instanceof DocumentManager) { |
|
| 67 | 67 | $this->manager = $this->buildManager(); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -152,13 +152,13 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | protected function getRepositoryFactory() |
| 154 | 154 | { |
| 155 | - if (!array_key_exists('repository_factory', $this->options)) { |
|
| 155 | + if ( ! array_key_exists('repository_factory', $this->options)) { |
|
| 156 | 156 | return; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | $repositoryFactory = $this->options['repository_factory']; |
| 160 | 160 | |
| 161 | - if (!$repositoryFactory instanceof DefaultRepositoryFactory) { |
|
| 161 | + if ( ! $repositoryFactory instanceof DefaultRepositoryFactory) { |
|
| 162 | 162 | throw new \InvalidArgumentException(sprintf( |
| 163 | 163 | 'Invalid factory class "%s". It must be a Jgut\Doctrine\ManagerBuilder\CouchDB\RepositoryFactory.', |
| 164 | 164 | get_class($repositoryFactory) |
@@ -208,9 +208,9 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | if ($commandPrefix !== '') { |
| 210 | 210 | $commands = array_map( |
| 211 | - function (Command $command) use ($commandPrefix) { |
|
| 211 | + function(Command $command) use ($commandPrefix) { |
|
| 212 | 212 | $commandNames = array_map( |
| 213 | - function ($commandName) use ($commandPrefix) { |
|
| 213 | + function($commandName) use ($commandPrefix) { |
|
| 214 | 214 | return preg_replace('/^couchdb:/', $commandPrefix . ':', $commandName); |
| 215 | 215 | }, |
| 216 | 216 | array_merge([$command->getName()], $command->getAliases()) |