Completed
Push — master ( f8f3cb...e8d4bf )
by Romain
9s
created

Push::response()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Kerox\Push;
4
5
class Push
6
{
7
8
    /**
9
     * @var AdapterInterface
10
     */
11
    protected $adapter;
12
13
    /**
14
     * Constructor.
15
     *
16
     * @param AdapterInterface $adapter The adapter
17
     */
18
    public function __construct(AdapterInterface $adapter)
19
    {
20
        $this->adapter = $adapter;
21
    }
22
23
    /**
24
     * Get the Adapter.
25
     *
26
     * @return AdapterInterface adapter
27
     */
28
    public function getAdapter()
29
    {
30
        return $this->adapter;
31
    }
32
33
    /**
34
     * Send a downstream message to one or more devices.
35
     *
36
     * @return bool
37
     */
38
    public function send()
39
    {
40
        return $this->getAdapter()->send();
41
    }
42
43
    /**
44
     * Return the response of the push.
45
     *
46
     * @return \Psr\Http\Message\ResponseInterface
47
     */
48
    public function response()
49
    {
50
        return $this->getAdapter()->response();
51
    }
52
}
53