protected function findLine($key)
    {
        $parsedKey   = null;
        $parsedValue = null;

        foreach ($this->lines as $index => $line) {
            $parseOk = $this->parseEnvLine($line, $parsedKey, $parsedValue);
            if ($parseOk && $key === $parsedKey) {
                return $index;
            }
        }

        return -1;
    }