mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-16 20:03:47 +09:00
Updates to vendors etc
This commit is contained in:
@@ -16,6 +16,13 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseIsUnprocessable extends Constraint
|
||||
{
|
||||
/**
|
||||
* @param bool $verbose If true, the entire response is printed on failure. If false, the response body is omitted.
|
||||
*/
|
||||
public function __construct(private readonly bool $verbose = true)
|
||||
{
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is unprocessable';
|
||||
@@ -38,10 +45,10 @@ final class ResponseIsUnprocessable extends Constraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Response $other
|
||||
* @param Response $response
|
||||
*/
|
||||
protected function additionalFailureDescription($other): string
|
||||
protected function additionalFailureDescription($response): string
|
||||
{
|
||||
return (string) $other;
|
||||
return $this->verbose ? (string) $response : explode("\r\n\r\n", (string) $response)[0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user