Passed
Pull Request — master (#54)
by
unknown
10:07
created

InvalidOperationException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Swaggest\JsonDiff;
4
5
6
use Throwable;
7
8
class InvalidOperationException extends Exception
9
{
10
    private string $invalidOperation;
11
12
    public function __construct(
13
        string    $invalidOperation,
14
        string    $message = '',
15
        int       $code = 0,
16
        Throwable $previous = null
17
    )
18
    {
19
        parent::__construct($message, $code, $previous);
20
        $this->invalidOperation = $invalidOperation;
21
    }
22
23
    public function getInvalidOperation(): string
24
    {
25
        return $this->invalidOperation;
26
    }
27
}