Completed
Push — master ( 0d4684...fff311 )
by Chris
01:24
created

FcmOptions   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 44
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getAnalyticsLabel() 0 4 1
A setAnalyticsLabel() 0 6 1
A create() 0 4 1
A toArray() 0 6 1
1
<?php
2
3
namespace NotificationChannels\Fcm\Resources;
4
5
class FcmOptions implements FcmResource
6
{
7
    /**
8
     * @var string|null
9
     */
10
    protected $analyticsLabel;
11
12
    /**
13
     * @return string|null
14
     */
15
    public function getAnalyticsLabel(): ?string
16
    {
17
        return $this->analyticsLabel;
18
    }
19
20
    /**
21
     * @param string|null $analyticsLabel
22
     * @return FcmOptions
23
     */
24
    public function setAnalyticsLabel(?string $analyticsLabel): self
25
    {
26
        $this->analyticsLabel = $analyticsLabel;
27
28
        return $this;
29
    }
30
31
    /**
32
     * @return static
33
     */
34
    public static function create(): self
35
    {
36
        return new self;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function toArray(): array
43
    {
44
        return [
45
            'analytics_label' => $this->getAnalyticsLabel(),
46
        ];
47
    }
48
}
49