Locker\Repository\Statement\EloquentInserter::compareForConflict PHP Method

compareForConflict() public method

Throws Exceptions\Conflict if the two statements match.
public compareForConflict ( stdClass $statement_x, stdClass $statement_y )
$statement_x stdClass
$statement_y stdClass
    public function compareForConflict(\stdClass $statement_x, \stdClass $statement_y)
    {
        $matchable_x = $this->matchableStatement($statement_x);
        $matchable_y = $this->matchableStatement($statement_y);
        if ($matchable_x != $matchable_y) {
            $encoded_x = json_encode($statement_x);
            $encoded_y = json_encode($statement_y);
            throw new Exceptions\Conflict("Conflicts\r\n`{$encoded_x}`\r\n`{$encoded_y}`.");
        }
    }