comparison vendor/symfony/css-selector/Node/Specificity.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
46 } 46 }
47 47
48 /** 48 /**
49 * @return self 49 * @return self
50 */ 50 */
51 public function plus(Specificity $specificity) 51 public function plus(self $specificity)
52 { 52 {
53 return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c); 53 return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c);
54 } 54 }
55 55
56 /** 56 /**
67 * Returns -1 if the object specificity is lower than the argument, 67 * Returns -1 if the object specificity is lower than the argument,
68 * 0 if they are equal, and 1 if the argument is lower. 68 * 0 if they are equal, and 1 if the argument is lower.
69 * 69 *
70 * @return int 70 * @return int
71 */ 71 */
72 public function compareTo(Specificity $specificity) 72 public function compareTo(self $specificity)
73 { 73 {
74 if ($this->a !== $specificity->a) { 74 if ($this->a !== $specificity->a) {
75 return $this->a > $specificity->a ? 1 : -1; 75 return $this->a > $specificity->a ? 1 : -1;
76 } 76 }
77 77