private function injectModuleDependencies($moduleName, DependsOnModule $module)
    {
        $this->checkForMissingDependencies($moduleName, $module);

        if (!method_exists($module, '_inject')) {
            throw new ModuleException($module, 'Module requires method _inject to be defined to accept dependencies');
        }

        $dependencies = array_map(function ($dependency) {
            return $this->create($dependency, false);
        }, $this->getConfiguredDependencies($moduleName));

        call_user_func_array([$module, '_inject'], $dependencies);
    }
private function injectModuleDependencies($moduleName, DependsOnModule $module)
    {
        $this->checkForMissingDependencies($moduleName, $module);

        if (!method_exists($module, '_inject')) {
            throw new ModuleException($module, 'Module requires method _inject to be defined to accept dependencies');
        }

        $dependencies = array_map(function ($dependency) {
            return $this->create($dependency, false);
        }, $this->getConfiguredDependencies($moduleName));

        call_user_func_array([$module, '_inject'], $dependencies);
    }
private function injectModuleDependencies ( $ moduleName , DependsOnModule $ module ) { $ this -> checkForMissingDependencies ( $ moduleName , $ module ) ; if ( ! method_exists ( $ module , '_inject' ) ) { throw new ModuleException ( $ module , 'Module requires method _inject to be defined to accept dependencies' ) ; } $ dependencies = array_map ( function ( $ dependency ) { return $ this -> create ( $ dependency , false ) ; } , $ this -> getConfiguredDependencies ( $ moduleName ) ) ; call_user_func_array ( [ $ module , '_inject' ] , $ dependencies ) ; }
Inject the dependencies of a module.

@param string $moduleName
@param \Codeception\Lib\Interfaces\DependsOnModule $module
@throws \Codeception\Exception\ModuleException
@throws \Codeception\Exception\ModuleRequireException
Inject the dependencies of a module .