Completed
Push — master ( 56566c...f8ca6f )
by Muhammad
06:54
created

DriverAbstract   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 3 Features 0
Metric Value
wmc 8
c 4
b 3
f 0
lcom 0
cbo 1
dl 0
loc 45
rs 10

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.2';
12
13
    public $destination;
14
15
    public $content;
16
17
    public function send($phoneNumber, $content, $sender = null)
18
    {
19
    }
20
21
    public function getSignature()
22
    {
23
        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