Skip to content

Commit

Permalink
change is_a to isSuperTypeOf() in BreakingVariableRenameGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 19, 2021
1 parent e352166 commit 2752f2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rules/Naming/Guard/BreakingVariableRenameGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ private function isDateTimeAtNamingConvention(Param $param): bool
return false;
}

if (! is_a($type->getClassName(), DateTimeInterface::class, true)) {
$objectType = new ObjectType('DateTimeInterface');
$isDateTimeInterfaceNotSuperOfType = $objectType->isSuperTypeOf($type)->no();

if ($isDateTimeInterfaceNotSuperOfType) {
return false;
}

Expand Down

0 comments on commit 2752f2c

Please sign in to comment.