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

@@ 258-271 (lines=14) @@
255
    /**
256
     * Return the name of the last parameter if it holds the options.
257
     */
258
    public function optionParamName()
259
    {
260
        // Remember the name of the last parameter, if it holds the options.
261
        // We will use this information to ignore @param annotations for the options.
262
        if (!isset($this->optionParamName)) {
263
            $this->optionParamName = '';
264
            $options = $this->commandInfo->options();
265
            if (!$options->isEmpty()) {
266
                $this->optionParamName = $this->lastParameterName();
267
            }
268
        }
269
270
        return $this->optionParamName;
271
    }
272
273
    protected function interpretDefaultValue($defaultValue)
274
    {