Passed
Push — master ( 7c85b2...443a3c )
by Andrey
03:17
created

MessageIsNotCompleteException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIntercomMessage() 0 3 1
A __construct() 0 9 1
1
<?php
2
/**
3
 * @link      http://horoshop.ua
4
 * @copyright Copyright (c) 2015-2018 Horoshop TM
5
 * @author    Andrey Telesh <[email protected]>
6
 */
7
8
namespace FtwSoft\NotificationChannels\Intercom\Exceptions;
9
10
11
use FtwSoft\NotificationChannels\Intercom\IntercomMessage;
12
use Throwable;
13
14
class MessageIsNotCompleteException extends IntercomException
15
{
16
    /**
17
     * @var IntercomMessage
18
     */
19
    private $intercomMessage;
20
21
    /**
22
     * MessageIsNotCompleteException constructor.
23
     *
24
     * @param IntercomMessage $intercomMessage
25
     * @param string          $message
26
     * @param int             $code
27
     * @param Throwable|null  $previous
28
     */
29
    public function __construct(
30
        IntercomMessage $intercomMessage,
31
        string $message = "",
32
        int $code = 0,
33
        Throwable $previous = null
34
    ) {
35
        $this->intercomMessage = $intercomMessage;
36
37
        parent::__construct($message, $code, $previous);
38
    }
39
40
    /**
41
     * @return IntercomMessage
42
     */
43
    public function getIntercomMessage(): IntercomMessage
44
    {
45
        return $this->intercomMessage;
46
    }
47
48
49
}