public function getValuesFromFile($file, $failOnMissing = true)
    {
        $result = [];

        if (!FileSystem::isFileReadable($file)) {
            if ($failOnMissing) {
                throw new RuntimeException("Path [$file] is not a readable file");
            }
            return $result;
        }

        $file = file($file);
        if (empty($file)) {
            return $result;
        }

        foreach ($file as $line) {
            $line = trim($line);
            if (!preg_match('#^(.*)?=(.*)?$#', $line, $matches)) {
                continue;
            }
            $result[$matches[1]] = $matches[2];
        }

        return $result;
    }