GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#36)
by Dwight
03:22
created

ApnCredentials::environment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace NotificationChannels\Apn;
4
5
use Illuminate\Contracts\Config\Repository;
6
7
class ApnCredentials
8
{
9
    /**
10
     * Create a new instance of the credentials.
11
     *
12
     * @param  \Illuminate\Contracts\Config\Repository
13
     */
14
    public function __construct(Repository $config)
15
    {
16
        $this->config = $config;
0 ignored issues
show
Bug introduced by
The property config does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
17
    }
18
19
    /**
20
     * Get the APN environment.
21
     *
22
     * @return string
23
     */
24
    public function environment()
25
    {
26
        return $this->config->get('broadcasting.connections.apn.environment');
27
    }
28
29
    /**
30
     * Get the APN certificate..
31
     *
32
     * @return string
33
     */
34
    public function certificate()
35
    {
36
        return $this->config->get('broadcasting.connections.apn.certificate');
37
    }
38
39
    /**
40
     * Get the APN pass phrase.
41
     *
42
     * @return string
43
     */
44
    public function passPhrase()
45
    {
46
        return $this->config->get('broadcasting.connections.apn.pass_phrase');
47
    }
48
}
49