Skip to content

Commit

Permalink
Fix: Run 'tools/php-cs-fixer fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and sebastianbergmann committed May 27, 2023
1 parent ba54556 commit 2479058
Show file tree
Hide file tree
Showing 208 changed files with 1,301 additions and 1,301 deletions.
204 changes: 102 additions & 102 deletions src/Framework/Assert.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Framework/Assert/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2927,7 +2927,7 @@ function never(): InvokedCountMatcher
function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher
{
return new InvokedAtLeastCountMatcher(
$requiredInvocations
$requiredInvocations,
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Framework/Constraint/Cardinality/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function toString(): string
{
return sprintf(
'count matches %d',
$this->expectedCount
$this->expectedCount,
);
}

Expand Down Expand Up @@ -76,7 +76,7 @@ protected function getCountOf($other): ?int
throw new Exception(
$e->getMessage(),
$e->getCode(),
$e
$e,
);
}
}
Expand Down Expand Up @@ -136,7 +136,7 @@ protected function failureDescription($other): string
return sprintf(
'actual size %d matches expected size %d',
(int) $this->getCountOf($other),
$this->expectedCount
$this->expectedCount,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Cardinality/IsEmpty.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function failureDescription($other): string
'%s %s %s',
strpos($type, 'a') === 0 || strpos($type, 'o') === 0 ? 'an' : 'a',
$type,
$this->toString()
$this->toString(),
);
}
}
4 changes: 2 additions & 2 deletions src/Framework/Constraint/Constraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function fail($other, $description, ComparisonFailure $comparisonFailu
{
$failureDescription = sprintf(
'Failed asserting that %s.',
$this->failureDescription($other)
$this->failureDescription($other),
);

$additionalFailureDescription = $this->additionalFailureDescription($other);
Expand All @@ -121,7 +121,7 @@ protected function fail($other, $description, ComparisonFailure $comparisonFailu

throw new ExpectationFailedException(
$failureDescription,
$comparisonFailure
$comparisonFailure,
);
}

Expand Down
12 changes: 6 additions & 6 deletions src/Framework/Constraint/Equality/IsEqual.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ public function evaluate($other, string $description = '', bool $returnResult =
try {
$comparator = $comparatorFactory->getComparatorFor(
$this->value,
$other
$other,
);

$comparator->assertEquals(
$this->value,
$other,
$this->delta,
$this->canonicalize,
$this->ignoreCase
$this->ignoreCase,
);
} catch (ComparisonFailure $f) {
if ($returnResult) {
Expand All @@ -95,7 +95,7 @@ public function evaluate($other, string $description = '', bool $returnResult =

throw new ExpectationFailedException(
trim($description . "\n" . $f->getMessage()),
$f
$f,
);
}

Expand All @@ -118,21 +118,21 @@ public function toString(): string

return sprintf(
"is equal to '%s'",
$this->value
$this->value,
);
}

if ($this->delta != 0) {
$delta = sprintf(
' with delta <%F>',
$this->delta
$this->delta,
);
}

return sprintf(
'is equal to %s%s',
$this->exporter()->export($this->value),
$delta
$delta,
);
}
}
10 changes: 5 additions & 5 deletions src/Framework/Constraint/Equality/IsEqualCanonicalizing.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function evaluate($other, string $description = '', bool $returnResult =
try {
$comparator = $comparatorFactory->getComparatorFor(
$this->value,
$other
$other,
);

$comparator->assertEquals(
$this->value,
$other,
0.0,
true,
false
false,
);
} catch (ComparisonFailure $f) {
if ($returnResult) {
Expand All @@ -75,7 +75,7 @@ public function evaluate($other, string $description = '', bool $returnResult =

throw new ExpectationFailedException(
trim($description . "\n" . $f->getMessage()),
$f
$f,
);
}

Expand All @@ -96,13 +96,13 @@ public function toString(): string

return sprintf(
"is equal to '%s'",
$this->value
$this->value,
);
}

return sprintf(
'is equal to %s',
$this->exporter()->export($this->value)
$this->exporter()->export($this->value),
);
}
}
10 changes: 5 additions & 5 deletions src/Framework/Constraint/Equality/IsEqualIgnoringCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function evaluate($other, string $description = '', bool $returnResult =
try {
$comparator = $comparatorFactory->getComparatorFor(
$this->value,
$other
$other,
);

$comparator->assertEquals(
$this->value,
$other,
0.0,
false,
true
true,
);
} catch (ComparisonFailure $f) {
if ($returnResult) {
Expand All @@ -75,7 +75,7 @@ public function evaluate($other, string $description = '', bool $returnResult =

throw new ExpectationFailedException(
trim($description . "\n" . $f->getMessage()),
$f
$f,
);
}

Expand All @@ -96,13 +96,13 @@ public function toString(): string

return sprintf(
"is equal to '%s'",
$this->value
$this->value,
);
}

return sprintf(
'is equal to %s',
$this->exporter()->export($this->value)
$this->exporter()->export($this->value),
);
}
}
8 changes: 4 additions & 4 deletions src/Framework/Constraint/Equality/IsEqualWithDelta.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ public function evaluate($other, string $description = '', bool $returnResult =
try {
$comparator = $comparatorFactory->getComparatorFor(
$this->value,
$other
$other,
);

$comparator->assertEquals(
$this->value,
$other,
$this->delta
$this->delta,
);
} catch (ComparisonFailure $f) {
if ($returnResult) {
Expand All @@ -77,7 +77,7 @@ public function evaluate($other, string $description = '', bool $returnResult =

throw new ExpectationFailedException(
trim($description . "\n" . $f->getMessage()),
$f
$f,
);
}

Expand All @@ -94,7 +94,7 @@ public function toString(): string
return sprintf(
'is equal to %s with delta <%F>',
$this->exporter()->export($this->value),
$this->delta
$this->delta,
);
}
}
6 changes: 3 additions & 3 deletions src/Framework/Constraint/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function toString(): string
{
return sprintf(
'exception of type "%s"',
$this->className
$this->className,
);
}

Expand Down Expand Up @@ -73,13 +73,13 @@ protected function failureDescription($other): string
'exception of type "%s" matches expected exception "%s"%s',
get_class($other),
$this->className,
$message
$message,
);
}

return sprintf(
'exception of type "%s" is thrown',
$this->className
$this->className,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Exception/ExceptionCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function failureDescription($other): string
return sprintf(
'%s is equal to expected exception code %s',
$this->exporter()->export($other->getCode()),
$this->exporter()->export($this->expectedCode)
$this->exporter()->export($this->expectedCode),
);
}
}
4 changes: 2 additions & 2 deletions src/Framework/Constraint/Exception/ExceptionMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ protected function failureDescription($other): string
if ($this->expectedMessage === '') {
return sprintf(
"exception message is empty but is '%s'",
$other->getMessage()
$other->getMessage(),
);
}

return sprintf(
"exception message '%s' contains '%s'",
$other->getMessage(),
$this->expectedMessage
$this->expectedMessage,
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function matches($other): bool

if ($match === false) {
throw new \PHPUnit\Framework\Exception(
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'"
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'",
);
}

Expand All @@ -68,7 +68,7 @@ protected function failureDescription($other): string
return sprintf(
"exception message '%s' matches '%s'",
$other->getMessage(),
$this->expectedMessageRegExp
$this->expectedMessageRegExp,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Filesystem/DirectoryExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function failureDescription($other): string
{
return sprintf(
'directory "%s" exists',
$other
$other,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Filesystem/FileExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function failureDescription($other): string
{
return sprintf(
'file "%s" exists',
$other
$other,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Filesystem/IsReadable.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function failureDescription($other): string
{
return sprintf(
'"%s" is readable',
$other
$other,
);
}
}
2 changes: 1 addition & 1 deletion src/Framework/Constraint/Filesystem/IsWritable.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function failureDescription($other): string
{
return sprintf(
'"%s" is writable',
$other
$other,
);
}
}
4 changes: 2 additions & 2 deletions src/Framework/Constraint/IsIdentical.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function evaluate($other, string $description = '', bool $returnResult =
$this->value,
$other,
sprintf("'%s'", $this->value),
sprintf("'%s'", $other)
sprintf("'%s'", $other),
);
}

Expand All @@ -72,7 +72,7 @@ public function evaluate($other, string $description = '', bool $returnResult =
$this->value,
$other,
$this->exporter()->export($this->value),
$this->exporter()->export($other)
$this->exporter()->export($other),
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Framework/Constraint/JsonMatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function toString(): string
{
return sprintf(
'matches JSON string "%s"',
$this->value
$this->value,
);
}

Expand Down Expand Up @@ -100,7 +100,7 @@ protected function fail($other, $description, ComparisonFailure $comparisonFailu
Json::prettify($recodedValue),
Json::prettify($recodedOther),
false,
'Failed asserting that two json values are equal.'
'Failed asserting that two json values are equal.',
);
}

Expand Down
Loading

0 comments on commit 2479058

Please sign in to comment.