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.

MapperController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A generateAction() 0 9 1
1
<?php
2
3
namespace Newage\Annotations\Controller;
4
5
use Newage\Annotations\Entity\Annotation\AnnotationBuilderInterface;
6
use Newage\Annotations\Mapper\MapperBuilder;
7
use Zend\Console\ColorInterface as Color;
8
use Zend\Console\Adapter\AdapterInterface as Console;
9
use Zend\Mvc\Controller\AbstractConsoleController;
10
11
/**
12
 * @package Newage\Annotations\Controller
13
 */
14
class MapperController extends AbstractConsoleController
15
{
16
    /**
17
     * @var AnnotationBuilderInterface
18
     */
19
    private $annotationBuilder;
20
21
    /**
22
     * MapperController constructor.
23
     *
24
     * @param AnnotationBuilderInterface $annotationBuilder
25
     */
26
    public function __construct(AnnotationBuilderInterface $annotationBuilder)
27
    {
28
        $this->annotationBuilder = $annotationBuilder;
29
    }
30
    
31
    /**
32
     * Generate mapper file
33
     */
34
    public function generateAction()
35
    {
36
        /* @var $console Console */
37
        $console = $this->getServiceLocator()->get('console');
38
39
        $this->annotationBuilder->create();
40
41
        $console->writeLine('Map has been generated successful', Color::GREEN);
42
    }
43
}
44