Skip to content

Commit

Permalink
Immutable refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 22, 2022
1 parent 5a66a0a commit 803eb85
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Hooks/TestCaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event
}

foreach ($specials['dataProvider'] as $line => $provider) {
$provider_docblock_location = clone $method_storage->location;
$provider_docblock_location->setCommentLine($line);
$provider_docblock_location = $method_storage->location->setCommentLine($line);

if (false !== strpos($provider, '::')) {
[$class_name, $method_id] = explode('::', $provider);
Expand Down Expand Up @@ -328,9 +327,8 @@ static function (
$provider_return_type_string,
$provider_docblock_location
): void {
$param_type = clone $param_type;
if ($is_optional) {
$param_type->possibly_undefined = true;
$param_type = $param_type->setPossiblyUndefined(true);
}
if ($codebase->isTypeContainedByType($potential_argument_type, $param_type)) {
// ok
Expand Down

0 comments on commit 803eb85

Please sign in to comment.