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
Push — v0 ( e38f63...c79c1c )
by Jason
03:46 queued 01:45
created

CorsServiceProvider::determineAllowedMethods()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 3

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 9
nc 3
nop 1
crap 3
1
<?php
2
3
namespace JDesrosiers\Silex\Provider;
4
5
use Silex\Application;
6
use Silex\ServiceProviderInterface;
7
8
/**
9
 * The CORS service provider provides a `cors` service that a can be included in your project as application middleware.
10
 */
11
class CorsServiceProvider implements ServiceProviderInterface
12
{
13
    /**
14
     * Add OPTIONS method support for all routes
15
     *
16
     * @param Application $app
17
     */
18 18
    public function boot(Application $app)
19
    {
20 18
        $app->options("{route}", new OptionsController())
21 18
            ->assert("route", ".+");
22 18
    }
23
24
    /**
25
     * Register the cors function and set defaults
26
     *
27
     * @param Application $app
28
     */
29 18
    public function register(Application $app)
30
    {
31 18
        $app["cors.allowOrigin"] = "*"; // Defaults to all
32 18
        $app["cors.allowMethods"] = null; // Defaults to all
33 18
        $app["cors.maxAge"] = null;
34 18
        $app["cors.allowCredentials"] = null;
35 18
        $app["cors.exposeHeaders"] = null;
36
37 18
        $app["cors"] = $app->protect(new Cors($app));
38 18
    }
39
}
40