Completed
Push — master ( 0b9828...d4544a )
by Mark
05:55
created

IonicPushMessage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 0
cbo 0
dl 0
loc 31
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 4 1
A toArray() 0 4 1
1
<?php
2
3
namespace NotificationChannels\IonicPushNotifications;
4
5
class IonicPushMessage
6
{
7
    /** @var array */
8
    protected $data;
9
10
    /**
11
     * @param array $data
12
     *
13
     * @return static
14
     */
15 2
    public static function create($data = [])
16
    {
17 2
        return new static($data);
18
    }
19
20
    /**
21
     * @param array $data
22
     */
23 2
    public function __construct($data = [])
24
    {
25 2
        $this->data = $data;
26 2
    }
27
28
    /**
29
     * @return array
30
     */
31 2
    public function toArray()
32
    {
33 2
        return $this->data;
34
    }
35
}
36