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.

Config   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 70%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 53
ccs 7
cts 10
cp 0.7
rs 10
c 1
b 1
f 0
wmc 3
lcom 2
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A set() 0 6 1
A getCommonData() 0 7 1
1
<?php
2
3
namespace SmsaSDK;
4
5
/**
6
 * Config
7
 * Configuration Repository for Smsa.
8
 */
9
class Config
10
{
11
    public static $config = [
12
        'wsdl_file_path'   => __DIR__.'/data/SMSA.wsdl',
13
        'smsa_testing_key' => 'my-smsa-test-key',
14
        'smsa_uri'         => 'http://track.smsaexpress.com/SECOM/SMSAwebService.asmx?wsdl',
15
    ];
16
17
    public static $commonData = [];
18
19
    /**
20
     * get
21
     * Get a configuration by it's key name.
22
     *
23
     * @param string $name
24
     *
25
     * @return
26
     */
27 5
    public static function get($name)
28
    {
29 5
        return static::$config[$name];
30
    }
31
32
    /**
33
     * set
34
     * Set a configuration name and value.
35
     *
36
     * @param string $name
37
     * @param mixed  $name
38
     *
39
     * @return $this
40
     */
41
    public static function set($name, $value)
42
    {
43
        static::$config[$name] = $value;
44
45
        return $this;
0 ignored issues
show
Bug introduced by
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
46
    }
47
48
    /**
49
     * getCommonData
50
     * Get common key-value pairs that's used as arguments in Smsa methods.
51
     *
52
     * @return array
53
     */
54 4
    public static function getCommonData()
55
    {
56 4
        return static::$commonData + [
57 4
            'passkey' => Smsa::getKey(),
58 4
            'passKey' => Smsa::getKey(),
59 4
        ];
60
    }
61
}
62