Completed
Pull Request — develop (#7)
by Romain
01:41
created

InvalidOptionsException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidTimeToLive() 0 4 1
A invalidPriority() 0 4 1
1
<?php
2
namespace ker0x\Push\Adapter\Fcm\Message\Exception;
3
4
class InvalidOptionsException extends AbstractException
5
{
6
7
    public static function invalidTimeToLive($value)
8
    {
9
        return new static(sprintf("Time to live must be between 0 and 2419200. Current value is: %s.", $value));
10
    }
11
12
    public static function invalidPriority()
13
    {
14
        return new static("Priority can be either 'normal' or 'high'.");
15
    }
16
}
17