Passed
Pull Request — master (#1434)
by Marcin
20:07 queued 08:20
created
src/EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $validator = $this->validator;
54 54
         $groups = $context->hasAttribute('validation_groups') ? $context->getAttribute('validation_groups') : null;
55 55
 
56
-        if (!$groups) {
56
+        if ( ! $groups) {
57 57
             return;
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/Visitor/Factory/XmlDeserializationVisitorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     public function enableExternalEntities(bool $enable = true): self
42 42
     {
43
-        $this->disableExternalEntities = !$enable;
43
+        $this->disableExternalEntities = ! $enable;
44 44
         return $this;
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/Builder/CallbackDriverFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function createDriver(array $metadataDirs, Reader $reader): DriverInterface
24 24
     {
25 25
         $driver = \call_user_func($this->callback, $metadataDirs, $reader);
26
-        if (!$driver instanceof DriverInterface) {
26
+        if ( ! $driver instanceof DriverInterface) {
27 27
             throw new LogicException('The callback must return an instance of DriverInterface.');
28 28
         }
29 29
 
Please login to merge, or discard this patch.
src/Ordering/CustomPropertyOrderingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,19 +40,19 @@
 block discarded – undo
40 40
     {
41 41
         $currentSorting = $properties ? array_combine(array_keys($properties), range(1, \count($properties))) : [];
42 42
 
43
-        uksort($properties, function ($a, $b) use ($currentSorting) {
43
+        uksort($properties, function($a, $b) use ($currentSorting) {
44 44
             $existsA = isset($this->ordering[$a]);
45 45
             $existsB = isset($this->ordering[$b]);
46 46
 
47
-            if (!$existsA && !$existsB) {
47
+            if ( ! $existsA && ! $existsB) {
48 48
                 return $currentSorting[$a] - $currentSorting[$b];
49 49
             }
50 50
 
51
-            if (!$existsA) {
51
+            if ( ! $existsA) {
52 52
                 return 1;
53 53
             }
54 54
 
55
-            if (!$existsB) {
55
+            if ( ! $existsB) {
56 56
                 return -1;
57 57
             }
58 58
 
Please login to merge, or discard this patch.
src/Handler/ConstraintViolationHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                     'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION,
27 27
                     'type' => $type,
28 28
                     'format' => $format,
29
-                    'method' => $method . 'To' . $format,
29
+                    'method' => $method.'To'.$format,
30 30
                 ];
31 31
             }
32 32
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function serializeListToXml(XmlSerializationVisitor $visitor, ConstraintViolationList $list, array $type): void
38 38
     {
39 39
         $currentNode = $visitor->getCurrentNode();
40
-        if (!$currentNode) {
40
+        if ( ! $currentNode) {
41 41
             $visitor->createRoot();
42 42
         }
43 43
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $violationNode = $visitor->getDocument()->createElement('violation');
57 57
 
58 58
         $parent = $visitor->getCurrentNode();
59
-        if (!$parent) {
59
+        if ( ! $parent) {
60 60
             $visitor->setCurrentAndRootNode($violationNode);
61 61
         } else {
62 62
             $parent->appendChild($violationNode);
Please login to merge, or discard this patch.
src/Ordering/AlphabeticalPropertyOrderingStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         uasort(
17 17
             $properties,
18
-            static function (PropertyMetadata $a, PropertyMetadata $b): int {
18
+            static function(PropertyMetadata $a, PropertyMetadata $b): int {
19 19
                 return strcmp($a->name, $b->name);
20 20
             }
21 21
         );
Please login to merge, or discard this patch.
src/EventDispatcher/LazyEventDispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function __construct($container)
22 22
     {
23
-        if (!$container instanceof PsrContainerInterface && !$container instanceof ContainerInterface) {
23
+        if ( ! $container instanceof PsrContainerInterface && ! $container instanceof ContainerInterface) {
24 24
             throw new InvalidArgumentException(sprintf('The container must be an instance of %s or %s (%s given).', PsrContainerInterface::class, ContainerInterface::class, \is_object($container) ? \get_class($container) : \gettype($container)));
25 25
         }
26 26
 
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         $listeners = parent::initializeListeners($eventName, $loweredClass, $format);
36 36
 
37 37
         foreach ($listeners as &$listener) {
38
-            if (!\is_array($listener[0]) || !\is_string($listener[0][0])) {
38
+            if ( ! \is_array($listener[0]) || ! \is_string($listener[0][0])) {
39 39
                 continue;
40 40
             }
41 41
 
42
-            if (!$this->container->has($listener[0][0])) {
42
+            if ( ! $this->container->has($listener[0][0])) {
43 43
                 continue;
44 44
             }
45 45
 
Please login to merge, or discard this patch.
src/Handler/HandlerRegistry.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 
24 24
         switch ($direction) {
25 25
             case GraphNavigatorInterface::DIRECTION_DESERIALIZATION:
26
-                return 'deserialize' . $type . 'From' . $format;
26
+                return 'deserialize'.$type.'From'.$format;
27 27
 
28 28
             case GraphNavigatorInterface::DIRECTION_SERIALIZATION:
29
-                return 'serialize' . $type . 'To' . $format;
29
+                return 'serialize'.$type.'To'.$format;
30 30
 
31 31
             default:
32 32
                 throw new LogicException(sprintf('The direction %s does not exist; see GraphNavigatorInterface::DIRECTION_??? constants.', json_encode($direction)));
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function registerSubscribingHandler(SubscribingHandlerInterface $handler): void
42 42
     {
43 43
         foreach ($handler->getSubscribingMethods() as $methodData) {
44
-            if (!isset($methodData['type'], $methodData['format'])) {
44
+            if ( ! isset($methodData['type'], $methodData['format'])) {
45 45
                 throw new RuntimeException(sprintf('For each subscribing method a "type" and "format" attribute must be given, but only got "%s" for %s.', implode('" and "', array_keys($methodData)), \get_class($handler)));
46 46
             }
47 47
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getHandler(int $direction, string $typeName, string $format)
72 72
     {
73
-        if (!isset($this->handlers[$direction][$typeName][$format])) {
73
+        if ( ! isset($this->handlers[$direction][$typeName][$format])) {
74 74
             return null;
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/Handler/LazyHandlerRegistry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function __construct($container, array $handlers = [])
28 28
     {
29
-        if (!$container instanceof PsrContainerInterface && !$container instanceof ContainerInterface) {
29
+        if ( ! $container instanceof PsrContainerInterface && ! $container instanceof ContainerInterface) {
30 30
             throw new InvalidArgumentException(sprintf('The container must be an instance of %s or %s (%s given).', PsrContainerInterface::class, ContainerInterface::class, \is_object($container) ? \get_class($container) : \gettype($container)));
31 31
         }
32 32
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             return $this->initializedHandlers[$direction][$typeName][$format];
53 53
         }
54 54
 
55
-        if (!isset($this->handlers[$direction][$typeName][$format])) {
55
+        if ( ! isset($this->handlers[$direction][$typeName][$format])) {
56 56
             return null;
57 57
         }
58 58
 
Please login to merge, or discard this patch.