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 — master ( 9ee3c2...6cf3d3 )
by Sergey
05:55
created

Factory::createQueryParametersParser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * This file is part of the reva2/jsonapi.
4
 *
5
 * (c) Sergey Revenko <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Reva2\JsonApi\Factories;
12
13
use Neomerx\JsonApi\Contracts\Codec\CodecMatcherInterface;
14
use Neomerx\JsonApi\Contracts\Schema\ContainerInterface;
15
use Neomerx\JsonApi\Encoder\EncoderOptions;
16
use Neomerx\JsonApi\Factories\Factory as BaseFactory;
17
use Reva2\JsonApi\Contracts\Factories\FactoryInterface;
18
use Reva2\JsonApi\Contracts\Services\EnvironmentInterface;
19
use Reva2\JsonApi\Encoder\Encoder;
20
use Reva2\JsonApi\Http\Headers\HeadersChecker;
21
use Reva2\JsonApi\Http\Query\QueryParametersParser;
22
use Reva2\JsonApi\Http\Request;
23
use Reva2\JsonApi\Services\Environment;
24
25
/**
26
 * JSON API factory
27
 *
28
 * @package Reva2\JsonApi\Factories
29
 * @author Sergey Revenko <[email protected]>
30
 */
31
class Factory extends BaseFactory implements FactoryInterface
32
{
33
    /**
34
     * @inheritdoc
35
     */
36 2
    public function createEncoder(ContainerInterface $container, EncoderOptions $encoderOptions = null)
37
    {
38 2
        $encoder = new Encoder($this, $container, $encoderOptions);
39 2
        $encoder->setLogger($this->logger);
40
41 2
        return $encoder;
42
    }
43
44
    /**
45
     * @inheritdoc
46
     */
47 4
    public function createHeadersChecker(CodecMatcherInterface $codecMatcher)
48
    {
49 4
        return new HeadersChecker($codecMatcher);
50
    }
51
52
    /**
53
     * @inheritdoc
54
     */
55 2
    public function createEnvironment(array $config = null)
56
    {
57 2
        return new Environment($config);
58
    }
59
60
    /**
61
     * @inheritdoc
62
     */
63 3
    public function createRequest(EnvironmentInterface $environment)
64
    {
65 3
        return new Request($environment);
66
    }
67
68
    /**
69
     * @inheritdoc
70
     */
71 2
    public function createQueryParametersParser()
72
    {
73 2
        return new QueryParametersParser();
74
    }
75
}
76