/** * 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; }
/** * 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; }
/** * 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; }
/** * Compare to another schema * * @param var $value * @return int */ public function compareTo($value) { return $value instanceof self ? Objects::compare($this->definition, $value->definition) : 1; }
/** * 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); }
/** * 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; }
public function compare_objects($a, $b, $expected) { $this->assertEquals($expected, Objects::compare(new ValueObject($a), new ValueObject($b))); }
public function compare_arrays($a, $b, $expected) { $this->assertEquals($expected, Objects::compare($a, $b)); }