@@ -250,7 +250,7 @@ |
||
250 | 250 | */ |
251 | 251 | public function __toString(): string |
252 | 252 | { |
253 | - return 'Error-object with ' . ( |
|
253 | + return 'Error-object with '.( |
|
254 | 254 | $this->id === null |
255 | 255 | ? 'no ID' |
256 | 256 | : sprintf('ID: "%s"', $this->id) |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | foreach ($definition->getParameters() as $name => $value) |
116 | 116 | { |
117 | - if (! preg_match('~@(?:(?<namespace>[a-z0-9_\.]+)\:)?(?<name>[a-z0-9_\.]+)~i', $value, $matches)) { |
|
117 | + if (!preg_match('~@(?:(?<namespace>[a-z0-9_\.]+)\:)?(?<name>[a-z0-9_\.]+)~i', $value, $matches)) { |
|
118 | 118 | $resolved[$name] = $value; |
119 | 119 | continue; |
120 | 120 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | continue; |
125 | 125 | } |
126 | 126 | |
127 | - if (! isset($scope[$matches['namespace']])) { |
|
127 | + if (!isset($scope[$matches['namespace']])) { |
|
128 | 128 | throw new \LogicException(sprintf('Object "%s" not found in the scope.', $matches['namespace'])); |
129 | 129 | } |
130 | 130 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
24 | - if (! $value instanceof \DateTimeInterface) { |
|
24 | + if (!$value instanceof \DateTimeInterface) { |
|
25 | 25 | $value = new \DateTimeImmutable((string) $value); |
26 | 26 | } |
27 | 27 |
@@ -81,8 +81,7 @@ |
||
81 | 81 | |
82 | 82 | try { |
83 | 83 | $response = $this->client->request($request); |
84 | - } |
|
85 | - catch (\Throwable $exception) { |
|
84 | + } catch (\Throwable $exception) { |
|
86 | 85 | $exceptionEvent = new ExceptionEvent($request, $exception); |
87 | 86 | $this->dispatcher->dispatch($this->exceptionEvent, $exceptionEvent); |
88 | 87 |
@@ -86,13 +86,13 @@ |
||
86 | 86 | $exceptionEvent = new ExceptionEvent($request, $exception); |
87 | 87 | $this->dispatcher->dispatch($this->exceptionEvent, $exceptionEvent); |
88 | 88 | |
89 | - if (! $exceptionEvent->hasResponse()) { |
|
89 | + if (!$exceptionEvent->hasResponse()) { |
|
90 | 90 | throw $this->handleException($exception, $request); |
91 | 91 | } |
92 | 92 | |
93 | 93 | $response = $exceptionEvent->getResponse(); |
94 | 94 | |
95 | - if (! $exceptionEvent->isResponseEventEnabled()) { |
|
95 | + if (!$exceptionEvent->isResponseEventEnabled()) { |
|
96 | 96 | return $response; |
97 | 97 | } |
98 | 98 | } |
@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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()) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | foreach ($options as $option => $value) |
63 | 63 | { |
64 | - if (! in_array($option, static::$possibleOptions, true)) { |
|
64 | + if (!in_array($option, static::$possibleOptions, true)) { |
|
65 | 65 | throw new InvalidOptionException($option, static::$possibleOptions); |
66 | 66 | } |
67 | 67 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $decoded = json_decode($content); |
155 | 155 | |
156 | 156 | if (json_last_error() !== JSON_ERROR_NONE) { |
157 | - throw new \RuntimeException('Decoding error: "' . json_last_error_msg() . '""'); |
|
157 | + throw new \RuntimeException('Decoding error: "'.json_last_error_msg().'""'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | return $this->hydrator->hydrate($decoded); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $encoded = json_encode($document->toArray()); |
172 | 172 | |
173 | 173 | if (json_last_error() !== JSON_ERROR_NONE) { |
174 | - throw new \RuntimeException('Encoding error: "' . json_last_error_msg() . '""'); |
|
174 | + throw new \RuntimeException('Encoding error: "'.json_last_error_msg().'""'); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | $stream = fopen('php://memory', 'r+'); |
@@ -88,8 +88,7 @@ |
||
88 | 88 | |
89 | 89 | try { |
90 | 90 | $response = $this->client->request($request); |
91 | - } |
|
92 | - catch (ResponseException $exception) { |
|
91 | + } catch (ResponseException $exception) { |
|
93 | 92 | if ($this->returnBadResponse) { |
94 | 93 | $response = $exception->getResponse(); |
95 | 94 | return $this->handleResponse($response); |
@@ -41,8 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | try { |
43 | 43 | return $this->client->send($request); |
44 | - } |
|
45 | - catch (GuzzleRequestException $exception) { |
|
44 | + } catch (GuzzleRequestException $exception) { |
|
46 | 45 | throw $this->createException($exception); |
47 | 46 | } |
48 | 47 | } |
@@ -55,13 +55,13 @@ |
||
55 | 55 | $type = gettype($value); |
56 | 56 | |
57 | 57 | if ($type === 'object') { |
58 | - return 'an instance of ' . get_class($value); |
|
58 | + return 'an instance of '.get_class($value); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | if ($type === 'integer') { |
62 | 62 | return 'an integer'; |
63 | 63 | } |
64 | 64 | |
65 | - return 'a ' . $type; |
|
65 | + return 'a '.$type; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $value = $object->$getter(); |
58 | 58 | |
59 | - if ($value === null && ! $definition->getProcessNull()) { |
|
59 | + if ($value === null && !$definition->getProcessNull()) { |
|
60 | 60 | return; |
61 | 61 | } |
62 | 62 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | foreach ($definitions as $definition) |
76 | 76 | { |
77 | - if (! $definition->hasSetter()) { |
|
77 | + if (!$definition->hasSetter()) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | { |
94 | 94 | $name = $definition->getName(); |
95 | 95 | |
96 | - if (! $resource->hasAttribute($name)) { |
|
96 | + if (!$resource->hasAttribute($name)) { |
|
97 | 97 | return; |
98 | 98 | } |
99 | 99 | |
100 | 100 | $value = $resource->getAttribute($name); |
101 | 101 | |
102 | - if ($value === null && ! $definition->getProcessNull()) { |
|
102 | + if ($value === null && !$definition->getProcessNull()) { |
|
103 | 103 | return; |
104 | 104 | } |
105 | 105 |