InvalidOptionException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 8
loc 8
ccs 0
cts 8
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
crap 2
1
<?php
2
namespace Disque\Command\Argument;
3
4
use Disque\Command\CommandInterface;
5
6
class InvalidOptionException extends InvalidCommandArgumentException
7
{
8 View Code Duplication
    public function __construct(CommandInterface $command, array $options)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
    {
10
        parent::__construct($command, $options);
11
        $this->message = sprintf("Invalid command options. Options for command %1s: %2s",
12
            get_class($command),
13
            json_encode($options)
14
        );
15
    }
16
}