1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
This commit is contained in:
Daniil Gentili 2023-04-21 15:58:05 +02:00
parent 05e92054e0
commit 8078b6dcbf
8 changed files with 10 additions and 17 deletions

View File

@ -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>

View File

@ -252,7 +252,6 @@ class ParseTreeCreator
$generic_leaf = new GenericTree(
'',
$current_parent,
true,
);
$current_parent->children []= $generic_leaf;

View File

@ -488,7 +488,6 @@ abstract class Type
/**
* @psalm-pure
*
* @psalm-suppress ImpureStaticProperty Used for caching
*/
public static function getListKey(bool $from_docblock = false): Union

View File

@ -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

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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}',