Test Failed
Push — master ( d22b28...1d6b64 )
by Vladimir
04:45
created

Test::testCases()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the `tvi/monitor-bundle` project.
4
 *
5
 * (c) https://github.com/turnaev/monitor-bundle/graphs/contributors
6
 *
7
 * For the full copyright and license information, please view the LICENSE.md
8
 * file that was distributed with this source code.
9
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
10
11
namespace Tvi\MonitorBundle\Check\DoctrineMigration;
12
13
use PHPUnit\Framework\TestCase;
14
use ZendDiagnostics\Result\ResultInterface;
15
use Tvi\MonitorBundle\Check\CheckInterface;
16
17
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
18
 * @author Vladimir Turnaev <[email protected]>
19
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
20
class Test extends TestCase
21
{
22
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
23
     * @var Check
24
     */
25
    protected $checker;
26
27
    public function setUp()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function setUp()
Loading history...
28
    {
29
        $this->checker = new Check();
0 ignored issues
show
Bug introduced by
The call to Tvi\MonitorBundle\Check\...on\Check::__construct() has too few arguments starting with migrationConfiguration. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
        $this->checker = /** @scrutinizer ignore-call */ new Check();

This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
30
    }
31
32
    public function testCheck()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function testCheck()
Loading history...
33
    {
34
        $this->assertInstanceOf(CheckInterface::class, $this->checker);
35
        $this->assertInstanceOf(ResultInterface::class, $this->checker->check());
36
    }
37
}
38