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.

AbstractAnnotation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 4
1
<?php
2
3
namespace Newage\Annotations\Entity\Annotation;
4
5
class AbstractAnnotation
6
{
7
    /**
8
     * @var mixed
9
     */
10
    protected $value;
11
12
    /**
13
     * Receive and process the contents of an annotation
14
     *
15
     * @param  array $data
16
     * @throws \Exception
17
     */
18
    public function __construct(array $data)
19
    {
20
        if (!isset($data['value']) || !is_array($data['value'])) {
21
            throw new \Exception(sprintf(
22
                '%s expects the annotation to define an array; received "%s"',
23
                get_class($this),
24
                isset($data['value']) ? gettype($data['value']) : 'null'
25
            ));
26
        }
27
        $this->value = $data['value'];
28
    }
29
}
30