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.

PostCommandEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 5 5 1
A getCommand() 4 4 1
A getResponse() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
/**
4
 *
5
 * Copyright 2014 Simon Mönch.
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 APL\Event;
12
13
use APL\Command\CommandInterface;
14
use APL\Response\ResponseInterface;
15
use Symfony\Component\EventDispatcher\Event;
16
17 View Code Duplication
class PostCommandEvent extends Event
18
{
19
    /** @var CommandInterface */
20
    private $command;
21
22
    /** @var ResponseInterface */
23
    private $response;
24
25
    /**
26
     *
27
     * @param CommandInterface  $command
28
     * @param ResponseInterface $response
29
     */
30
    public function __construct(CommandInterface $command, ResponseInterface $response)
31
    {
32
        $this->command  = $command;
33
        $this->response = $response;
34
    }
35
36
    /**
37
     *
38
     * @return CommandInterface
39
     */
40
    public function getCommand()
41
    {
42
        return $this->command;
43
    }
44
45
    /**
46
     *
47
     * @return ResponseInterface
48
     */
49
    public function getResponse()
50
    {
51
        return $this->response;
52
    }
53
}
54