1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

fix errors after merge

This commit is contained in:
orklah 2022-01-14 21:13:34 +01:00
parent b633619a2c
commit d2faa5b94f
6 changed files with 11 additions and 11 deletions

View File

@ -97,7 +97,7 @@ class ScopeAnalyzer
}
// don't consider a return if the expression never returns (e.g. a throw inside a short closure)
if ($stmt_return_type && ($stmt_return_type->isNever() || $stmt_return_type->isEmpty())) {
if ($stmt_return_type && $stmt_return_type->isNever()) {
return array_values(array_unique(array_merge($control_actions, [self::ACTION_END])));
}

View File

@ -1521,7 +1521,7 @@ class ArgumentsAnalyzer
$packed_var_definite_args_tmp[] = $atomic_arg_type->count;
} elseif ($atomic_arg_type instanceof TArray
&& $atomic_arg_type->type_params[1]->isEmpty()
&& $atomic_arg_type->type_params[1]->isNever()
) {
$packed_var_definite_args_tmp[] = 0;
} else {

View File

@ -691,7 +691,7 @@ class ArgTest extends TestCase
'error_message' => 'ArgumentTypeCoercion',
],
'MissingMandatoryParamWithNamedParams' => [
'<?php
'code' => '<?php
class User
{
public function __construct(

View File

@ -2122,7 +2122,7 @@ class ArrayFunctionCallTest extends TestCase
}',
],
'keepClassStringInOffsetThroughArrayMerge' => [
'<?php
'code' => '<?php
class A {
/** @var array<class-string, string> */

View File

@ -736,7 +736,7 @@ class ClosureTest extends TestCase
'php_version' => '8.1',
],
'arrowFunctionReturnsNeverImplictly' => [
'<?php
'code' => '<?php
$bar = ["foo", "bar"];
$bam = array_map(
@ -744,11 +744,11 @@ class ClosureTest extends TestCase
$bar
);',
'assertions' => [],
'error_levels' => [],
'8.1'
'ignored_issues' => [],
'php_version' => '8.1'
],
'arrowFunctionReturnsNeverExplictly' => [
'<?php
'code' => '<?php
$bar = ["foo", "bar"];
$bam = array_map(
@ -757,8 +757,8 @@ class ClosureTest extends TestCase
$bar
);',
'assertions' => [],
'error_levels' => [],
'8.1'
'ignored_issues' => [],
'php_version' => '8.1'
],
];
}

View File

@ -248,7 +248,7 @@ class ReturnTypeTest extends TestCase
],
],
'extendsStaticConstReturnType' => [
'<?php
'code' => '<?php
class A {
/** @var int */
private const FOO = 1;