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 ( 072bc6...f2b09a )
by Maurice
02:08
created

FileError::getErrorMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * The file that handles parsing error events
4
 *
5
 * @package         Obfuscator
6
 * @subpackage      Obfuscator
7
 */
8
9
namespace Naneau\Obfuscator\Obfuscator\Event;
10
11
use Symfony\Component\EventDispatcher\Event;
12
use Naneau\Obfuscator\Obfuscator\Event\File;
13
14
/**
15
 * FileError
16
 *
17
 * The file being obfuscated that causes an error
18
 *
19
 * @category        Naneau
20
 * @package         Obfuscator
21
 * @subpackage      Obfuscator
22
 */
23
class FileError extends File
24
{
25
    /**
26
     * The error message from Exception
27
     * @var string
28
     **/
29
    private $errorMessage;
30
31
    /**
32
     * Constructor
33
     *
34
     * @param string $file
35
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
36
     **/
37
    public function __construct($file, $errorMessage)
38
    {
39
        parent::setFile($file);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (setFile() instead of __construct()). Are you sure this is correct? If so, you might want to change this to $this->setFile().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
40
        $this->errorMessage = $errorMessage;
41
    }
42
43
    /**
44
     * Get the error message
45
     *
46
     * @return string
47
     */
48
    public function getErrorMessage()
49
    {
50
        return $this->errorMessage;
51
    }
52
}
53