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.

Resourceful   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 27
ccs 8
cts 10
cp 0.8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 24 1
1
<?php
2
3
namespace JDesrosiers\Resourceful;
4
5
use JDesrosiers\Resourceful\JsonErrorHandler\JsonErrorHandler;
6
use JDesrosiers\Silex\Provider\ContentNegotiationServiceProvider;
7
use JDesrosiers\Silex\Provider\CorsServiceProvider;
8
use JDesrosiers\Silex\Provider\JsonSchemaServiceProvider;
9
use Silex\Application;
10
use Symfony\Component\Debug\ErrorHandler;
11
12
class Resourceful extends Application
13
{
14 18
    public function __construct($config = [])
15
    {
16 18
        parent::__construct($config);
17 18
        ErrorHandler::register();
18
19
        // JSON/REST application
20 18
        $this->register(new ContentNegotiationServiceProvider(), [
21 18
            "conneg.responseFormats" => ["json"],
22
            "conneg.requestFormats" => ["json"],
23
            "conneg.defaultFormat" => "json",
24
        ]);
25 18
        $this->register(new CorsServiceProvider());
26
27
        // JSON Schema application
28 18
        $this->register(new JsonSchemaServiceProvider());
29
30
        // Error Handling
31 18
        $this->error(new JsonErrorHandler($this));
32
33
        // CreateResourceController
34
        $this["uniqid"] = function () {
35
            return uniqid();
36
        };
37
    }
38
}
39