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.

lib.php ➔ getCloudWatchClient()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 18
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 12
nc 2
nop 1
dl 0
loc 18
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
use Aws\CloudWatch\CloudWatchClient;
4
5
function getCloudWatchClient($conf)
6
{
7
    if (isset($conf->aws->profil)) {
8
        return CloudWatchClient::factory(array(
0 ignored issues
show
Deprecated Code introduced by
The method Aws\AwsClient::factory() has been deprecated.

This method has been deprecated.

Loading history...
9
            'profil' => $conf->aws->profil,
10
            'region' => $conf->aws->region,
11
            'version' => '2010-08-01'
12
        ));
13
    }
14
    return CloudWatchClient::factory(array(
0 ignored issues
show
Deprecated Code introduced by
The method Aws\AwsClient::factory() has been deprecated.

This method has been deprecated.

Loading history...
15
        'credentials' => array (
16
            'key'    => $conf->aws->key,
17
            'secret' => $conf->aws->secret
18
        ),
19
        'region' => $conf->aws->region,
20
        'version' => '2010-08-01'
21
    ));
22
}
23
24
function getConfigFile()
25
{
26
    $longopts  = array(
27
      "required:"     // Valeur requise
28
    );
29
    if (array_key_exists('f', $args = getopt("f:", $longopts))) {
30
        return json_decode(file_get_contents($args['f']));
31
    }
32
    return json_decode(file_get_contents(APPLICATION_PATH.'/conf/config.json'));
33
}
34