Passed
Push — master ( c773c1...043dd9 )
by Jakub
02:03
created
src/Annotations/PhpAttributesEngine.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * @throws ReflectionException
23 23
      */
24
-    public function hasAnnotation(string $name, string|object $class, string $method = null): bool
24
+    public function hasAnnotation(string $name, string | object $class, string $method = null): bool
25 25
     {
26 26
         return count($this->getReflection($class, $method)->getAttributes($this->getClassName($name))) > 0;
27 27
     }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * @throws ReflectionException
31 31
      */
32
-    public function getAnnotation(string $name, string|object $class, string $method = null): mixed
32
+    public function getAnnotation(string $name, string | object $class, string $method = null): mixed
33 33
     {
34 34
         $attributes = $this->getReflection($class, $method)->getAttributes($this->getClassName($name));
35 35
         if (count($attributes) === 0) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * @throws ReflectionException
50 50
      */
51
-    private function getReflection(string|object $class, string $method = null): ReflectionClass|ReflectionMethod
51
+    private function getReflection(string | object $class, string $method = null): ReflectionClass | ReflectionMethod
52 52
     {
53 53
         if ($method !== null) {
54 54
             $reflection = new ReflectionMethod(is_object($class) ? get_class($class) : $class, $method);
Please login to merge, or discard this patch.
src/TAssertions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         return $this->taskCount;
54 54
     }
55 55
 
56
-    protected function showStringOrArray(string|array $variable): string
56
+    protected function showStringOrArray(string | array $variable): string
57 57
     {
58 58
         return (is_string($variable) ? $variable : "(array)");
59 59
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     /**
163 163
      * Does $actual contain $needle?
164 164
      */
165
-    protected function assertContains(string|array $needle, string|array $actual): void
165
+    protected function assertContains(string | array $needle, string | array $actual): void
166 166
     {
167 167
         if (is_string($actual) && is_string($needle)) {
168 168
             $success = $this->isSuccess($needle !== "" && str_contains($actual, $needle));
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     /**
184 184
      * Does $actual not contain $needle?
185 185
      */
186
-    protected function assertNotContains(string|array $needle, string|array $actual): void
186
+    protected function assertNotContains(string | array $needle, string | array $actual): void
187 187
     {
188 188
         if (is_string($actual) && is_string($needle)) {
189 189
             $success = $this->isSuccess($needle === "" || !str_contains($actual, $needle));
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     /**
202 202
      * Does $value contain $count items?
203 203
      */
204
-    protected function assertCount(int $count, string|array|\Countable $value): void
204
+    protected function assertCount(int $count, string | array | \Countable $value): void
205 205
     {
206 206
         if (!is_array($value) && !$value instanceof \Countable) {
207 207
             $this->testResult("The variable is not array or countable object.", false);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     /**
217 217
      * Does $value not contain $count items?
218 218
      */
219
-    protected function assertNotCount(int $count, string|array|\Countable $value): void
219
+    protected function assertNotCount(int $count, string | array | \Countable $value): void
220 220
     {
221 221
         if (!is_array($value) && !$value instanceof \Countable) {
222 222
             $this->testResult("The variable is not array or countable object.", false);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     /**
232 232
      * Is $value of type $type?
233 233
      */
234
-    protected function assertType(string|object $type, mixed $value): void
234
+    protected function assertType(string | object $type, mixed $value): void
235 235
     {
236 236
         if (
237 237
             in_array($type, [
Please login to merge, or discard this patch.