Passed
Push — master ( ff66a5...7b0bcd )
by Jakub
01:59
created
src/TAssertions.php 1 patch
Spacing   +8 added lines, -8 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
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * Is $actual greater than $expected?
94 94
      */
95
-    protected function assertGreaterThan(int|float $expected, int|float $actual): void
95
+    protected function assertGreaterThan(int | float $expected, int | float $actual): void
96 96
     {
97 97
         $success = ($actual > $expected);
98 98
         $message = ($success) ? "" : "$actual is not greater than $expected.";
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * Is $actual less than $expected?
104 104
      */
105
-    protected function assertLessThan(int|float $expected, int|float $actual): void
105
+    protected function assertLessThan(int | float $expected, int | float $actual): void
106 106
     {
107 107
         $success = ($actual < $expected);
108 108
         $message = ($success) ? "" : "$actual is not less than $expected.";
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     /**
173 173
      * Does $actual contain $needle?
174 174
      */
175
-    protected function assertContains(string|array $needle, string|array $actual): void
175
+    protected function assertContains(string | array $needle, string | array $actual): void
176 176
     {
177 177
         if (is_string($actual) && is_string($needle)) {
178 178
             $success = ($needle !== "" && str_contains($actual, $needle));
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     /**
194 194
      * Does $actual not contain $needle?
195 195
      */
196
-    protected function assertNotContains(string|array $needle, string|array $actual): void
196
+    protected function assertNotContains(string | array $needle, string | array $actual): void
197 197
     {
198 198
         if (is_string($actual) && is_string($needle)) {
199 199
             $success = ($needle === "" || !str_contains($actual, $needle));
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     /**
212 212
      * Does $value contain $count items?
213 213
      */
214
-    protected function assertCount(int $count, string|array|\Countable $value): void
214
+    protected function assertCount(int $count, string | array | \Countable $value): void
215 215
     {
216 216
         if (!is_array($value) && !$value instanceof \Countable) {
217 217
             $this->testResult("The variable is not array or countable object.", false);
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     /**
227 227
      * Does $value not contain $count items?
228 228
      */
229
-    protected function assertNotCount(int $count, string|array|\Countable $value): void
229
+    protected function assertNotCount(int $count, string | array | \Countable $value): void
230 230
     {
231 231
         if (!is_array($value) && !$value instanceof \Countable) {
232 232
             $this->testResult("The variable is not array or countable object.", false);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     /**
242 242
      * Is $value of type $type?
243 243
      */
244
-    protected function assertType(string|object $type, mixed $value): void
244
+    protected function assertType(string | object $type, mixed $value): void
245 245
     {
246 246
         if (
247 247
             in_array($type, [
Please login to merge, or discard this patch.