public function describeDifference($first, $second, $identical = false)
    {
        if ($identical) {
            if (! $this->isTypeMatch($first, $second)) {
                return sprintf(
                    'with type mismatch as [%s] does not match [%s]',
                    $this->describeValue($first),
                    $this->describeValue($second)
                );
            }
        }
        $type = $this->getType($first);
        if ($type === 'Unknown') {
            return 'with unknown type';
        }
        $method = 'describe' . $type . 'Difference';

        return $this->$method($first, $second, $identical);
    }
public function describeDifference($first, $second, $identical = false)
    {
        if ($identical) {
            if (! $this->isTypeMatch($first, $second)) {
                return sprintf(
                    'with type mismatch as [%s] does not match [%s]',
                    $this->describeValue($first),
                    $this->describeValue($second)
                );
            }
        }
        $type = $this->getType($first);
        if ($type === 'Unknown') {
            return 'with unknown type';
        }
        $method = 'describe' . $type . 'Difference';

        return $this->$method($first, $second, $identical);
    }
public function describeDifference ( $ first , $ second , $ identical = false ) { if ( $ identical ) { if ( ! $ this -> isTypeMatch ( $ first , $ second ) ) { return sprintf ( 'with type mismatch as [%s] does not match [%s]' , $ this -> describeValue ( $ first ) , $ this -> describeValue ( $ second ) ) ; } } $ type = $ this -> getType ( $ first ) ; if ( $ type === 'Unknown' ) { return 'with unknown type' ; } $ method = 'describe' . $ type . 'Difference' ; return $ this -> $ method ( $ first , $ second , $ identical ) ; }
Creates a human readable description of the difference between two variables.
Uses a dynamic call.

@param mixed $first        First variable.
@param mixed $second       Value to compare with.
@param bool $identical  If true then type anomolies count.

@return string             Description of difference.
Creates a human readable description of the difference between two variables . Uses a dynamic call .