Passed
Pull Request — master (#8)
by Alex
03:52
created
test/unit/Persistence/Event/Listener/DateCreatedListenerTest.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,6 @@
 block discarded – undo
188 188
 
189 189
     /**
190 190
      * Assert that DateTimeFactoryException's are caught and rethrown as PersistenceException in __invoke()
191
-
192 191
      * @throws PersistenceException
193 192
      */
194 193
     public function testDateTimeFactoryFailureWillBeLoggedAndRethrownAsAPersistenceException(): void
Please login to merge, or discard this patch.
test/unit/EntityRepositoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $entityId = 'FOO123';
125 125
 
126
-        $exceptionMessage = 'This is a test exception message for '  . __FUNCTION__;
126
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
127 127
         $exceptionCode = 123;
128 128
         $exception = new QueryServiceException($exceptionMessage, $exceptionCode);
129 129
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             'test'  => 123,
220 220
         ];
221 221
 
222
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
222
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
223 223
         $exceptionCode = 456;
224 224
 
225 225
         $exception = new QueryServiceException($exceptionMessage, $exceptionCode);
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $criteria = [];
354 354
         $options = [];
355 355
 
356
-        $exceptionMessage = 'This is a foo test exception for ' . __FUNCTION__;
356
+        $exceptionMessage = 'This is a foo test exception for '.__FUNCTION__;
357 357
         $exceptionCode = 456;
358 358
         $exception = new QueryServiceException($exceptionMessage, $exceptionCode);
359 359
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
             $this->createMock(EntityInterface::class),
590 590
         ];
591 591
 
592
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
592
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
593 593
         $exceptionCode = 123;
594 594
         $exception = new PersistenceException($exceptionMessage, $exceptionCode);
595 595
 
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
             $this->createMock(EntityInterface::class),
864 864
         ];
865 865
 
866
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
866
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
867 867
         $exceptionCode = 123;
868 868
         $exception = new PersistenceException($exceptionMessage, $exceptionCode);
869 869
 
Please login to merge, or discard this patch.
test/unit/Persistence/PersistServiceTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             ->method('hasId')
218 218
             ->willReturn(false);
219 219
 
220
-        $exceptionMessage = 'Test exception message for ' . __FUNCTION__;
220
+        $exceptionMessage = 'Test exception message for '.__FUNCTION__;
221 221
         $exceptionCode = 456;
222 222
         $exception = new \Exception($exceptionMessage, $exceptionCode);
223 223
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             ->with(EntityEventName::DELETE, $entity, $options)
329 329
             ->willReturn($event);
330 330
 
331
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
331
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
332 332
         $exceptionCode = 123;
333 333
         $exception = new \Exception($exceptionMessage, $exceptionCode);
334 334
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             ->with(EntityEventName::DELETE_COLLECTION, $collection, $options)
488 488
             ->willReturn($event);
489 489
 
490
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
490
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
491 491
         $exceptionCode = 999;
492 492
         $exception = new \Exception($exceptionMessage, $exceptionCode);
493 493
 
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
                 'The \'entity\' argument must be an object of type \'%s\'; \'%s\' provided in \'%s\'',
769 769
                 $this->entityName,
770 770
                 get_class($entity),
771
-                PersistService::class . '::refresh'
771
+                PersistService::class.'::refresh'
772 772
             )
773 773
         );
774 774
 
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
         /** @var EntityInterface&MockObject $entity */
793 793
         $entity = $this->createMock(EntityInterface::class);
794 794
 
795
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
795
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
796 796
         $exceptionCode = 987;
797 797
         $exception = new \Exception($exceptionMessage, $exceptionCode);
798 798
 
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
             $this->logger
872 872
         );
873 873
 
874
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
874
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
875 875
         $exceptionCode = 123;
876 876
         $exception = new \Exception($exceptionMessage, $exceptionCode);
877 877
 
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
             $this->logger
920 920
         );
921 921
 
922
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
922
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
923 923
         $exceptionCode = 123;
924 924
         $exception = new \Exception($exceptionMessage, $exceptionCode);
925 925
 
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
             $this->logger
968 968
         );
969 969
 
970
-        $exceptionMessage = 'This is a test exception message for ' . __FUNCTION__;
970
+        $exceptionMessage = 'This is a test exception message for '.__FUNCTION__;
971 971
         $exceptionCode = 123;
972 972
         $exception = new \Exception($exceptionMessage, $exceptionCode);
973 973
 
Please login to merge, or discard this patch.
src/Persistence/PersistService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
             $this->dispatchEvent($this->createErrorEvent(EntityEventName::DELETE_COLLECTION_ERROR, $e));
189 189
         }
190 190
 
191
-        return (int)$event->getParam('deleted_count', 0);
191
+        return (int) $event->getParam('deleted_count', 0);
192 192
     }
193 193
 
194 194
     /**
Please login to merge, or discard this patch.
src/Persistence/AbstractCascadeService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         ClassMetadata $sourceMetadata,
125 125
         ClassMetadata $targetMetadata
126 126
     ) {
127
-        $methodName = 'get' . ucfirst($fieldName);
127
+        $methodName = 'get'.ucfirst($fieldName);
128 128
 
129 129
         if (!method_exists($sourceEntity, $methodName)) {
130 130
             $errorMessage = sprintf(
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
              * Note that we are hard coding the '0' key as the single field the we use as the id/primary key.
175 175
              * If we implement EntityInterface correctly we will never have a composite key.
176 176
              */
177
-            return isset($mapping['joinColumns'][0]['nullable']) && (bool)$mapping['joinColumns'][0]['nullable'];
177
+            return isset($mapping['joinColumns'][0]['nullable']) && (bool) $mapping['joinColumns'][0]['nullable'];
178 178
         }
179 179
 
180 180
         return (is_iterable($entityOrCollection) || $entityOrCollection instanceof EntityInterface);
Please login to merge, or discard this patch.