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

InvalidOperationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInvalidOperation() 0 3 1
A __construct() 0 9 1
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
}