1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +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 if (!$guide_classlike_storage->user_defined
&& $implementer_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->return_type
|| $guide_method_storage->signature_return_type || $guide_method_storage->signature_return_type
) )

View File

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

View File

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

View File

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

View File

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