| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.7462 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 1 | public function construct(ConstructEvent $event) |
|
| 45 | { |
||
| 46 | 1 | if ($event->getTwig()->hasExtension(Extension\Profiler::class)) { |
|
| 47 | 1 | return; |
|
| 48 | } |
||
| 49 | |||
| 50 | $profile = new Profile(); |
||
| 51 | $event->getTwig()->addExtension(new Extension\Profiler($profile)); |
||
| 52 | |||
| 53 | EventManager::instance()->dispatch(ProfileEvent::create($profile)); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |