PHPUnitFacade::__callStatic()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace UnicadeAssert;
4
5 View Code Duplication
class PHPUnitFacade extends \PHPUnit_Framework_Assert
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    protected function fire($methodName, $args)
8
    {
9
        if (method_exists(__CLASS__, $methodName)) {
10
            return call_user_func_array(array(__CLASS__, $methodName), $args);
11
        }
12
13
        throw new \BadMethodCallException();
14
    }
15
16
    public static function __callStatic($methodName, array $args)
17
    {
18
        return $this->fire($methodName, $args);
0 ignored issues
show
Bug introduced by
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
19
    }
20
}
21