| Conditions | 3 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function analyze($ast) |
||
| 43 | { |
||
| 44 | $walker = new NodeWalker(); |
||
| 45 | |||
| 46 | $errors = $walker->walk($ast, function ($node) { |
||
| 47 | |||
| 48 | foreach ($this->checkers() as $class) { |
||
| 49 | |||
| 50 | /** @var CheckerInterface $checker */ |
||
| 51 | $checker = new $class(); |
||
| 52 | |||
| 53 | if ($checker instanceof ParametersInterface) { |
||
| 54 | $checker->setParameters($this->config); |
||
| 55 | } |
||
| 56 | |||
| 57 | $this->bootstrapper->bootstrap($checker); |
||
| 58 | |||
| 59 | $checker->check($node); |
||
| 60 | } |
||
| 61 | }); |
||
| 62 | |||
| 63 | return $errors; |
||
| 64 | } |
||
| 65 | |||
| 74 |