DriverAbstract   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 12.5%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 1
dl 0
loc 45
ccs 2
cts 16
cp 0.125
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A send() 0 3 1
A getSignature() 0 4 1
A setDestination() 0 8 2
A getDestination() 0 3 1
A setContent() 0 8 2
A getContent() 0 3 1
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