mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fixes
This commit is contained in:
parent
05e92054e0
commit
8078b6dcbf
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="dev-master@">
|
||||
<files psalm-version="dev-master@88f6be1213950f29d6516eb422cf021b10bae455">
|
||||
<file src="examples/TemplateChecker.php">
|
||||
<PossiblyUndefinedIntArrayOffset>
|
||||
<code><![CDATA[$comment_block->tags['variablesfrom'][0]]]></code>
|
||||
@ -439,11 +439,6 @@
|
||||
<code>traverse</code>
|
||||
</ImpureMethodCall>
|
||||
</file>
|
||||
<file src="src/Psalm/Type.php">
|
||||
<ImpureStaticProperty>
|
||||
<code>self::$listKey</code>
|
||||
</ImpureStaticProperty>
|
||||
</file>
|
||||
<file src="src/Psalm/Type/Atomic.php">
|
||||
<ImpureMethodCall>
|
||||
<code>classExtendsOrImplements</code>
|
||||
|
@ -252,7 +252,6 @@ class ParseTreeCreator
|
||||
$generic_leaf = new GenericTree(
|
||||
'',
|
||||
$current_parent,
|
||||
true,
|
||||
);
|
||||
$current_parent->children []= $generic_leaf;
|
||||
|
||||
|
@ -488,7 +488,6 @@ abstract class Type
|
||||
|
||||
/**
|
||||
* @psalm-pure
|
||||
*
|
||||
* @psalm-suppress ImpureStaticProperty Used for caching
|
||||
*/
|
||||
public static function getListKey(bool $from_docblock = false): Union
|
||||
|
@ -1540,7 +1540,7 @@ class ArrayAssignmentTest extends TestCase
|
||||
|
||||
$x = [...$x, ...$y];
|
||||
',
|
||||
'assertions' => ['$x===' => 'list{int, int, ...<int<0, max>, int>}'],
|
||||
'assertions' => ['$x===' => 'list{int, int, ...<int>}'],
|
||||
],
|
||||
'unpackEmptyKeepsCorrectKeys' => [
|
||||
'code' => '<?php
|
||||
|
@ -308,8 +308,8 @@ class ArrayFunctionCallTest extends TestCase
|
||||
'assertions' => [
|
||||
// todo: this first type is not entirely correct
|
||||
//'$c===' => "list{int|string, ...<int<0, max>, int|string>}",
|
||||
'$c===' => "list{string, ...<int<0, max>, int|string>}",
|
||||
'$d===' => "list{string, ...<int<0, max>, int|string>}",
|
||||
'$c===' => "list{string, ...<int|string>}",
|
||||
'$d===' => "list{string, ...<int|string>}",
|
||||
],
|
||||
],
|
||||
'arrayMergeEmpty' => [
|
||||
|
@ -624,7 +624,7 @@ class FunctionCallTest extends TestCase
|
||||
*/
|
||||
$elements = explode(" ", $string, $limit);',
|
||||
'assertions' => [
|
||||
'$elements' => 'list{0?: string, 1?: string, 2?: string, ...<int<0, max>, string>}',
|
||||
'$elements' => 'list{0?: string, 1?: string, 2?: string, ...<string>}',
|
||||
],
|
||||
],
|
||||
'explodeWithDynamicDelimiter' => [
|
||||
@ -680,7 +680,7 @@ class FunctionCallTest extends TestCase
|
||||
*/
|
||||
$elements = explode($delim, $string, $limit);',
|
||||
'assertions' => [
|
||||
'$elements' => 'list{0?: string, 1?: string, 2?: string, ...<int<0, max>, string>}',
|
||||
'$elements' => 'list{0?: string, 1?: string, 2?: string, ...<string>}',
|
||||
],
|
||||
],
|
||||
'explodeWithDynamicNonEmptyDelimiter' => [
|
||||
|
@ -29,7 +29,7 @@ class ReturnTypeTest extends TestCase
|
||||
$result = ret();
|
||||
',
|
||||
'assertions' => [
|
||||
'$result===' => 'list{0?: 0|a, 1?: 0|a, ...<int<0, max>, a>}',
|
||||
'$result===' => 'list{0?: 0|a, 1?: 0|a, ...<a>}',
|
||||
],
|
||||
],
|
||||
'arrayCombineInv' => [
|
||||
@ -46,7 +46,7 @@ class ReturnTypeTest extends TestCase
|
||||
$result = ret();
|
||||
',
|
||||
'assertions' => [
|
||||
'$result===' => 'list{0?: 0|a, 1?: 0|a, ...<int<0, max>, a>}',
|
||||
'$result===' => 'list{0?: 0|a, 1?: 0|a, ...<a>}',
|
||||
],
|
||||
],
|
||||
'arrayCombine2' => [
|
||||
|
@ -105,7 +105,7 @@ class TypeCombinationTest extends TestCase
|
||||
],
|
||||
],
|
||||
'complexArrayFallback2' => [
|
||||
'list{0?: 0|a, 1?: 0|a, ...<int<0, max>, a>}',
|
||||
'list{0?: 0|a, 1?: 0|a, ...<a>}',
|
||||
[
|
||||
'list<a>',
|
||||
'list{0, 0}',
|
||||
@ -639,7 +639,7 @@ class TypeCombinationTest extends TestCase
|
||||
],
|
||||
],
|
||||
'combineNonEmptyListWithTKeyedArrayList' => [
|
||||
'list{null|string, ...<int<0, max>, string>}',
|
||||
'list{null|string, ...<string>}',
|
||||
[
|
||||
'non-empty-list<string>',
|
||||
'array{null}',
|
||||
|
Loading…
Reference in New Issue
Block a user