These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Box plugin for HiDev |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/hidev-box |
||
6 | * @package hidev-box |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hidev\box\tests\unit\console; |
||
12 | |||
13 | use hidev\box\console\BoxJsonController; |
||
14 | |||
15 | /** |
||
16 | * Tests for BoxJsonController. |
||
17 | */ |
||
18 | class BoxJsonControllerTest extends \PHPUnit\Framework\TestCase |
||
19 | { |
||
20 | /** |
||
21 | * @var BoxJsonController |
||
22 | */ |
||
23 | protected $object; |
||
24 | |||
25 | protected function setUp() |
||
26 | { |
||
27 | $this->object = new BoxJsonController('box.json', null); |
||
0 ignored issues
–
show
|
|||
28 | } |
||
29 | |||
30 | protected function tearDown() |
||
31 | { |
||
32 | } |
||
33 | |||
34 | public function testConstructor() |
||
35 | { |
||
36 | $this->assertInstanceOf(\hidev\base\Controller::class, $this->object); |
||
37 | } |
||
38 | } |
||
39 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: