Exemplo n.º 1
0
 /**
  * Compares this links to a given value
  *
  * @param  var $value
  * @return int
  */
 public function compareTo($value)
 {
     if ($value instanceof self) {
         return 0 === ($p = strcmp($this->uri, $value->uri)) ? Objects::compare($this->params, $value->params) : $p;
     }
     return 1;
 }
Exemplo n.º 2
0
 /**
  * Compares a given value to this
  *
  * @param  var $value
  * @return int
  */
 public function compareTo($value)
 {
     return $value instanceof self ? Objects::compare($this, $value) : self::$NOT_INSTANCE;
 }
Exemplo n.º 3
0
 /**
  * Compares a value to this config instance
  *
  * @param  var $value
  * @return int
  */
 public function compareTo($value)
 {
     return $value instanceof self ? Objects::compare($this->sources, $value->sources) : 1;
 }
Exemplo n.º 4
0
 /**
  * Compare to another schema
  *
  * @param  var $value
  * @return int
  */
 public function compareTo($value)
 {
     return $value instanceof self ? Objects::compare($this->definition, $value->definition) : 1;
 }
Exemplo n.º 5
0
 /**
  * Returns whether a given value is equal to this value
  *
  * @param  var $cmp
  * @return bool
  */
 public function compareTo($cmp)
 {
     return Objects::compare($this->value, $cmp->value);
 }
Exemplo n.º 6
0
 /**
  * Returns whether another value is equal to this
  *
  * @param  var $value
  * @return int
  */
 public function compareTo($value)
 {
     return $value instanceof self ? Objects::compare($this->backing, $value->backing) : 1;
 }
Exemplo n.º 7
0
 public function compare_objects($a, $b, $expected)
 {
     $this->assertEquals($expected, Objects::compare(new ValueObject($a), new ValueObject($b)));
 }
Exemplo n.º 8
0
 public function compare_arrays($a, $b, $expected)
 {
     $this->assertEquals($expected, Objects::compare($a, $b));
 }