-
Notifications
You must be signed in to change notification settings - Fork 696
Expand file tree
/
Copy pathPhp82Test.php
More file actions
48 lines (43 loc) · 1.29 KB
/
Php82Test.php
File metadata and controls
48 lines (43 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
declare(strict_types=1);
namespace Psalm\Tests;
use Override;
use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait;
final class Php82Test extends TestCase
{
use ValidCodeAnalysisTestTrait;
/**
* @psalm-pure
*/
#[Override]
public function providerValidCodeParse(): iterable
{
return [
'anyIterableConvert' => [
'code' => '<?php
function castToArray(iterable $arr): array {
return iterator_to_array($arr, false);
}',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '8.2',
],
'iterator_to_arrayMixedKey' => [
'code' => '<?php
/**
* @template TKey
* @template TValue
* @param iterable<TKey, TValue> $iterable
* @return array<TKey, TValue>
*/
function toArray(iterable $iterable): array
{
return iterator_to_array($iterable);
}',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '8.2',
],
];
}
}