Completed
Branch develop (f935f6)
by Romain
01:43
created

AbstractException::mustBeString()   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 1
1
<?php
2
namespace ker0x\Push\Adapter\Fcm\Message\Exception;
3
4
use Exception;
5
6
abstract class AbstractException extends Exception
7
{
8
    public static function mustBeString($key)
9
    {
10
        return new static("{$key} must be a string.");
11
    }
12
13
    public static function mustBeBool($key)
14
    {
15
        return new static("{$key} must be a boolean.");
16
    }
17
18
    public static function mustBeInt($key)
19
    {
20
        return new static("{$key} must be a integer.");
21
    }
22
23
    public static function arrayEmpty()
24
    {
25
        return new static("Array can not be empty.");
26
    }
27
}