Code Duplication    Length = 7-10 lines in 2 locations

src/Parser/Internal/BespokeDocBlockParser.php 2 locations

@@ 86-95 (lines=10) @@
83
    /**
84
     * Store the data from a @arg annotation in our argument descriptions.
85
     */
86
    protected function processArgumentTag($tag)
87
    {
88
        if (!$tag->hasVariable($matches)) {
89
            throw new \Exception('Could not determine parameter name from tag ' . (string)$tag);
90
        }
91
        if ($matches['variable'] == $this->optionParamName()) {
92
            return;
93
        }
94
        $this->addOptionOrArgumentTag($tag, $this->commandInfo->arguments(), $matches['variable'], $matches['description']);
95
    }
96
97
    /**
98
     * Store the data from an @option annotation in our option descriptions.
@@ 100-106 (lines=7) @@
97
    /**
98
     * Store the data from an @option annotation in our option descriptions.
99
     */
100
    protected function processOptionTag($tag)
101
    {
102
        if (!$tag->hasVariable($matches)) {
103
            throw new \Exception('Could not determine parameter name from tag ' . (string)$tag);
104
        }
105
        $this->addOptionOrArgumentTag($tag, $this->commandInfo->options(), $matches['variable'], $matches['description']);
106
    }
107
108
    protected function addOptionOrArgumentTag($tag, DefaultsWithDescriptions $set, $name, $description)
109
    {