protected function replaceSubTasks()
    {
        foreach ($this->tasks as $name => &$script) {
            $callback = function ($m) {
                return $m[1].$this->tasks[$m[2]];
            };

            $script = $this->trimSpaces(
                preg_replace_callback("/(\s*)@run\('(.*)'\)/", $callback, $script)
            );
        }
    }
protected function replaceSubTasks()
    {
        foreach ($this->tasks as $name => &$script) {
            $callback = function ($m) {
                return $m[1].$this->tasks[$m[2]];
            };

            $script = $this->trimSpaces(
                preg_replace_callback("/(\s*)@run\('(.*)'\)/", $callback, $script)
            );
        }
    }
protected function replaceSubTasks ( ) { foreach ( $ this -> tasks as $ name => & $ script ) { $ callback = function ( $ m ) { return $ m [ 1 ] . $ this -> tasks [ $ m [ 2 ] ] ; } ; $ script = $ this -> trimSpaces ( preg_replace_callback ( "/(\s*)@run\('(.*)'\)/" , $ callback , $ script ) ) ; } }
Replace all of the sub tasks and trim leading spaces.

@return void
Replace all of the sub tasks and trim leading spaces .