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 ( f8863b...48fd44 )
by Sergey
04:48
created

Factory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 66.67%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 45
wmc 5
lcom 0
cbo 6
ccs 8
cts 12
cp 0.6667
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A createEncoder() 0 7 1
A createHeadersChecker() 0 4 1
A createEnvironment() 0 4 1
A createRequest() 0 4 1
A createQueryParametersParser() 0 4 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 1
    public function createHeadersChecker(CodecMatcherInterface $codecMatcher)
48
    {
49 1
        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
    public function createRequest(EnvironmentInterface $environment)
64
    {
65
        return new Request($environment);
66
    }
67
68
    /**
69
     * @inheritdoc
70
     */
71
    public function createQueryParametersParser()
72
    {
73
        return new QueryParametersParser();
74
    }
75
}
76