-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.php
More file actions
45 lines (44 loc) · 1.77 KB
/
Copy pathphpstan.php
File metadata and controls
45 lines (44 loc) · 1.77 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
<?php
return [
'includes' => [
__DIR__.'/vendor/phpstan/phpstan-phpunit/extension.neon',
],
'parameters' => [
'level' => 8,
'paths' => [__DIR__.'/src', __DIR__.'/tests'],
'excludePaths' => [
'analyseAndScan' => [
__DIR__.'/vendor/*',
],
// Test fixtures are sample entities/controllers/config, not library
// code — still scanned so tests referencing them resolve, but their
// Doctrine-reflection-written ids and sample controllers are not
// analysed.
'analyse' => [
__DIR__.'/tests/Fixtures/*',
],
],
'ignoreErrors' => [
// Redundant PHPUnit type assertions (assertIsArray/assertIsString on
// a value PHPStan already knows the type of). Test-readability
// noise, never a bug.
[
'identifier' => 'method.alreadyNarrowedType',
'path' => __DIR__.'/tests/*',
'reportUnmatched' => false,
],
// The QueryBuilder test mocks Doctrine metadata by assigning plain
// arrays to ClassMetadata::$fieldMappings/$associationMappings. In
// ORM 3 those are typed as FieldMapping/AssociationMapping objects,
// but they implement ArrayAccess, so the code under test reads them
// as arrays and the mock works. Typing them properly would mean
// building real mapping objects for a test that only needs the
// array shape.
[
'identifier' => 'assign.propertyType',
'path' => __DIR__.'/tests/JsonApiQueryBuilderTest.php',
'reportUnmatched' => false,
],
],
],
];