Conditions | 3 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function startWatching() |
||
38 | { |
||
39 | $this->terminal->displayScreen(new Phpunit($this->options), false); |
||
40 | |||
41 | $watcher = new ResourceWatcher(new ResourceCacheMemory()); |
||
42 | |||
43 | $watcher->setFinder($this->finder); |
||
44 | |||
45 | $this->loop->addPeriodicTimer(1 / 4, function () use ($watcher) { |
||
46 | if (! $this->terminal->isDisplayingScreen(Phpunit::class)) { |
||
47 | return; |
||
48 | } |
||
49 | |||
50 | $watcher->findChanges(); |
||
51 | |||
52 | if ($watcher->hasChanges()) { |
||
53 | $this->terminal->refreshScreen(); |
||
54 | } |
||
55 | }); |
||
56 | |||
57 | $this->loop->run(); |
||
58 | } |
||
59 | } |
||
60 |