| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 16 | public function test_store_default_no_name() | ||
| 17 |     { | ||
| 18 | /** @var Mock|CacheManager $manager */ | ||
| 19 | $manager = \Mockery::mock(CacheManager::class)->shouldAllowMockingProtectedMethods()->makePartial(); | ||
| 20 |         $manager->shouldReceive('getDefaultStore')->andReturn('default_value'); | ||
|  | |||
| 21 |         $manager->shouldReceive('getStore')->with('default_value')->andReturn(true); | ||
| 22 | |||
| 23 | self::assertTrue($manager->store(null)); | ||
| 24 | self::assertTrue($manager->store(0)); | ||
| 25 |         self::assertTrue($manager->store('')); | ||
| 26 | } | ||
| 27 | |||
| 40 | 
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: