-
Notifications
You must be signed in to change notification settings - Fork 428
/
ImplodeFunctionRuleTest.php
49 lines (43 loc) · 1.22 KB
/
ImplodeFunctionRuleTest.php
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
49
<?php declare(strict_types = 1);
namespace PHPStan\Rules\Functions;
use PHPStan\Rules\RuleLevelHelper;
/**
* @extends \PHPStan\Testing\RuleTestCase<ImplodeFunctionRule>
*/
class ImplodeFunctionRuleTest extends \PHPStan\Testing\RuleTestCase
{
protected function getRule(): \PHPStan\Rules\Rule
{
$broker = $this->createReflectionProvider();
return new ImplodeFunctionRule($broker, new RuleLevelHelper($broker, true, false, true, false));
}
public function testFile(): void
{
$this->analyse([__DIR__ . '/data/implode.php'], [
[
'Parameter #2 $array of function implode expects array<string>, array<int, string>|string given.',
9,
],
[
'Parameter #1 $array of function implode expects array<string>, array<int, string> given.',
11,
],
[
'Parameter #1 $array of function implode expects array<string>, array<int, int> given.',
12,
],
[
'Parameter #1 $array of function implode expects array<string>, array<int, int|true> given.',
13,
],
[
'Parameter #2 $array of function implode expects array<string>, array<int, string> given.',
15,
],
[
'Parameter #2 $array of function join expects array<string>, array<int, string> given.',
16,
],
]);
}
}