MessageIsNotCompleteException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.9332
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
namespace NotificationChannels\Intercom\Exceptions;
4
5
use NotificationChannels\Intercom\IntercomMessage;
6
use Throwable;
7
8
class MessageIsNotCompleteException extends IntercomException
9
{
10
    /**
11
     * @var IntercomMessage
12
     */
13
    private $intercomMessage;
14
15
    /**
16
     * @param IntercomMessage $intercomMessage
17
     * @param string          $message
18
     * @param int             $code
19
     * @param Throwable|null  $previous
20
     */
21 3
    public function __construct(
22
        IntercomMessage $intercomMessage,
23
        string $message = '',
24
        int $code = 0,
25
        ?Throwable $previous = null
26
    ) {
27 3
        $this->intercomMessage = $intercomMessage;
28
29 3
        parent::__construct($message, $code, $previous);
30 3
    }
31
32
    /**
33
     * @return IntercomMessage
34
     */
35 1
    public function getIntercomMessage(): IntercomMessage
36
    {
37 1
        return $this->intercomMessage;
38
    }
39
}
40