Completed
Pull Request — master (#8)
by Romain
04:20
created

InvalidNotificationException::invalidArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace ker0x\Push\Adapter\Fcm\Message\Exception;
3
4
class InvalidNotificationException extends AbstractException
5
{
6
7
    /**
8
     * Display if the color is not in #rrggbb format.
9
     *
10
     * @return static
11
     */
12
    public static function invalidColor()
13
    {
14
        return new static("The color must be expressed in #rrggbb format.");
15
    }
16
17
    /**
18
     * Display if key `title` is missing.
19
     *
20
     * @return static
21
     */
22
    public static function invalidArray()
23
    {
24
        return new static("Notification array must contain at least a key 'title'.");
25
    }
26
}
27