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.

Resource   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 55
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setName() 0 5 1
A getName() 0 4 1
A setSerializer() 0 5 1
1
<?php
2
namespace Solvire\API\JSONSchema;
3
4
use Solvire\API\Serializers\BaseSerializer;
5
6
/**
7
 * represents the CRUD on a resource
8
 * the ability to figure out what you can do to this resource.
9
 *
10
 *
11
 * @author solvire <[email protected]>
12
 * @package JSONSchema
13
 * @namespace Solvire\API\JSONSchema
14
 */
15
class Resource
16
{
17
18
    /**
19
     * pulled in from the API
20
     * every resource needs to have a serializer attached to it
21
     *
22
     * @var BaseSerializer
23
     */
24
    protected $serializer = null;
25
26
    /**
27
     * can either be the ID or some other unique name
28
     * 
29
     * @var string
30
     */
31
    protected $name = null;
32
33
    /**
34
     *
35
     * @param string $name            
36
     * @param BaseSerializer $serializers            
0 ignored issues
show
Documentation introduced by
There is no parameter named $serializers. Did you maybe mean $serializer?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
37
     */
38
    public function __construct($name = '', $serializer = null)
39
    {
40
        $this->name = $name;
41
        $this->setSerializer($serializer);
42
    }
43
44
    /**
45
     *
46
     * @param string $name            
47
     * @return \Solvire\API\JSONSchema\Resource
48
     */
49
    public function setName($name)
50
    {
51
        $this->name = $name;
52
        return $this;
53
    }
54
55
    /**
56
     *
57
     * @return string
58
     */
59
    public function getName()
60
    {
61
        return $this->name;
62
    }
63
64
    public function setSerializer(BaseSerializer $serializer)
65
    {
66
        $this->serializer = $serializer;
67
        return $this;
68
    }
69
}