src/Facter/CommandProvider.php
public function getFacts()
    {
        try {
            $output = $this->runCommand($this->cmd);
            if ($this->as_json) {
                $json = json_decode($output, true);
                if (is_null($json)) {
                    return array();
                }

                return $json;
            } else {
                return $this->parseFacts($output);
            }
        } catch (\Exception $e) {
            return array();
        }
    }
public function getFacts()
    {
        try {
            $output = $this->runCommand($this->cmd);
            if ($this->as_json) {
                $json = json_decode($output, true);
                if (is_null($json)) {
                    return array();
                }

                return $json;
            } else {
                return $this->parseFacts($output);
            }
        } catch (\Exception $e) {
            return array();
        }
    }
Return the facts generated from the command.
If as_json is true, the command must produce valid json.