public function when(string $type, array $config = []): self
    {
        if (! isset($this->data['on'][$type])) {
            $this->data['on'][$type] = [];
        }

        $this->data['on'][$type] = \array_merge($this->data['on'][$type], $config);

        return $this;
    }
public function when(string $type, array $config = []): self
    {
        if (! isset($this->data['on'][$type])) {
            $this->data['on'][$type] = [];
        }

        $this->data['on'][$type] = \array_merge($this->data['on'][$type], $config);

        return $this;
    }
public function when ( string $ type , array $ config = [ ] ) : self { if ( ! isset ( $ this -> data [ 'on' ] [ $ type ] ) ) { $ this -> data [ 'on' ] [ $ type ] = [ ] ; } $ this -> data [ 'on' ] [ $ type ] = \ array_merge ( $ this -> data [ 'on' ] [ $ type ] , $ config ) ; return $ this ; }
Setup on format configuration.

@param  string  $type
@param  array   $config

@return $this
Setup on format configuration .