Skip to content

Commit

Permalink
Fix issues found by new checks
Browse files Browse the repository at this point in the history
  • Loading branch information
BackEndTea committed Jun 12, 2021
1 parent 7493d08 commit 3b132ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Analyser/MutatingScope.php
Expand Up @@ -3234,8 +3234,8 @@ public function enterForeachKey(Expr $iteratee, string $keyName): self
*/
public function enterCatch(array $classes, ?string $variableName): self
{
$type = TypeCombinator::union(...array_map(static function (string $class): ObjectType {
return new ObjectType($class);
$type = TypeCombinator::union(...array_map(static function (\PhpParser\Node\Name $class): ObjectType {
return new ObjectType((string) $class);
}, $classes));

return $this->enterCatchType($type, $variableName);
Expand Down
1 change: 1 addition & 0 deletions src/Parallel/ParallelAnalyser.php
Expand Up @@ -157,6 +157,7 @@ public function analyse(
continue;
}
$exportedNodes[$file] = array_map(static function (array $node): ExportedNode {
//TODO: fix error on this line
$class = $node['type'];

return $class::decode($node['data']);
Expand Down
2 changes: 1 addition & 1 deletion src/Type/CallableType.php
Expand Up @@ -139,7 +139,7 @@ function () use ($level): string {
return sprintf(
'callable(%s): %s',
implode(', ', array_map(
static function (NativeParameterReflection $param) use ($level): string {
static function (ParameterReflection $param) use ($level): string {
return sprintf('%s%s', $param->isVariadic() ? '...' : '', $param->getType()->describe($level));
},
$this->getParameters()
Expand Down

0 comments on commit 3b132ff

Please sign in to comment.