Passed
Push — master ( 7a5b9c...a3c1ba )
by Michael
06:08
created
src/Mapper/Definition/ConfigurationProcessor/AbstractProcessor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\ConfigurationProcessor;
5 5
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function createLink(string $name, array $data): Link
29 29
     {
30
-        if (! preg_match(self::RESOURCE_PATTERN, $data['resource'], $matches)) {
30
+        if (!preg_match(self::RESOURCE_PATTERN, $data['resource'], $matches)) {
31 31
             throw new \LogicException(sprintf('Invalid resource definition: "%s"', $data['resource']));
32 32
         }
33 33
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         foreach (['get', 'is'] as $prefix)
56 56
         {
57
-            $getter = $prefix . ucfirst($name);
57
+            $getter = $prefix.ucfirst($name);
58 58
 
59 59
             if ($reflection->hasMethod($getter) && $reflection->getMethod($getter)->isPublic()) {
60 60
                 return $getter;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         throw new \LogicException(sprintf(
65
-            'Getter-method for "%s" cannot be resolved automatically. ' .
65
+            'Getter-method for "%s" cannot be resolved automatically. '.
66 66
             'Probably there is no get%2$s() or is%2$s() method or it is not public.',
67 67
             $name, ucfirst($name)
68 68
         ));
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     protected function resolveSetter(\ReflectionClass $reflection, string $name)
79 79
     {
80
-        $setter = 'set' . ucfirst($name);
80
+        $setter = 'set'.ucfirst($name);
81 81
 
82 82
         if ($reflection->hasMethod($setter) && $reflection->getMethod($setter)->isPublic()) {
83 83
             return $setter;
Please login to merge, or discard this patch.
src/Mapper/Definition/ConfigurationProcessor/RelationshipProcessor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\ConfigurationProcessor;
5 5
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function process(array $config, Definition $definition)
20 20
     {
21
-        if (! isset($config['relationships'])) {
21
+        if (!isset($config['relationships'])) {
22 22
             return;
23 23
         }
24 24
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function handleLinks(array $data, Relationship $relationship)
70 70
     {
71
-        if (! isset($data['links'])) {
71
+        if (!isset($data['links'])) {
72 72
             return;
73 73
         }
74 74
 
Please login to merge, or discard this patch.
src/Mapper/Definition/ConfigurationProcessor/AttributeProcessor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\ConfigurationProcessor;
5 5
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function process(array $config, Definition $definition)
25 25
     {
26
-        if (! isset($config['attributes'])) {
26
+        if (!isset($config['attributes'])) {
27 27
             return;
28 28
         }
29 29
 
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
      */
95 95
     protected function processDataType(string $definition, Attribute $attribute)
96 96
     {
97
-        if (! preg_match(self::DATATYPE_PATTERN, $definition, $matches)) {
97
+        if (!preg_match(self::DATATYPE_PATTERN, $definition, $matches)) {
98 98
             throw new \LogicException(sprintf('Data-type definition "%s" is invalid.', $definition));
99 99
         }
100 100
 
101 101
         $attribute->setType($matches['type']);
102 102
 
103
-        if (! empty($matches['many'])) {
103
+        if (!empty($matches['many'])) {
104 104
             $attribute->setMany();
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/Mapper/Definition/ConfigurationProcessor/ClassProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\ConfigurationProcessor;
5 5
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             $definition->setType($config['type']);
22 22
         }
23 23
 
24
-        if (! isset($config['links'])) {
24
+        if (!isset($config['links'])) {
25 25
             return;
26 26
         }
27 27
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Relationship.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/DefinitionProviderInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Attribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Exception/DefinitionNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\Exception;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Exception/DefinitionProviderException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Mikemirten\Component\JsonApi\Mapper\Definition\Exception;
5 5
 
Please login to merge, or discard this patch.