Passed
Push — master ( 7a5b9c...a3c1ba )
by Michael
06:08
created
src/Mapper/Definition/CachedProvider.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;
5 5
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getDefinition(string $class): Definition
56 56
     {
57
-        if (! isset($this->definitions[$class])) {
57
+        if (!isset($this->definitions[$class])) {
58 58
             $this->definitions[$class] = $this->provideDefinition($class);
59 59
         }
60 60
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function provideDefinition(string $class): Definition
71 71
     {
72
-        $key  = self::PREFIX . md5($class);
72
+        $key  = self::PREFIX.md5($class);
73 73
         $item = $this->cache->getItem($key);
74 74
 
75 75
         if ($item->isHit()) {
Please login to merge, or discard this patch.
src/Mapper/Definition/Behaviour/LinksAwareInterface.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\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Behaviour/LinksContainer.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\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Mapper/Definition/AnnotationDefinitionProvider.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;
5 5
 use Mikemirten\Component\JsonApi\Mapper\Definition\AnnotationProcessor\AnnotationProcessorInterface;
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function getDefinition(string $class): Definition
42 42
     {
43
-        if (! isset($this->definitionCache[$class])) {
43
+        if (!isset($this->definitionCache[$class])) {
44 44
             $reflection = new \ReflectionClass($class);
45 45
 
46 46
             $this->definitionCache[$class] = $this->createDefinition($reflection);
Please login to merge, or discard this patch.
src/Mapper/Definition/YamlDefinitionProvider.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;
5 5
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function getDefinition(string $class): Definition
112 112
     {
113
-        if (! isset($this->definitionCache[$class])) {
113
+        if (!isset($this->definitionCache[$class])) {
114 114
             $this->definitionCache[$class] = $this->createDefinition($class);
115 115
         }
116 116
 
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
      */
126 126
     protected function createDefinition(string $class): Definition
127 127
     {
128
-        $path = $this->basePath . DIRECTORY_SEPARATOR . str_replace('\\', '.', $class) . '.yml';
128
+        $path = $this->basePath.DIRECTORY_SEPARATOR.str_replace('\\', '.', $class).'.yml';
129 129
 
130
-        if (! is_file($path)) {
130
+        if (!is_file($path)) {
131 131
             throw new DefinitionNotFoundException($class);
132 132
         }
133 133
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     protected function readConfig(string $path): array
152 152
     {
153
-        if (! is_readable($path)) {
153
+        if (!is_readable($path)) {
154 154
             throw new DefinitionProviderException(sprintf('File "%s" with definition is not readable.', $path));
155 155
         }
156 156
 
Please login to merge, or discard this patch.
src/Mapper/Definition/Definition.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.
Definition/ConfigurationProcessor/ConfigurationProcessorInterface.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\ConfigurationProcessor;
5 5
 
Please login to merge, or discard this patch.
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.