public static function read($file, $force = false) {
        if (!is_readable($file)) {
            if ($force === true) {
                return [];
            } else {
                throw new Exception(sprintf(
                    'Unable to read file "%s"',
                    $file
                ), ExitApp::RUNTIME_ERROR);
            }
        }

        $fileContent = file_get_contents($file);

        if ($fileContent === false) {
            throw new Exception(sprintf(
                'Unable to read file "%s"',
                $file
            ), ExitApp::RUNTIME_ERROR);
        }

        $result = json_decode(
            trim($fileContent),
            true
        );

        if ($result === false) {
            throw new Exception(sprintf(
                'File "%s" contains invalid JSON data.',
                ExitApp::RUNTIME_ERROR
            ));
        }

        return $result;
    }