1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Add issue snippet

This commit is contained in:
WhizSid 2023-04-13 01:15:09 +05:30
parent ae67589463
commit 9e5266d6fe

View File

@ -1803,7 +1803,7 @@ class ArrayFunctionCallTest extends TestCase
'$d' => 'array<int, list{string}|string>',
],
],
'arraySpliceEmptyRef' => [
'arraySpliceRefWithoutReplacement' => [
'code' => '<?php
$d = [1,2];
array_splice($d, 0, 1);',
@ -1811,6 +1811,14 @@ class ArrayFunctionCallTest extends TestCase
'$d' => 'list<int>',
],
],
'arraySpliceEmptyRefWithoutReplacement' => [
'code' => '<?php
$a = array( "hello" );
$_b = array_splice( $a, 0, 50 );',
'assertions' => [
'$a' => 'list<int>',
],
],
'ksortPreserveShape' => [
'code' => '<?php
$a = ["a" => 3, "b" => 4];