1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

fix merge induced errors

This commit is contained in:
orklah 2022-01-22 18:05:32 +01:00
parent af1888b631
commit 070a1cc7a3
5 changed files with 10 additions and 13 deletions

View File

@ -120,7 +120,7 @@ class MethodComparator
if (!$guide_classlike_storage->user_defined
&& $implementer_classlike_storage->user_defined
&& $codebase->analysis_php_version_id >= 80100
&& $codebase->analysis_php_version_id >= 8_01_00
&& ($guide_method_storage->return_type
|| $guide_method_storage->signature_return_type
)

View File

@ -9,7 +9,7 @@ class CoreStubsTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerValidCodeParse(): iterable
{
@ -19,7 +19,7 @@ class CoreStubsTest extends TestCase
new RecursiveArrayIterator([], RecursiveArrayIterator::CHILD_ARRAYS_ONLY);'
];
yield 'proc_open() named arguments' => [
'<?php
'code' => '<?php
proc_open(
command: "ls",
@ -30,7 +30,7 @@ class CoreStubsTest extends TestCase
options: null
);',
'assertions' => [],
'error_levels' => [],
'ignored_issues' => [],
'php_version' => '8.0',
];
}

View File

@ -820,7 +820,7 @@ class MagicMethodAnnotationTest extends TestCase
consumeInt(B::bar());'
],
'returnThisShouldKeepGenerics' => [
'<?php
'code' => '<?php
/**
* @template E
* @method $this foo()
@ -850,7 +850,7 @@ class MagicMethodAnnotationTest extends TestCase
]
],
'genericsOfInheritedMethodsShouldBeResolved' => [
'<?php
'code' => '<?php
/**
* @template E
* @method E get()

View File

@ -1569,7 +1569,7 @@ class MethodSignatureTest extends TestCase
'error_message' => 'MethodSignatureMismatch',
],
'noMixedTypehintInDescendant' => [
'<?php
'code' => '<?php
class a {
public function test(): mixed {
return 0;
@ -1582,12 +1582,11 @@ class MethodSignatureTest extends TestCase
}
',
'error_message' => 'MethodSignatureMismatch',
[],
false,
'ignored_issues' => [],
'8.0'
],
'noTypehintInNativeDescendant' => [
'<?php
'code' => '<?php
class a implements JsonSerializable {
public function jsonSerialize() {
return 0;
@ -1595,8 +1594,7 @@ class MethodSignatureTest extends TestCase
}
',
'error_message' => 'MethodSignatureMustProvideReturnType',
[],
false,
'ignored_issues' => [],
'8.1'
],
];

View File

@ -6,7 +6,6 @@ use Psalm\Config;
use Psalm\Context;
use Psalm\Exception\CodeException;
use function is_int;
use function preg_quote;
use function str_replace;
use function strpos;