Passed
Pull Request — master (#216)
by Viktor
03:05
created

NotEnvelopInterfaceException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Queue\Message;
6
7
use InvalidArgumentException;
8
use Throwable;
9
10
final class NotEnvelopInterfaceException extends InvalidArgumentException
11
{
12 1
    public function __construct(string $className = '', int $code = 0, ?Throwable $previous = null)
13
    {
14 1
        $message = sprintf(
15 1
            'The given class "%s" does not implement "%s".',
16 1
            $className,
17 1
            EnvelopeInterface::class
18 1
        );
19
20 1
        parent::__construct($message, $code, $previous);
21
    }
22
}
23