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:
parent
b633619a2c
commit
d2faa5b94f
@ -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])));
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -691,7 +691,7 @@ class ArgTest extends TestCase
|
||||
'error_message' => 'ArgumentTypeCoercion',
|
||||
],
|
||||
'MissingMandatoryParamWithNamedParams' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
class User
|
||||
{
|
||||
public function __construct(
|
||||
|
@ -2122,7 +2122,7 @@ class ArrayFunctionCallTest extends TestCase
|
||||
}',
|
||||
],
|
||||
'keepClassStringInOffsetThroughArrayMerge' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
|
||||
class A {
|
||||
/** @var array<class-string, string> */
|
||||
|
@ -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'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ class ReturnTypeTest extends TestCase
|
||||
],
|
||||
],
|
||||
'extendsStaticConstReturnType' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
class A {
|
||||
/** @var int */
|
||||
private const FOO = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user