DriverAbstract::setDestination()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
namespace NotificationChannels\Gammu\Drivers;
4
5
use NotificationChannels\Gammu\Exceptions\CouldNotSendNotification;
6
7
abstract class DriverAbstract implements DriverInterface
8
{
9
    const PACKAGE = 'LNC-Gammu';
10
11
    const VERSION = '0.0.8';
12
13
    public $destination;
14
15
    public $content;
16
17
    public function send($phoneNumber, $content, $sender = null, $callback = null)
18
    {
19
    }
20
21 21
    public function getSignature()
22
    {
23 21
        return self::PACKAGE.'/'.self::VERSION;
24
    }
25
26
    public function setDestination($phoneNumber)
27
    {
28
        if (empty($phoneNumber)) {
29
            throw CouldNotSendNotification::destinationNotProvided();
30
        }
31
32
        return $this;
33
    }
34
35
    public function getDestination()
36
    {
37
    }
38
39
    public function setContent($content)
40
    {
41
        if (empty($content)) {
42
            throw CouldNotSendNotification::contentNotProvided();
43
        }
44
45
        return $this;
46
    }
47
48
    public function getContent()
49
    {
50
    }
51
}
52