equivalentTo() 공개 메소드

Returns whether this expression is logically equivalent to another expression.
public equivalentTo ( Webmozart\Expression\Expression $other ) : boolean
$other Webmozart\Expression\Expression Some expression.
리턴 boolean Returns `true` if the expressions are logically equivalent and `false` otherwise.
예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function equivalentTo(Expression $other)
 {
     if (get_class($this) !== get_class($other)) {
         return false;
     }
     /* @var Selector $other */
     return $this->expr->equivalentTo($other->expr);
 }
예제 #2
0
 /**
  * @dataProvider getNonEquivalentCriteria
  */
 public function testNonEquivalence(Expression $left, Expression $right)
 {
     $this->assertFalse($left->equivalentTo($right));
     $this->assertFalse($right->equivalentTo($left));
 }