protected function doExecute()
    {
        if ($this->io->getOption('h')) {
            return $this->help();
        }

        $this->tag = $tag = $this->io->getOption('t') ?: $this->io->getOption('tag');

        $branch = $this->io->getOption('b') ?: $this->io->getOption('branch', 'test');

        $force = $this->io->getOption('f') ?: $this->io->getOption('force', false);

        $force = $force ? ' -f' : false;

        if ($this->tag && !$this->io->getOption('no-replace')) {
            $this->replaceDocblockTags();
        }

        $this->branch = $branch;

        $this->exec('git fetch origin');

        $this->exec('git branch -D ' . $branch);

        $this->exec('git checkout -b ' . $branch);

        $this->exec('git merge master');

        if ($this->tag) {
            $this->exec('git tag -d ' . $tag);

            $this->exec('git push origin :refs/tags/' . $tag);

            $this->exec('git tag ' . $tag);

            $this->exec(sprintf('git push origin %s' . $force, $this->tag));
        }

        $this->exec(sprintf('git push origin %s %s:%s master:master' . $force, $tag, $branch, $branch));

        $allows = $this->io->getArguments();

        foreach ($this->subtrees as $subtree => $namespace) {
            if ($allows && !in_array($subtree, $allows)) {
                continue;
            }

            $this->splitTree($subtree, $namespace);
        }

        $this->exec('git checkout master');

        $this->out()->out('Split finish.');

        return true;
    }
protected function doExecute()
    {
        if ($this->io->getOption('h')) {
            return $this->help();
        }

        $this->tag = $tag = $this->io->getOption('t') ?: $this->io->getOption('tag');

        $branch = $this->io->getOption('b') ?: $this->io->getOption('branch', 'test');

        $force = $this->io->getOption('f') ?: $this->io->getOption('force', false);

        $force = $force ? ' -f' : false;

        if ($this->tag && !$this->io->getOption('no-replace')) {
            $this->replaceDocblockTags();
        }

        $this->branch = $branch;

        $this->exec('git fetch origin');

        $this->exec('git branch -D ' . $branch);

        $this->exec('git checkout -b ' . $branch);

        $this->exec('git merge master');

        if ($this->tag) {
            $this->exec('git tag -d ' . $tag);

            $this->exec('git push origin :refs/tags/' . $tag);

            $this->exec('git tag ' . $tag);

            $this->exec(sprintf('git push origin %s' . $force, $this->tag));
        }

        $this->exec(sprintf('git push origin %s %s:%s master:master' . $force, $tag, $branch, $branch));

        $allows = $this->io->getArguments();

        foreach ($this->subtrees as $subtree => $namespace) {
            if ($allows && !in_array($subtree, $allows)) {
                continue;
            }

            $this->splitTree($subtree, $namespace);
        }

        $this->exec('git checkout master');

        $this->out()->out('Split finish.');

        return true;
    }
protected function doExecute ( ) { if ( $ this -> io -> getOption ( 'h' ) ) { return $ this -> help ( ) ; } $ this -> tag = $ tag = $ this -> io -> getOption ( 't' ) ? : $ this -> io -> getOption ( 'tag' ) ; $ branch = $ this -> io -> getOption ( 'b' ) ? : $ this -> io -> getOption ( 'branch' , 'test' ) ; $ force = $ this -> io -> getOption ( 'f' ) ? : $ this -> io -> getOption ( 'force' , false ) ; $ force = $ force ? ' -f' : false ; if ( $ this -> tag && ! $ this -> io -> getOption ( 'no-replace' ) ) { $ this -> replaceDocblockTags ( ) ; } $ this -> branch = $ branch ; $ this -> exec ( 'git fetch origin' ) ; $ this -> exec ( 'git branch -D ' . $ branch ) ; $ this -> exec ( 'git checkout -b ' . $ branch ) ; $ this -> exec ( 'git merge master' ) ; if ( $ this -> tag ) { $ this -> exec ( 'git tag -d ' . $ tag ) ; $ this -> exec ( 'git push origin :refs/tags/' . $ tag ) ; $ this -> exec ( 'git tag ' . $ tag ) ; $ this -> exec ( sprintf ( 'git push origin %s' . $ force , $ this -> tag ) ) ; } $ this -> exec ( sprintf ( 'git push origin %s %s:%s master:master' . $ force , $ tag , $ branch , $ branch ) ) ; $ allows = $ this -> io -> getArguments ( ) ; foreach ( $ this -> subtrees as $ subtree => $ namespace ) { if ( $ allows && ! in_array ( $ subtree , $ allows ) ) { continue ; } $ this -> splitTree ( $ subtree , $ namespace ) ; } $ this -> exec ( 'git checkout master' ) ; $ this -> out ( ) -> out ( 'Split finish.' ) ; return true ; }
Method to run this application.

@return  boolean
Method to run this application .