public function parse(array $arguments)
    {
        $preparedArguments = [];
        $argumentsLength = count($arguments);

        for ($i = 1; $i < $argumentsLength; $i++) {
            $currentArgument = $arguments[$i];
            if (substr($currentArgument, 0, 2) === '--') { // Value option
                $name = substr($currentArgument, 2);

                if (strpos($name, '=') !== false) {
                    list($name, $value) = explode('=', $name);
                } elseif ($this->nextElementIsValueElement($arguments, $i, $argumentsLength)) {
                    $i += 1;

                    $value = $arguments[$i];
                } else {
                    $value = true;
                }
                $preparedArguments[$name] = $value;
            } elseif ($currentArgument[0] === '-') { // Flag option
                $preparedArguments[substr($currentArgument, 1)] = true;
            } else {
                $preparedArguments['path'] = $currentArgument;
            }
        }

        return $preparedArguments;
    }