Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Jun 12, 2023
1 parent cd1cd11 commit ecc3c91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Expand Up @@ -101,7 +101,8 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev
if ($result === $type->getSingleStringLiteral()->value) {
IssueBuffer::maybeAdd(
new InvalidArgument(
'Argument 1 of ' . $event->getFunctionId() . ' does not contain any placeholders',
'Argument 1 of ' . $event->getFunctionId()
. ' does not contain any placeholders',
$event->getCodeLocation(),
$event->getFunctionId(),
),
Expand Down Expand Up @@ -216,12 +217,8 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev
return Type::getNonEmptyString();
}

/**
* if we didn't have a valid result, the pattern is invalid or not yet supported by the return type provider
* PHP 7 can have false here
*
* @psalm-suppress RedundantConditionGivenDocblockType
*/
// if we didn't have a valid result
// the pattern is invalid or not yet supported by the return type provider
if ($initial_result === null || $initial_result === false) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ReturnTypeProvider/SprintfTest.php
Expand Up @@ -140,7 +140,7 @@ public function providerValidCodeParse(): iterable
'$val===' => 'string',
],
'ignored_issues' => [
'InvalidArgument'
'InvalidArgument',
],
];
}
Expand Down

0 comments on commit ecc3c91

Please sign in to comment.