Skip to content

Commit

Permalink
Fix DiskUsage Threshold check
Browse files Browse the repository at this point in the history
  • Loading branch information
svilborg committed Jul 18, 2019
1 parent 1905639 commit b718974
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Checks/Filesystem/DiskUsage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function call()
$threshold = $this->getParam('threshold', self::DEFAULT_THRESHOLD);

if ($threshold > 100 || $threshold < 0) {
return $builder->down()->withData('error', 'Invalid Threshold - ' . $threshold);
return $builder->down()->withData('error', 'Invalid Threshold - ' . $threshold)->build();
}

$free = disk_free_space($path);
Expand Down
2 changes: 1 addition & 1 deletion src/Checks/Traits/FormatTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait FormatTrait
/**
* Format bytes to kb, mb, gb, tb
*
* @param integer $size
* @param mixed $size
* @param integer $precision
* @return string
*/
Expand Down
3 changes: 3 additions & 0 deletions src/Resources/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

/**
* Health Resource
*
* @method string getState()
* @method array getChecks()
*/
class Health extends JsonResource
{
Expand Down

0 comments on commit b718974

Please sign in to comment.