| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 1 | private static function parseMethodCalls( string $choiceFactoryLocation ): array { |
|
| 40 | 1 | $parser = ( new ParserFactory() )->create( ParserFactory::PREFER_PHP7 ); |
|
| 41 | 1 | $nodeFinder = new NodeFinder(); |
|
| 42 | $choiceFactoryCode = ( new SimpleFileFetcher() )->fetchFile( $choiceFactoryLocation ); |
||
| 43 | 1 | $syntaxTree = $parser->parse( $choiceFactoryCode ); |
|
| 44 | 1 | return $nodeFinder->find( |
|
| 45 | $syntaxTree, |
||
| 46 | function ( Node $node ) { |
||
| 47 | return $node instanceof MethodCall && $node->name->toString() === self::FEATURE_TOGGLE_METHOD_NAME; |
||
| 48 | } |
||
| 51 | } |