Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jun 25, 2024
1 parent bebe45d commit ce6145c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function formatMessage(string $file, ?Throwable $previous): string
{
$fileLabel = $file ? sprintf(": '%s'", $file) : '';

return rtrim(sprintf("Invalid %s in file%s %s", $this->getTypeLabel($file), $fileLabel, $this->getContext($previous)));
return rtrim(sprintf('Invalid %s in file%s %s', $this->getTypeLabel($file), $fileLabel, $this->getContext($previous)));
}

protected function getTypeLabel(string $file): string
Expand Down
6 changes: 3 additions & 3 deletions packages/framework/tests/Unit/CustomExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function testParseExceptionWithDefaultMessage()
{
$exception = new ParseException();

$this->assertSame("Invalid data in file", $exception->getMessage());
$this->assertSame('Invalid data in file', $exception->getMessage());
}

public function testParseExceptionWithFileName()
Expand Down Expand Up @@ -158,15 +158,15 @@ public function testParseExceptionWithEmptyFileNameAndCustomMessage()
$previous = new RuntimeException('Custom error message.');
$exception = new ParseException('', $previous);

$this->assertSame("Invalid data in file (Custom error message)", $exception->getMessage());
$this->assertSame('Invalid data in file (Custom error message)', $exception->getMessage());
}

public function testParseExceptionWithEmptyFileNameAndEmptyPreviousMessage()
{
$previous = new RuntimeException('');
$exception = new ParseException('', $previous);

$this->assertSame("Invalid data in file", $exception->getMessage());
$this->assertSame('Invalid data in file', $exception->getMessage());
}

public function testParseExceptionWithNoPrevious()
Expand Down

0 comments on commit ce6145c

Please sign in to comment.