Passed
Push — master ( 8f2c7f...261aac )
by Anatoliy
01:58
created

DenyUseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: danchukas
5
 * Date: 2017-07-15 01:17
6
 */
7
8
namespace DanchukAS\DenyMultiplyRunTest;
9
10
use PHPUnit\Framework\TestCase;
11
12
class DenyUseTest extends TestCase
13
{
14
    /**
15
     * @expectedException \Error
16
     */
17
    function testConstructor()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
Comprehensibility Best Practice introduced by
It is recommend to declare an explicit visibility for testConstructor.

Generally, we recommend to declare visibility for all methods in your source code. This has the advantage of clearly communication to other developers, and also yourself, how this method should be consumed.

If you are not sure which visibility to choose, it is a good idea to start with the most restrictive visibility, and then raise visibility as needed, i.e. start with private, and only raise it to protected if a sub-class needs to have access, or public if an external class needs access.

Loading history...
18
    {
19
        // Because not founded how disable inspection "Call to private from invalid context" for phpstorm.
20
        //new $class; new DenyMultiplyRun;
21
        $class = "DenyMultiplyRun";
22
        new $class;
23
    }
24
25
}
26