src/AbstractTask.php
protected function printInfo($msg, $data = null)
    {
        // pass-through when no 'name' found in data
        if ($data == null || !isset($data['name'])) {
            return $this->printTaskInfo($msg, $data);
        }

        // doubt someone will use this ever in data
        $key = 'print_task_info_name_replacement_macro';

        // replace 'name' with above key both in data
        // and in msg placeholders
        $data[$key] = $data['name'];
        unset($data['name']);
        $msg = str_replace('{name}', '{' . $key . '}', $msg);

        // print nice message
        $result = $this->printTaskInfo($msg, $data);

        return $result;
    }
protected function printInfo($msg, $data = null)
    {
        // pass-through when no 'name' found in data
        if ($data == null || !isset($data['name'])) {
            return $this->printTaskInfo($msg, $data);
        }

        // doubt someone will use this ever in data
        $key = 'print_task_info_name_replacement_macro';

        // replace 'name' with above key both in data
        // and in msg placeholders
        $data[$key] = $data['name'];
        unset($data['name']);
        $msg = str_replace('{name}', '{' . $key . '}', $msg);

        // print nice message
        $result = $this->printTaskInfo($msg, $data);

        return $result;
    }
protected function printInfo ( $ msg , $ data = null ) { // pass-through when no 'name' found in data if ( $ data == null || ! isset ( $ data [ 'name' ] ) ) { return $ this -> printTaskInfo ( $ msg , $ data ) ; } // doubt someone will use this ever in data $ key = 'print_task_info_name_replacement_macro' ; // replace 'name' with above key both in data // and in msg placeholders $ data [ $ key ] = $ data [ 'name' ] ; unset ( $ data [ 'name' ] ) ; $ msg = str_replace ( '{name}' , '{' . $ key . '}' , $ msg ) ; // print nice message $ result = $ this -> printTaskInfo ( $ msg , $ data ) ; return $ result ; }
A quick fix on printInfo, as it is not very friendly
when you use 'name' placeholders or even just have 'name'
set in the data
A quick fix on printInfo as it is not very friendly when you use name placeholders or even just have name set in the data