Passed
Push — master ( b0030b...d4bf1b )
by Jakub
09:20
created
src/TAssertions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         return $this->taskCount;
52 52
     }
53 53
 
54
-    protected function showStringOrArray(string|array $variable): string
54
+    protected function showStringOrArray(string | array $variable): string
55 55
     {
56 56
         return (is_string($variable) ? $variable : "(array)");
57 57
     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     /**
153 153
      * Does $actual contain $needle?
154 154
      */
155
-    protected function assertContains(string|array $needle, string|array $actual): void
155
+    protected function assertContains(string | array $needle, string | array $actual): void
156 156
     {
157 157
         if (is_string($actual) && is_string($needle)) {
158 158
             $success = ($needle !== "" && str_contains($actual, $needle));
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     /**
174 174
      * Does $actual not contain $needle?
175 175
      */
176
-    protected function assertNotContains(string|array $needle, string|array $actual): void
176
+    protected function assertNotContains(string | array $needle, string | array $actual): void
177 177
     {
178 178
         if (is_string($actual) && is_string($needle)) {
179 179
             $success = ($needle === "" || !str_contains($actual, $needle));
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * Does $value contain $count items?
193 193
      */
194
-    protected function assertCount(int $count, string|array|\Countable $value): void
194
+    protected function assertCount(int $count, string | array | \Countable $value): void
195 195
     {
196 196
         if (!is_array($value) && !$value instanceof \Countable) {
197 197
             $this->testResult("The variable is not array or countable object.", false);
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     /**
207 207
      * Does $value not contain $count items?
208 208
      */
209
-    protected function assertNotCount(int $count, string|array|\Countable $value): void
209
+    protected function assertNotCount(int $count, string | array | \Countable $value): void
210 210
     {
211 211
         if (!is_array($value) && !$value instanceof \Countable) {
212 212
             $this->testResult("The variable is not array or countable object.", false);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     /**
222 222
      * Is $value of type $type?
223 223
      */
224
-    protected function assertType(string|object $type, mixed $value): void
224
+    protected function assertType(string | object $type, mixed $value): void
225 225
     {
226 226
         if (
227 227
             in_array($type, [
Please login to merge, or discard this patch.
src/TestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     /**
102 102
      * Get name for a job
103 103
      */
104
-    protected function getJobName(string|object $class, string $method): string
104
+    protected function getJobName(string | object $class, string $method): string
105 105
     {
106 106
         $annotation = $this->annotationsReader->getAnnotation(static::ANNOTATION_TEST, $class, $method);
107 107
         if ($annotation !== null) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             $this->tearDown();
150 150
         }
151 151
         $this->resetCounter();
152
-        return match ($job->result) {
152
+        return match($job->result) {
153 153
             Job::RESULT_PASSED => static::RESULT_PASSED,
154 154
             Job::RESULT_SKIPPED => static::RESULT_SKIPPED,
155 155
             Job::RESULT_FAILED => static::RESULT_FAILED,
Please login to merge, or discard this patch.
src/Job.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /** @var callable Task */
28 28
     protected $callback;
29 29
     protected array $params = [];
30
-    protected bool|string $skip;
30
+    protected bool | string $skip;
31 31
     protected string $result = self::RESULT_PASSED;
32 32
     protected string $output = "";
33 33
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         string $name,
36 36
         callable $callback,
37 37
         array $params = [],
38
-        bool|string $skip = false
38
+        bool | string $skip = false
39 39
     ) {
40 40
         $this->name = $name;
41 41
         $this->callback = $callback;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return $this->params;
59 59
     }
60 60
 
61
-    protected function getSkip(): bool|string
61
+    protected function getSkip(): bool | string
62 62
     {
63 63
         return $this->skip;
64 64
     }
Please login to merge, or discard this patch.