Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-09 00:03:03 -04:00
parent 8d4d610b82
commit b5fd4a4ca1
1414 changed files with 11317 additions and 10201 deletions
@@ -20,17 +20,18 @@ class ApiDeepValidationFailureContractTest extends FullSurfaceE2EContractCase
$status = $response->getStatusCode();
if ($status >= 500) {
$failures[] = "$method $uri crashed on $label hostile payload with $status: " . $response->getContent();
$failures[] = "$method $uri crashed on $label hostile payload with $status: ".$response->getContent();
continue;
}
if (! in_array($status, [200, 201, 202, 204, 302, 400, 401, 403, 404, 405, 409, 419, 422], true)) {
$failures[] = "$method $uri returned unexpected $status on $label hostile payload: " . $response->getContent();
$failures[] = "$method $uri returned unexpected $status on $label hostile payload: ".$response->getContent();
}
}
}
$this->assertSame([], $failures, "Hostile payloads must fail cleanly, not leak framework explosions:\n" . implode("\n", $failures));
$this->assertSame([], $failures, "Hostile payloads must fail cleanly, not leak framework explosions:\n".implode("\n", $failures));
}
public function test_required_field_validation_uses_machine_readable_error_shape_when_validation_fails(): void
@@ -47,17 +48,18 @@ class ApiDeepValidationFailureContractTest extends FullSurfaceE2EContractCase
}
if (! $this->isJsonString($response->getContent())) {
$failures[] = "$method $uri returned 422 but not JSON: " . $response->getContent();
$failures[] = "$method $uri returned 422 but not JSON: ".$response->getContent();
continue;
}
$json = $response->json();
if (! is_array($json) || (! array_key_exists('errors', $json) && ! array_key_exists('message', $json))) {
$failures[] = "$method $uri returned 422 without message/errors: " . $response->getContent();
$failures[] = "$method $uri returned 422 without message/errors: ".$response->getContent();
}
}
$this->assertSame([], $failures, "Validation errors must be usable by clients, not poetic prose:\n" . implode("\n", $failures));
$this->assertSame([], $failures, "Validation errors must be usable by clients, not poetic prose:\n".implode("\n", $failures));
}
/** @return list<LaravelRoute> */