3
3
namespace ShipMonk \PHPStan \Rule ;
4
4
5
5
use PhpParser \PrettyPrinter \Standard ;
6
- use PHPStan \Broker \AnonymousClassNameHelper ;
7
- use PHPStan \File \FileHelper ;
8
- use PHPStan \PhpDoc \PhpDocNodeResolver ;
9
- use PHPStan \PhpDoc \PhpDocStringResolver ;
10
6
use PHPStan \PhpDoc \TypeNodeResolver ;
11
- use PHPStan \PhpDocParser \Lexer \Lexer ;
12
- use PHPStan \PhpDocParser \Parser \ConstExprParser ;
13
- use PHPStan \PhpDocParser \Parser \PhpDocParser ;
14
- use PHPStan \PhpDocParser \Parser \TypeParser ;
15
- use PHPStan \Reflection \ReflectionProvider \ReflectionProviderProvider ;
16
7
use PHPStan \Type \FileTypeMapper ;
17
8
use ShipMonk \PHPStan \RuleTestCase ;
18
9
@@ -25,23 +16,7 @@ class ForbidNotNormalizedTypeRuleTest extends RuleTestCase
25
16
protected function getRule (): ForbidNotNormalizedTypeRule
26
17
{
27
18
return new ForbidNotNormalizedTypeRule (
28
- new FileTypeMapper ( // @phpstan-ignore-line
29
- self ::getContainer ()->getByType (ReflectionProviderProvider::class), // @phpstan-ignore-line
30
- self ::getContainer ()->getService ('currentPhpVersionRichParser ' ), // @phpstan-ignore-line
31
- new PhpDocStringResolver ( // @phpstan-ignore-line
32
- new Lexer (),
33
- new PhpDocParser (
34
- self ::getContainer ()->getByType (TypeParser::class),
35
- self ::getContainer ()->getByType (ConstExprParser::class),
36
- false ,
37
- false ,
38
- ['lines ' => true ], // simplify after https://github.com/phpstan/phpstan-src/pull/2807
39
- ),
40
- ),
41
- self ::getContainer ()->getByType (PhpDocNodeResolver::class), // @phpstan-ignore-line
42
- self ::getContainer ()->getByType (AnonymousClassNameHelper::class), // @phpstan-ignore-line
43
- self ::getContainer ()->getByType (FileHelper::class),
44
- ),
19
+ self ::getContainer ()->getByType (FileTypeMapper::class),
45
20
self ::getContainer ()->getByType (TypeNodeResolver::class),
46
21
self ::getContainer ()->getByType (Standard::class),
47
22
true ,
0 commit comments