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

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