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.

SHOUTCLOUD.php ➔ UPCASE()   A
last analyzed

Complexity

Conditions 4
Paths 6

Size

Total Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
nc 6
nop 2
dl 0
loc 30
rs 9.44
c 0
b 0
f 0
1
<?php
2
3
namespace SHOUTCLOUD;
4
5
use GuzzleHttp\Client;
6
7
/**
8
 * CAPS LOCK IS CRUISE CONTROL FOR COOL.
9
 *
10
 * @throws \SHOUTCLOUD\Exception IF THE SHOUTCLOUD API BROKE
11
 * @param string $input
12
 * @param Client $client
13
 * @return string
14
 */
15
function UPCASE($input = null, Client $client = null)
16
{
17
    // BUILD AN HTTP CLIENT IF ONE WASN'T PROVIDED FOR TESTING.
18
    if (is_null($client)) {
19
        $client = new Client(
20
            [
21
                'base_uri' => 'http://API.SHOUTCLOUD.IO',
22
                'headers' => [
23
                    'Content-Type' => 'application/json',
24
                ],
25
            ]
26
        );
27
    }
28
29
    // CHUMP DON'T WANT THE HELP CHUMP DON'T GET THE HELP.
30
    if (empty($input)) {
31
        return $input;
32
    }
33
34
    $options = ['body' => json_encode(['INPUT' => $input])];
35
36
    // THIS IS WHY WE HAVE THE INTERNET.
37
    try {
38
        $response = $client->request('post', '/V1/SHOUT', $options)->getBody()->getContents();
39
    } catch (\Exception $e) {
40
        throw new Exception($e->getMessage(), $e->getCode(), $e);
41
    }
42
43
    return json_decode($response)->OUTPUT;
44
}
45