These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\SearchBundle\Tests\DependencyInjection\Configuration; |
||
4 | |||
5 | use Kunstmaan\SearchBundle\Configuration\SearchConfigurationChain; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | |||
8 | class SearchConfigurationChainTest extends TestCase |
||
9 | { |
||
10 | public function testAddAndGetConfiguration() |
||
11 | { |
||
12 | $configuration = $this->createMock('Kunstmaan\SearchBundle\Configuration\SearchConfigurationInterface'); |
||
13 | |||
14 | $chain = new SearchConfigurationChain(); |
||
15 | $chain->addConfiguration($configuration, 'configuration'); |
||
0 ignored issues
–
show
|
|||
16 | |||
17 | $this->assertEquals($configuration, $chain->getConfiguration('configuration')); |
||
18 | $this->assertNotEmpty($chain->getConfigurations()); |
||
19 | $this->assertNull($chain->getConfiguration('youwontfindthis')); |
||
20 | } |
||
21 | } |
||
22 |
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: