Completed
Push — master ( 750378...0b3415 )
by
unknown
06:46
created
includes/CrossCheck/Comparer/QuantityValueComparer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	 * @throws InvalidArgumentException
24 24
 	 * @return string One of the ComparisonResult::STATUS_... constants.
25 25
 	 */
26
-	public function compare( DataValue $value, DataValue $comparativeValue ) {
27
-		if ( !$this->canCompare( $value, $comparativeValue ) ) {
28
-			throw new InvalidArgumentException( 'Given values can not be compared using this comparer.' );
26
+	public function compare(DataValue $value, DataValue $comparativeValue) {
27
+		if (!$this->canCompare($value, $comparativeValue)) {
28
+			throw new InvalidArgumentException('Given values can not be compared using this comparer.');
29 29
 		}
30 30
 
31 31
 		/**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 		 * @var QuantityValue $comparativeValue
34 34
 		 */
35 35
 
36
-		if ( $comparativeValue->getLowerBound()->compare( $value->getUpperBound() ) <= 0 &&
37
-			$comparativeValue->getUpperBound()->compare( $value->getLowerBound() ) >= 0
36
+		if ($comparativeValue->getLowerBound()->compare($value->getUpperBound()) <= 0 &&
37
+			$comparativeValue->getUpperBound()->compare($value->getLowerBound()) >= 0
38 38
 		) {
39 39
 			return ComparisonResult::STATUS_MATCH;
40 40
 		}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 *
51 51
 	 * @return bool
52 52
 	 */
53
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
53
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
54 54
 		return $value instanceof QuantityValue && $comparativeValue instanceof QuantityValue;
55 55
 	}
56 56
 
Please login to merge, or discard this patch.