Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Jul 2, 2020
1 parent 5f9941d commit a3c963e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Exception/FormErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private function appendErrors(Hal $hal, FormInterface $form, array &$visited = [

$origin = $error->getOrigin();

if ($origin !== null) {
if (null !== $origin) {
$currPath = $this->getPath($origin);
} else {
if (null === $formPath) {
Expand Down
4 changes: 2 additions & 2 deletions src/RequestFormatValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static function intercept(
/**
* @param array|string|null $exclude
*/
protected static function isExcluded(Request $request, $exclude): bool
private static function isExcluded(Request $request, $exclude): bool
{
if (!$exclude) {
return false;
Expand All @@ -149,7 +149,7 @@ protected static function isExcluded(Request $request, $exclude): bool
/**
* @param RequestMatcherInterface|array|string $arguments
*/
protected static function createRequestMatcher(
private static function createRequestMatcher(
$arguments
): RequestMatcherInterface {
if ($arguments instanceof RequestMatcherInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/Response/HalResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getContent(): string
return '';
}

if ($this->requestFormat === 'xml') {
if ('xml' === $this->requestFormat) {
return $this->hal->asXml($this->prettyPrint);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Response/VndErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function fromThrowable(
\Throwable $throwable,
bool $prettyPrint = true,
bool $debug = false
): VndErrorResponse {
): self {
$statusCode = self::extractStatus($throwable);
$headers = self::extractHeaders($throwable);
$message = self::extractMessage($throwable, $debug);
Expand Down
1 change: 1 addition & 0 deletions tests/Exception/ValidationErrorExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class ValidationErrorExceptionTest extends TestCase
private const DATA = [
'additional' => 'foo',
];

/** @test */
public function it_serializes_exception_to_json(): void
{
Expand Down

0 comments on commit a3c963e

Please sign in to comment.