Completed
Push — master ( 7e6ebb...3066b8 )
by Dwight
12s
created

ApnCredentials   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
c 2
b 1
f 0
lcom 1
cbo 1
dl 0
loc 49
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A environment() 0 4 1
A certificate() 0 4 1
A passPhrase() 0 4 1
1
<?php
2
3
namespace NotificationChannels\Apn;
4
5
use Illuminate\Contracts\Config\Repository;
6
7
class ApnCredentials
8
{
9
    /**
10
     * The config repository.
11
     *
12
     * @var \Illuminate\Contracts\Config\Repository
13
     */
14
    protected $config;
15
16
    /**
17
     * Create a new instance of the credentials.
18
     *
19
     * @param  \Illuminate\Contracts\Config\Repository
20
     */
21 6
    public function __construct(Repository $config)
22
    {
23 6
        $this->config = $config;
24 6
    }
25
26
    /**
27
     * Get the APN environment.
28
     *
29
     * @return string
30
     */
31 4
    public function environment()
32
    {
33 4
        return $this->config->get('broadcasting.connections.apn.environment');
34
    }
35
36
    /**
37
     * Get the APN certificate..
38
     *
39
     * @return string
40
     */
41 4
    public function certificate()
42
    {
43 4
        return $this->config->get('broadcasting.connections.apn.certificate');
44
    }
45
46
    /**
47
     * Get the APN pass phrase.
48
     *
49
     * @return string
50
     */
51 4
    public function passPhrase()
52
    {
53 4
        return $this->config->get('broadcasting.connections.apn.pass_phrase');
54
    }
55
}
56