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

MissingFieldException::__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
use Throwable;
6
7
class MissingFieldException extends Exception
8
{
9
    private string $missingField;
10
11
    public function __construct(
12
        string    $invalidOperation,
13
        string    $message = '',
14
        int       $code = 0,
15
        Throwable $previous = null
16
    )
17
    {
18
        parent::__construct($message, $code, $previous);
19
        $this->missingField = $invalidOperation;
20
    }
21
22
    public function getMissingField(): string
23
    {
24
        return $this->missingField;
25
    }
26
}
27