GracefulDeath\LastWill::ensureItIsPossibleToApply PHP Method

ensureItIsPossibleToApply() private method

    private function ensureItIsPossibleToApply()
    {
        if (!$this->options['captureOutput']) {
            return;
        }
        foreach ([$this->stdoutFilePath, $this->stderrFilePath] as $fileToWrite) {
            $availableSpaceOnDevice = disk_free_space(dirname($fileToWrite));
            if ($availableSpaceOnDevice < self::ENOUGH_FREE_SPACE_IN_BYTES) {
                throw new Exception("Unable to capture output, " . "not enough free space on device for file '{$fileToWrite}'");
            }
        }
    }