Completed
Push — master ( b72433...10ced4 )
by Julián
02:22
created
src/AbstractManagerBuilder.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
         $annotationFiles = (array) $this->getOption('annotation_files');
220 220
         array_walk(
221 221
             $annotationFiles,
222
-            function ($file) {
223
-                if (!file_exists($file)) {
222
+            function($file) {
223
+                if ( ! file_exists($file)) {
224 224
                     throw new \RuntimeException(sprintf('"%s" file does not exist', $file));
225 225
                 }
226 226
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $annotationLoaders = (array) $this->getOption('annotation_autoloaders');
234 234
         array_walk(
235 235
             $annotationLoaders,
236
-            function ($autoLoader) {
236
+            function($autoLoader) {
237 237
                 AnnotationRegistry::registerLoader($autoLoader);
238 238
             }
239 239
         );
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
         return array_filter(
252 252
             $namespaces,
253
-            function ($namespace) {
253
+            function($namespace) {
254 254
                 return is_string($namespace);
255 255
             },
256 256
             ARRAY_FILTER_USE_KEY
@@ -267,15 +267,15 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function getMetadataMappingDriver()
269 269
     {
270
-        if (!$this->mappingDriver instanceof MappingDriverChain) {
270
+        if ( ! $this->mappingDriver instanceof MappingDriverChain) {
271 271
             $metadataDriver = new MappingDriverChain;
272 272
 
273 273
             foreach ((array) $this->getOption('metadata_mapping') as $metadataMapping) {
274
-                if (!is_array($metadataMapping)) {
274
+                if ( ! is_array($metadataMapping)) {
275 275
                     $metadataMapping = ['driver' => $metadataMapping];
276 276
                 }
277 277
 
278
-                if (!array_key_exists('namespace', $metadataMapping) && $metadataDriver->getDefaultDriver() !== null) {
278
+                if ( ! array_key_exists('namespace', $metadataMapping) && $metadataDriver->getDefaultDriver() !== null) {
279 279
                     throw new \RuntimeException(
280 280
                         'Only one default metadata mapping driver allowed, a namespace must be defined'
281 281
                     );
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         if (array_key_exists('driver', $metadataMapping)) {
315 315
             $mappingDriver = $metadataMapping['driver'];
316 316
 
317
-            if (!$mappingDriver instanceof MappingDriver) {
317
+            if ( ! $mappingDriver instanceof MappingDriver) {
318 318
                 throw new \UnexpectedValueException(
319 319
                     sprintf('Provided driver should be of the type MappingDriver, "%s" given', gettype($mappingDriver))
320 320
                 );
@@ -435,10 +435,10 @@  discard block
 block discarded – undo
435 435
      */
436 436
     public function getMetadataCacheDriver()
437 437
     {
438
-        if (!$this->metadataCacheDriver instanceof CacheProvider) {
438
+        if ( ! $this->metadataCacheDriver instanceof CacheProvider) {
439 439
             $metadataCacheDriver = $this->getOption('metadata_cache_driver');
440 440
 
441
-            if (!$metadataCacheDriver instanceof CacheProvider) {
441
+            if ( ! $metadataCacheDriver instanceof CacheProvider) {
442 442
                 $metadataCacheDriver = $this->createNewCacheDriver();
443 443
             }
444 444
 
@@ -510,10 +510,10 @@  discard block
 block discarded – undo
510 510
      */
511 511
     public function getEventManager()
512 512
     {
513
-        if (!$this->eventManager instanceof EventManager) {
513
+        if ( ! $this->eventManager instanceof EventManager) {
514 514
             $eventManager = $this->getOption('event_manager');
515 515
 
516
-            if (!$eventManager instanceof EventManager) {
516
+            if ( ! $eventManager instanceof EventManager) {
517 517
                 $eventManager = new EventManager;
518 518
             }
519 519
 
Please login to merge, or discard this patch.
src/CouchDB/DocumentManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/RelationalBuilder.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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())
Please login to merge, or discard this patch.
src/MongoDBBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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())
Please login to merge, or discard this patch.
src/CouchDBBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 RepositoryFactory) {
161
+        if ( ! $repositoryFactory instanceof RepositoryFactory) {
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
 block discarded – undo
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())
Please login to merge, or discard this patch.