Skip to content

Commit

Permalink
Simplify AccessoryNonEmptyStringTypeCorrector (#3636)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Apr 20, 2023
1 parent ff89974 commit fff2232
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ public function correct(Type $mainType): Type | IntersectionType
return $mainType;
}

if (
! $mainType->isSubTypeOf(new AccessoryNonEmptyStringType())
->yes()
&& ! $mainType->isSubTypeOf(new AccessoryNonFalsyStringType())
->yes()
) {
if (!$mainType->isNonEmptyString()->yes()) {
return $mainType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function correct(Type $mainType): Type
return $traverseCallback($traversedType);
}

/** @var ClassReflection $classReflection */
$classReflection = $this->reflectionProvider->getClass($value);
if ($classReflection->getName() !== $value) {
return $traverseCallback($traversedType);
Expand Down

0 comments on commit fff2232

Please sign in to comment.