Skip to content

Commit f97fd26

Browse files
authored
Format code
1 parent d51ed27 commit f97fd26

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

src/Concerns/ConditionallyLoadsAttributes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ protected function mergeData(array $data, int $index, array $merge, bool $numeri
7777
));
7878
}
7979

80-
return $this->removeMissingValues(array_slice($data, 0, $index, true) +
81-
$merge +
82-
$this->filter(array_slice($data, $index + 1, null, true)));
80+
return $this->removeMissingValues(array_slice($data, 0, $index, true)
81+
+ $merge
82+
+ $this->filter(array_slice($data, $index + 1, null, true)));
8383
}
8484

8585
/**

tests/HttpResponse.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ public function assertJsonFragment(array $data)
236236

237237
PHPUnit::assertTrue(
238238
Str::contains($actual, $expected),
239-
'Unable to find JSON fragment: ' . PHP_EOL . PHP_EOL .
240-
'[' . json_encode([$key => $value]) . ']' . PHP_EOL . PHP_EOL .
241-
'within' . PHP_EOL . PHP_EOL .
242-
"[{$actual}]."
239+
'Unable to find JSON fragment: ' . PHP_EOL . PHP_EOL
240+
. '[' . json_encode([$key => $value]) . ']' . PHP_EOL . PHP_EOL
241+
. 'within' . PHP_EOL . PHP_EOL
242+
. "[{$actual}]."
243243
);
244244
}
245245

@@ -267,10 +267,10 @@ public function assertJsonMissing(array $data, $exact = false)
267267

268268
PHPUnit::assertFalse(
269269
Str::contains($actual, $unexpected),
270-
'Found unexpected JSON fragment: ' . PHP_EOL . PHP_EOL .
271-
'[' . json_encode([$key => $value]) . ']' . PHP_EOL . PHP_EOL .
272-
'within' . PHP_EOL . PHP_EOL .
273-
"[{$actual}]."
270+
'Found unexpected JSON fragment: ' . PHP_EOL . PHP_EOL
271+
. '[' . json_encode([$key => $value]) . ']' . PHP_EOL . PHP_EOL
272+
. 'within' . PHP_EOL . PHP_EOL
273+
. "[{$actual}]."
274274
);
275275
}
276276

@@ -297,10 +297,10 @@ public function assertJsonMissingExact(array $data)
297297
}
298298

299299
PHPUnit::fail(
300-
'Found unexpected JSON fragment: ' . PHP_EOL . PHP_EOL .
301-
'[' . json_encode($data) . ']' . PHP_EOL . PHP_EOL .
302-
'within' . PHP_EOL . PHP_EOL .
303-
"[{$actual}]."
300+
'Found unexpected JSON fragment: ' . PHP_EOL . PHP_EOL
301+
. '[' . json_encode($data) . ']' . PHP_EOL . PHP_EOL
302+
. 'within' . PHP_EOL . PHP_EOL
303+
. "[{$actual}]."
304304
);
305305
}
306306

@@ -381,8 +381,8 @@ public function assertJsonValidationErrors($keys)
381381
$errors = $this->json()['errors'] ?? [];
382382

383383
$errorMessage = $errors
384-
? 'Response has the following JSON validation errors:' .
385-
PHP_EOL . PHP_EOL . json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . PHP_EOL
384+
? 'Response has the following JSON validation errors:'
385+
. PHP_EOL . PHP_EOL . json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . PHP_EOL
386386
: 'Response does not have JSON validation errors.';
387387

388388
foreach ($keys as $key) {
@@ -416,8 +416,8 @@ public function assertJsonMissingValidationErrors($keys = null)
416416

417417
if (is_null($keys) && count($errors) > 0) {
418418
PHPUnit::fail(
419-
'Response has unexpected validation errors: ' . PHP_EOL . PHP_EOL .
420-
json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
419+
'Response has unexpected validation errors: ' . PHP_EOL . PHP_EOL
420+
. json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
421421
);
422422
}
423423

@@ -489,10 +489,10 @@ protected function assertJsonMessage(array $data)
489489

490490
$actual = json_encode($this->decodeResponseJson(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
491491

492-
return 'Unable to find JSON: ' . PHP_EOL . PHP_EOL .
493-
"[{$expected}]" . PHP_EOL . PHP_EOL .
494-
'within response JSON:' . PHP_EOL . PHP_EOL .
495-
"[{$actual}]." . PHP_EOL . PHP_EOL;
492+
return 'Unable to find JSON: ' . PHP_EOL . PHP_EOL
493+
. "[{$expected}]" . PHP_EOL . PHP_EOL
494+
. 'within response JSON:' . PHP_EOL . PHP_EOL
495+
. "[{$actual}]." . PHP_EOL . PHP_EOL;
496496
}
497497

498498
/**

0 commit comments

Comments
 (0)