public function execute(Config $config, IO $io, Repository $repository, Config\Action $action) : void
    {
        $class = $action->getAction();

        try {
            if ($this->isStaticMethodCall($class)) {
                $io->write($this->executeStatic($class));
            } else {
                $exe = $this->createAction($class);
                $exe->execute($config, $io, $repository, $action);
            }
        } catch (\Exception $e) {
            throw new ActionFailed('Execution failed: ' . $e->getMessage());
        } catch (\Error $e) {
            throw new ActionFailed('PHP Error:' . $e->getMessage());
        }
    }
public function execute(Config $config, IO $io, Repository $repository, Config\Action $action) : void
    {
        $class = $action->getAction();

        try {
            if ($this->isStaticMethodCall($class)) {
                $io->write($this->executeStatic($class));
            } else {
                $exe = $this->createAction($class);
                $exe->execute($config, $io, $repository, $action);
            }
        } catch (\Exception $e) {
            throw new ActionFailed('Execution failed: ' . $e->getMessage());
        } catch (\Error $e) {
            throw new ActionFailed('PHP Error:' . $e->getMessage());
        }
    }
public function execute ( Config $ config , IO $ io , Repository $ repository , Config \ Action $ action ) : void { $ class = $ action -> getAction ( ) ; try { if ( $ this -> isStaticMethodCall ( $ class ) ) { $ io -> write ( $ this -> executeStatic ( $ class ) ) ; } else { $ exe = $ this -> createAction ( $ class ) ; $ exe -> execute ( $ config , $ io , $ repository , $ action ) ; } } catch ( \ Exception $ e ) { throw new ActionFailed ( 'Execution failed: ' . $ e -> getMessage ( ) ) ; } catch ( \ Error $ e ) { throw new ActionFailed ( 'PHP Error:' . $ e -> getMessage ( ) ) ; } }
Execute the configured action.

@param  \CaptainHook\App\Config           $config
@param  \CaptainHook\App\Console\IO       $io
@param  \SebastianFeldmann\Git\Repository $repository
@param  \CaptainHook\App\Config\Action    $action
@return void
@throws \CaptainHook\App\Exception\ActionFailed
Execute the configured action .