public static function getExecMethod(string $type) : string
    {
        $valid = ['php' => 'executePhpAction', 'cli' => 'executeCliAction'];

        if (!isset($valid[$type])) {
            throw new RuntimeException('invalid action type: ' . $type);
        }
        return $valid[$type];
    }
public static function getExecMethod(string $type) : string
    {
        $valid = ['php' => 'executePhpAction', 'cli' => 'executeCliAction'];

        if (!isset($valid[$type])) {
            throw new RuntimeException('invalid action type: ' . $type);
        }
        return $valid[$type];
    }
public static function getExecMethod ( string $ type ) : string { $ valid = [ 'php' => 'executePhpAction' , 'cli' => 'executeCliAction' ] ; if ( ! isset ( $ valid [ $ type ] ) ) { throw new RuntimeException ( 'invalid action type: ' . $ type ) ; } return $ valid [ $ type ] ; }
Return the right method name to execute an action

@param  string $type
@return string
Return the right method name to execute an action