Skip to content

Commit

Permalink
fix merge induced errors
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Jan 22, 2022
1 parent af1888b commit 070a1cc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/MethodComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function compare(

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
)
Expand Down
6 changes: 3 additions & 3 deletions tests/CoreStubsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -19,7 +19,7 @@ public function providerValidCodeParse(): iterable
new RecursiveArrayIterator([], RecursiveArrayIterator::CHILD_ARRAYS_ONLY);'
];
yield 'proc_open() named arguments' => [
'<?php
'code' => '<?php
proc_open(
command: "ls",
Expand All @@ -30,7 +30,7 @@ public function providerValidCodeParse(): iterable
options: null
);',
'assertions' => [],
'error_levels' => [],
'ignored_issues' => [],
'php_version' => '8.0',
];
}
Expand Down
4 changes: 2 additions & 2 deletions tests/MagicMethodAnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ function consumeInt(int $i): void {}
consumeInt(B::bar());'
],
'returnThisShouldKeepGenerics' => [
'<?php
'code' => '<?php
/**
* @template E
* @method $this foo()
Expand Down Expand Up @@ -850,7 +850,7 @@ class B {}
]
],
'genericsOfInheritedMethodsShouldBeResolved' => [
'<?php
'code' => '<?php
/**
* @template E
* @method E get()
Expand Down
10 changes: 4 additions & 6 deletions tests/MethodSignatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ public function bar(string ...$_args): void {}
'error_message' => 'MethodSignatureMismatch',
],
'noMixedTypehintInDescendant' => [
'<?php
'code' => '<?php
class a {
public function test(): mixed {
return 0;
Expand All @@ -1582,21 +1582,19 @@ public function test() {
}
',
'error_message' => 'MethodSignatureMismatch',
[],
false,
'ignored_issues' => [],
'8.0'
],
'noTypehintInNativeDescendant' => [
'<?php
'code' => '<?php
class a implements JsonSerializable {
public function jsonSerialize() {
return 0;
}
}
',
'error_message' => 'MethodSignatureMustProvideReturnType',
[],
false,
'ignored_issues' => [],
'8.1'
],
];
Expand Down
1 change: 0 additions & 1 deletion tests/Traits/InvalidCodeAnalysisTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Psalm\Context;
use Psalm\Exception\CodeException;

use function is_int;
use function preg_quote;
use function str_replace;
use function strpos;
Expand Down

0 comments on commit 070a1cc

Please sign in to comment.