| 1 | <?php  | 
            ||
| 10 | final class PhpcrContext implements Context  | 
            ||
| 11 | { | 
            ||
| 12 | /**  | 
            ||
| 13 | * @var DocumentManagerInterface  | 
            ||
| 14 | */  | 
            ||
| 15 | private $documentManager;  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @var InitializerManager  | 
            ||
| 19 | */  | 
            ||
| 20 | private $initializerManager;  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @param DocumentManagerInterface $documentManager  | 
            ||
| 24 | * @param InitializerManager $initializerManager  | 
            ||
| 25 | */  | 
            ||
| 26 | public function __construct(DocumentManagerInterface $documentManager, InitializerManager $initializerManager)  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * @BeforeScenario  | 
            ||
| 34 | */  | 
            ||
| 35 | public function purgeAndInitializeDatabase()  | 
            ||
| 44 | }  | 
            ||
| 45 | 
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: