src/Log.php
public function add($type, $data = [])
    {
        if ($this->type() === 'passed' && $type === 'failed') {
            $this->type('failed');
        }
        $data['type'] = $type;
        if (!isset($data['backtrace'])) {
            $data['backtrace'] = [];
        } else {
            $data['backtrace'] = Debugger::focus($this->block()->suite()->backtraceFocus(), $data['backtrace'], 1);
        }
        $child = new static($data + ['block' => $this->_block]);
        $this->_children[] = $child;
        return $child;
    }
public function add($type, $data = [])
    {
        if ($this->type() === 'passed' && $type === 'failed') {
            $this->type('failed');
        }
        $data['type'] = $type;
        if (!isset($data['backtrace'])) {
            $data['backtrace'] = [];
        } else {
            $data['backtrace'] = Debugger::focus($this->block()->suite()->backtraceFocus(), $data['backtrace'], 1);
        }
        $child = new static($data + ['block' => $this->_block]);
        $this->_children[] = $child;
        return $child;
    }
public function add ( $ type , $ data = [ ] ) { if ( $ this -> type ( ) === 'passed' && $ type === 'failed' ) { $ this -> type ( 'failed' ) ; } $ data [ 'type' ] = $ type ; if ( ! isset ( $ data [ 'backtrace' ] ) ) { $ data [ 'backtrace' ] = [ ] ; } else { $ data [ 'backtrace' ] = Debugger :: focus ( $ this -> block ( ) -> suite ( ) -> backtraceFocus ( ) , $ data [ 'backtrace' ] , 1 ) ; } $ child = new static ( $ data + [ 'block' => $ this -> _block ] ) ; $ this -> _children [ ] = $ child ; return $ child ; }
Adds an expectation report and emits a report event.

@param array $data The report data.
Adds an expectation report and emits a report event .