Completed
Push — master ( a8a226...edd472 )
by Tomas
01:14
created

ResolverFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace OneSignal\Resolver;
4
5
use OneSignal\Config;
6
7
class ResolverFactory
8
{
9
    private $config;
10
11
    public function __construct(Config $config)
12
    {
13
        $this->config = $config;
14
    }
15
16
    public function createAppResolver()
17
    {
18
        return new AppResolver();
19
    }
20
21
    public function createSegmentResolver()
22
    {
23
        return new SegmentResolver();
24
    }
25
26
    public function createDeviceSessionResolver()
27
    {
28
        return new DeviceSessionResolver();
29
    }
30
31
    public function createDevicePurchaseResolver()
32
    {
33
        return new DevicePurchaseResolver();
34
    }
35
36
    public function createDeviceFocusResolver()
37
    {
38
        return new DeviceFocusResolver();
39
    }
40
41
    public function createNewDeviceResolver()
42
    {
43
        return new DeviceResolver($this->config, true);
44
    }
45
46
    public function createExistingDeviceResolver()
47
    {
48
        return new DeviceResolver($this->config, false);
49
    }
50
51
    public function createNotificationResolver()
52
    {
53
        return new NotificationResolver($this->config);
54
    }
55
56
    public function createNotificationHistoryResolver()
57
    {
58
        return new NotificationHistoryResolver();
59
    }
60
}
61