| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 17 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | static public function factory(EventManager $eventManager) |
|
| 19 | { |
||
| 20 | 1 | $analyzer = new Analyzer($eventManager); |
|
| 21 | 1 | $analyzer->registerExpressionPasses( |
|
| 22 | [ |
||
| 23 | // Another |
||
| 24 | 1 | new AnalyzerPass\Expression\ArrayShortDefinition(), |
|
| 25 | // Function call |
||
| 26 | 1 | new AnalyzerPass\Expression\FunctionCall\AliasCheck(), |
|
| 27 | 1 | new AnalyzerPass\Expression\FunctionCall\DebugCode(), |
|
| 28 | 1 | new AnalyzerPass\Expression\FunctionCall\RandomApiMigration(), |
|
| 29 | 1 | new AnalyzerPass\Expression\FunctionCall\UseCast(), |
|
| 30 | 1 | new AnalyzerPass\Expression\FunctionCall\DeprecatedIniOptions(), |
|
| 31 | 1 | new AnalyzerPass\Expression\FunctionCall\RegularExpressions(), |
|
| 32 | ] |
||
| 33 | 1 | ); |
|
| 34 | 1 | $analyzer->registerStatementPasses( |
|
| 35 | [ |
||
| 36 | 1 | new AnalyzerPass\Statement\MethodCannotReturn() |
|
| 37 | 1 | ] |
|
| 38 | 1 | ); |
|
| 39 | 1 | $analyzer->bind(); |
|
| 40 | |||
| 41 | 1 | return $analyzer; |
|
| 42 | } |
||
| 43 | } |
||
| 44 |