Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 31, 2022
1 parent e588977 commit 1421076
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Hooks/TestCaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event
}

foreach ($specials['dataProvider'] as $line => $provider) {
if (VersionUtils::packageVersionIs('vimeo/psalm', '>=', '5.0')) {
/** @var CodeLocation */
$provider_docblock_location = $method_storage->location->setCommentLine($line);
} else {
if (VersionUtils::packageVersionIs('vimeo/psalm', '<', '5.0')) {
$provider_docblock_location = clone $method_storage->location;
$provider_docblock_location->setCommentLine($line);
} else {
/** @var CodeLocation */
$provider_docblock_location = $method_storage->location->setCommentLine($line);
}

if (false !== strpos($provider, '::')) {
Expand Down

0 comments on commit 1421076

Please sign in to comment.