src/Config.php
public function modify(Container $di)
    {
        $specs = $di->lazyValue(self::HELPER_SPECS);
        $specs = $specs();
        if (! $specs) {
            return;
        }

        $helpers = $di->get(self::HELPER_LOCATOR);
        $resolve = $di->newResolutionHelper();

        foreach ($specs as $key => $spec) {

            $factory = function () use ($resolve, $spec) {
                return $resolve($spec);
            };

            $helpers->set($key, $factory);
        }
    }
public function modify(Container $di)
    {
        $specs = $di->lazyValue(self::HELPER_SPECS);
        $specs = $specs();
        if (! $specs) {
            return;
        }

        $helpers = $di->get(self::HELPER_LOCATOR);
        $resolve = $di->newResolutionHelper();

        foreach ($specs as $key => $spec) {

            $factory = function () use ($resolve, $spec) {
                return $resolve($spec);
            };

            $helpers->set($key, $factory);
        }
    }
public function modify ( Container $ di ) { $ specs = $ di -> lazyValue ( self :: HELPER_SPECS ) ; $ specs = $ specs ( ) ; if ( ! $ specs ) { return ; } $ helpers = $ di -> get ( self :: HELPER_LOCATOR ) ; $ resolve = $ di -> newResolutionHelper ( ) ; foreach ( $ specs as $ key => $ spec ) { $ factory = function ( ) use ( $ resolve , $ spec ) { return $ resolve ( $ spec ) ; } ; $ helpers -> set ( $ key , $ factory ) ; } }
Define Add helpers

@param Container $di DI Container

@return void

@access public

@SuppressWarnings(PHPMD.ShortVariable)
Define Add helpers