| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 21 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 32 | public function call() | ||
| 33 |     { | ||
| 34 | $builder = $this->getBuilder(); | ||
| 35 | |||
| 36 |         $path = $this->getParam('path', self::DEFAULT_PATH); | ||
| 37 |         $threshold = $this->getParam('threshold', self::DEFAULT_THRESHOLD); | ||
| 38 | |||
| 39 | $free = disk_free_space($path); | ||
| 40 | |||
| 41 |         if ($free >= $threshold) { | ||
| 42 | $builder->up(); | ||
| 43 |         } else { | ||
| 44 | $builder->down(); | ||
| 45 | } | ||
| 46 | |||
| 47 |         $builder->withData('free_bytes', $free) | ||
| 48 |             ->withData('free_human', $this->formatBytes($free)) | ||
| 49 |             ->withData('path', $path) | ||
| 50 |             ->withData('threshold', $threshold); | ||
| 51 | |||
| 52 | return $builder->build(); | ||
| 53 | } | ||
| 55 |