Skip to content

Commit

Permalink
Update ExponentiateHelper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jan 11, 2023
1 parent 346fe24 commit 33c011a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Type/ExponentiateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function exponentiate(Type $base, Type $exponent): Type
if ($exponent instanceof UnionType) {
$results = [];
foreach ($exponent->getTypes() as $unionType) {
$results[] = $this->exponentiate($base, $unionType);
$results[] = self::exponentiate($base, $unionType);
}
return TypeCombinator::union(...$results);
}
Expand All @@ -36,7 +36,7 @@ public static function exponentiate(Type $base, Type $exponent): Type
}

if ($base instanceof ConstantScalarType) {
$result = $this->exponentiateConstantScalar($base, $exponent);
$result = self::exponentiateConstantScalar($base, $exponent);
if ($result !== null) {
return $result;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ public static function exponentiate(Type $base, Type $exponent): Type
]);
}

private function exponentiateConstantScalar(ConstantScalarType $base, Type $exponent): ?Type
private static function exponentiateConstantScalar(ConstantScalarType $base, Type $exponent): ?Type
{
if ($exponent instanceof IntegerRangeType) {
$min = null;
Expand Down

0 comments on commit 33c011a

Please sign in to comment.