| Conditions | 5 | 
| Paths | 3 | 
| Total Lines | 25 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 19 | public function call() | ||
| 20 |     { | ||
| 21 | $health = parent::call(); | ||
| 22 | |||
| 23 |         if ($health->getState() == HealthCheck::STATE_UP) { | ||
| 24 | $builder = $this->getBuilder(); | ||
| 25 | |||
| 26 |             $tables = $this->getParam('tables', []); | ||
| 27 | $missing = []; | ||
| 28 |             foreach ($tables as $table) { | ||
| 29 |                 if (! DB::getSchemaBuilder()->hasTable($table)) { | ||
| 30 | $missing[] = $table; | ||
| 31 | |||
| 32 | $builder->down(); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 |             if ($missing) { | ||
| 37 |                 $builder->withData('missing', $missing); | ||
| 38 | } | ||
| 39 | |||
| 40 | $health = $builder->build(); | ||
| 41 | } | ||
| 42 | |||
| 43 | return $health; | ||
| 44 | } | ||
| 46 |