Code Duplication    Length = 14-14 lines in 2 locations

src/Parser/Internal/AbstractCommandDocBlockParser.php 1 location

@@ 187-200 (lines=14) @@
184
    /**
185
     * Return the name of the last parameter if it holds the options.
186
     */
187
    public function optionParamName()
188
    {
189
        // Remember the name of the last parameter, if it holds the options.
190
        // We will use this information to ignore @param annotations for the options.
191
        if (!isset($this->optionParamName)) {
192
            $this->optionParamName = '';
193
            $options = $this->commandInfo->options();
194
            if (!$options->isEmpty()) {
195
                $this->optionParamName = $this->lastParameterName();
196
            }
197
        }
198
199
        return $this->optionParamName;
200
    }
201
202
    /**
203
     * Store the data from a @param annotation in our argument descriptions.

src/Parser/Internal/BespokeDocBlockParser.php 1 location

@@ 271-284 (lines=14) @@
268
    /**
269
     * Return the name of the last parameter if it holds the options.
270
     */
271
    public function optionParamName()
272
    {
273
        // Remember the name of the last parameter, if it holds the options.
274
        // We will use this information to ignore @param annotations for the options.
275
        if (!isset($this->optionParamName)) {
276
            $this->optionParamName = '';
277
            $options = $this->commandInfo->options();
278
            if (!$options->isEmpty()) {
279
                $this->optionParamName = $this->lastParameterName();
280
            }
281
        }
282
283
        return $this->optionParamName;
284
    }
285
286
    protected function interpretDefaultValue($defaultValue)
287
    {