UnvalidNotificationException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getNotification() 0 4 1
1
<?php
2
3
namespace Fenos\Notifynder\Exceptions;
4
5
use Exception;
6
use Fenos\Notifynder\Builder\Notification;
7
8
/**
9
 * Class UnvalidNotificationException.
10
 */
11
class UnvalidNotificationException extends Exception
12
{
13
    /**
14
     * @var Notification
15
     */
16
    public $notification;
17
18
    /**
19
     * UnvalidNotificationException constructor.
20
     * @param Notification $notification
21
     */
22
    public function __construct(Notification $notification)
23
    {
24
        parent::__construct('The given data failed to pass validation.');
25
26
        $this->notification = $notification;
27
    }
28
29
    /**
30
     * @return Notification
31
     */
32
    public function getNotification()
33
    {
34
        return $this->notification;
35
    }
36
}
37