We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 35 | public function warmUp($cacheDir): void |
|
| 40 | { |
||
| 41 | 35 | if (!$this->compiled) { |
|
| 42 | return; |
||
| 43 | } |
||
| 44 | |||
| 45 | // use warm up cache dir if type generator cache dir not already explicitly declare |
||
| 46 | 35 | $baseCacheDir = $this->typeGenerator->getBaseCacheDir(); |
|
| 47 | 35 | if (null === $this->typeGenerator->getCacheDir(false)) { |
|
| 48 | 35 | $this->typeGenerator->setBaseCacheDir($cacheDir); |
|
| 49 | } |
||
| 50 | 35 | $this->typeGenerator->compile(TypeGenerator::MODE_WRITE | TypeGenerator::MODE_OVERRIDE); |
|
| 51 | 32 | $this->typeGenerator->setBaseCacheDir($baseCacheDir); |
|
| 52 | 32 | } |
|
| 54 |