Code Duplication    Length = 7-10 lines in 2 locations

src/Parser/Internal/BespokeDocBlockParser.php 2 locations

@@ 114-123 (lines=10) @@
111
    /**
112
     * Store the data from a @arg annotation in our argument descriptions.
113
     */
114
    protected function processArgumentTag($tag)
115
    {
116
        if (!$tag->hasVariable($matches)) {
117
            throw new \Exception('Could not determine argument name from tag ' . (string)$tag);
118
        }
119
        if ($matches['variable'] == $this->optionParamName()) {
120
            return;
121
        }
122
        $this->addOptionOrArgumentTag($tag, $this->commandInfo->arguments(), $matches['variable'], $matches['description']);
123
    }
124
125
    /**
126
     * Store the data from an @option annotation in our option descriptions.
@@ 128-134 (lines=7) @@
125
    /**
126
     * Store the data from an @option annotation in our option descriptions.
127
     */
128
    protected function processOptionTag($tag)
129
    {
130
        if (!$tag->hasVariable($matches)) {
131
            throw new \Exception('Could not determine option name from tag ' . (string)$tag);
132
        }
133
        $this->addOptionOrArgumentTag($tag, $this->commandInfo->options(), $matches['variable'], $matches['description']);
134
    }
135
136
    protected function addOptionOrArgumentTag($tag, DefaultsWithDescriptions $set, $name, $description)
137
    {