-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathphpstan-dead-code-detector.php
More file actions
35 lines (33 loc) · 764 Bytes
/
Copy pathphpstan-dead-code-detector.php
File metadata and controls
35 lines (33 loc) · 764 Bytes
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
<?php
declare(strict_types = 1);
$rulesNeon = __DIR__ . '/vendor/shipmonk/dead-code-detector/rules.neon';
// Can't use InstalledVersions::isInstalled() because here the InstalledVersions class comes from phpstan.phar, not this project's vendor/
if (!file_exists($rulesNeon)) {
return [];
}
return [
'includes' => [
$rulesNeon,
],
'parameters' => [
'shipmonkDeadCode' => [
'usageExcluders' => [
'tests' => [
'enabled' => true,
],
],
'detect' => [
'deadEnumCases' => true,
],
],
'ignoreErrors' => [
[
'identifier' => 'shipmonk.deadMethod', // Used in extension.neon
'paths' => [
__DIR__ . '/src/DisallowedSuperglobalFactory.php',
__DIR__ . '/src/DisallowedKeywordFactory.php',
],
],
],
],
];