Skip to content

Commit

Permalink
rename variables with reserved names
Browse files Browse the repository at this point in the history
  • Loading branch information
IanDelMar committed Jun 28, 2024
1 parent 26358e0 commit 1c3d429
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/WpParseUrlFunctionDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ private function cacheReturnTypes(): void
return;
}

$string = new StringType();
$stringType = new StringType();
$port = IntegerRangeType::fromInterval(0, 65535);
$false = new ConstantBooleanType(false);
$null = new NullType();
$falseType = new ConstantBooleanType(false);
$nullType = new NullType();

$stringOrFalseOrNull = TypeCombinator::union($string, $false, $null);
$portOrFalseOrNull = TypeCombinator::union($port, $false, $null);
$stringOrFalseOrNull = TypeCombinator::union($stringType, $falseType, $nullType);
$portOrFalseOrNull = TypeCombinator::union($port, $falseType, $nullType);

$this->componentTypesPairedConstants = [
PHP_URL_SCHEME => $stringOrFalseOrNull,
Expand All @@ -165,14 +165,14 @@ private function cacheReturnTypes(): void
];

$this->componentTypesPairedStrings = [
'scheme' => $string,
'host' => $string,
'scheme' => $stringType,
'host' => $stringType,
'port' => $port,
'user' => $string,
'pass' => $string,
'path' => $string,
'query' => $string,
'fragment' => $string,
'user' => $stringType,
'pass' => $stringType,
'path' => $stringType,
'query' => $stringType,
'fragment' => $stringType,
];
}
}

0 comments on commit 1c3d429

Please sign in to comment.