Completed
Push — master ( f565ee...0c9187 )
by
unknown
06:37
created
includes/CrossCheck/Comparer/DataValueComparer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @return bool
20 20
 	 */
21
-	public function canCompare( DataValue $value, DataValue $comparativeValue );
21
+	public function canCompare(DataValue $value, DataValue $comparativeValue);
22 22
 
23 23
 	/**
24 24
 	 * Runs the comparison of two DataValues.
@@ -28,6 +28,6 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @return string One of the ComparisonResult::STATUS_... constants.
30 30
 	 */
31
-	public function compare( DataValue $value, DataValue $comparativeValue );
31
+	public function compare(DataValue $value, DataValue $comparativeValue);
32 32
 
33 33
 }
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/DataValueComparerFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @param TermIndex $termIndex
27 27
 	 * @param StringNormalizer $stringNormalizer
28 28
 	 */
29
-	public function __construct( TermIndex $termIndex, StringNormalizer $stringNormalizer ) {
29
+	public function __construct(TermIndex $termIndex, StringNormalizer $stringNormalizer) {
30 30
 		$this->termIndex = $termIndex;
31 31
 		$this->stringNormalizer = $stringNormalizer;
32 32
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * @return StringComparer
69 69
 	 */
70 70
 	private function newStringComparer() {
71
-		return new StringComparer( $this->stringNormalizer );
71
+		return new StringComparer($this->stringNormalizer);
72 72
 	}
73 73
 
74 74
 	/**
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/DispatchingDataValueComparer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 	/**
21 21
 	 * @param DataValueComparer[] $dataValueComparers
22 22
 	 */
23
-	public function __construct( array $dataValueComparers = array() ) {
24
-		$this->assertAreDataValueComparer( $dataValueComparers );
23
+	public function __construct(array $dataValueComparers = array()) {
24
+		$this->assertAreDataValueComparer($dataValueComparers);
25 25
 		$this->dataValueComparers = $dataValueComparers;
26 26
 	}
27 27
 
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @throws InvalidArgumentException
32 32
 	 */
33
-	protected function assertAreDataValueComparer( array $dataValueComparers ) {
34
-		foreach ( $dataValueComparers as $dataValueComparer ) {
35
-			if ( !is_object( $dataValueComparer ) || !( $dataValueComparer instanceof DataValueComparer ) ) {
33
+	protected function assertAreDataValueComparer(array $dataValueComparers) {
34
+		foreach ($dataValueComparers as $dataValueComparer) {
35
+			if (!is_object($dataValueComparer) || !($dataValueComparer instanceof DataValueComparer)) {
36 36
 				throw new InvalidArgumentException(
37 37
 					'All $dataValueComparers need to implement the DataValueComparer interface'
38 38
 				);
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 *
49 49
 	 * @return bool
50 50
 	 */
51
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
52
-		foreach ( $this->dataValueComparers as $dataValueComparer ) {
53
-			if ( $dataValueComparer->canCompare( $value, $comparativeValue ) ) {
51
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
52
+		foreach ($this->dataValueComparers as $dataValueComparer) {
53
+			if ($dataValueComparer->canCompare($value, $comparativeValue)) {
54 54
 				return true;
55 55
 			}
56 56
 		}
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 	 * @throws InvalidArgumentException
68 68
 	 * @return string One of the ComparisonResult::STATUS_... constants.
69 69
 	 */
70
-	public function compare( DataValue $value, DataValue $comparativeValue ) {
71
-		foreach ( $this->dataValueComparers as $dataValueComparer ) {
72
-			if ( $dataValueComparer->canCompare( $value, $comparativeValue ) ) {
73
-				return $dataValueComparer->compare( $value, $comparativeValue );
70
+	public function compare(DataValue $value, DataValue $comparativeValue) {
71
+		foreach ($this->dataValueComparers as $dataValueComparer) {
72
+			if ($dataValueComparer->canCompare($value, $comparativeValue)) {
73
+				return $dataValueComparer->compare($value, $comparativeValue);
74 74
 			}
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php 1 patch
Spacing   +8 added lines, -8 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
 		/**
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 		$extLat = $comparativeValue->getLatitude();
40 40
 		$extLong = $comparativeValue->getLongitude();
41 41
 
42
-		$diffLat = abs( $locLat - $extLat );
43
-		$diffLong = abs( $locLong - $extLong );
44
-		if ( ( $diffLat <= $precision ) && ( $diffLong <= $precision ) ) {
42
+		$diffLat = abs($locLat - $extLat);
43
+		$diffLong = abs($locLong - $extLong);
44
+		if (($diffLat <= $precision) && ($diffLong <= $precision)) {
45 45
 			return ComparisonResult::STATUS_MATCH;
46 46
 		}
47 47
 
48 48
 		$daumen = $precision;
49
-		if ( ( $diffLat <= pi() * $daumen ) && ( $diffLong <= pi() * $daumen ) ) {
49
+		if (($diffLat <= pi() * $daumen) && ($diffLong <= pi() * $daumen)) {
50 50
 			return ComparisonResult::STATUS_PARTIAL_MATCH;
51 51
 		}
52 52
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @param DataValue $comparativeValue
61 61
 	 * @return bool
62 62
 	 */
63
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
63
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
64 64
 		return $value instanceof GlobeCoordinateValue && $comparativeValue instanceof GlobeCoordinateValue;
65 65
 	}
66 66
 
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/MonolingualTextValueComparer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	/**
23 23
 	 * @param StringComparer $stringComparer
24 24
 	 */
25
-	public function __construct( StringComparer $stringComparer ) {
25
+	public function __construct(StringComparer $stringComparer) {
26 26
 		$this->stringComparer = $stringComparer;
27 27
 	}
28 28
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @throws InvalidArgumentException
36 36
 	 * @return string|null One of the ComparisonResult::STATUS_... constants.
37 37
 	 */
38
-	public function compare( DataValue $value, DataValue $comparativeValue ) {
39
-		if ( !$this->canCompare( $value, $comparativeValue ) ) {
40
-			throw new InvalidArgumentException( 'Given values can not be compared using this comparer.' );
38
+	public function compare(DataValue $value, DataValue $comparativeValue) {
39
+		if (!$this->canCompare($value, $comparativeValue)) {
40
+			throw new InvalidArgumentException('Given values can not be compared using this comparer.');
41 41
 		}
42 42
 
43 43
 		/**
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 		 * @var MonolingualTextValue $comparativeValue
46 46
 		 */
47 47
 
48
-		if ( $value->getLanguageCode() === $comparativeValue->getLanguageCode() ) {
49
-			return $this->stringComparer->compare( $value->getText(), $comparativeValue->getText() );
48
+		if ($value->getLanguageCode() === $comparativeValue->getLanguageCode()) {
49
+			return $this->stringComparer->compare($value->getText(), $comparativeValue->getText());
50 50
 		}
51 51
 
52 52
 		return null;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * @param DataValue $comparativeValue
60 60
 	 * @return bool
61 61
 	 */
62
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
62
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
63 63
 		return $value instanceof MonolingualTextValue && $comparativeValue instanceof MonolingualTextValue;
64 64
 	}
65 65
 
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/MultilingualTextValueComparer.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	/**
23 23
 	 * @param StringComparer $stringComparer
24 24
 	 */
25
-	public function __construct( StringComparer $stringComparer ) {
25
+	public function __construct(StringComparer $stringComparer) {
26 26
 		$this->stringComparer = $stringComparer;
27 27
 	}
28 28
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @throws InvalidArgumentException
36 36
 	 * @return string|null One of the ComparisonResult::STATUS_... constants.
37 37
 	 */
38
-	public function compare( DataValue $value, DataValue $comparativeValue ) {
39
-		if ( !$this->canCompare( $value, $comparativeValue ) ) {
40
-			throw new InvalidArgumentException( 'Given values can not be compared using this comparer.' );
38
+	public function compare(DataValue $value, DataValue $comparativeValue) {
39
+		if (!$this->canCompare($value, $comparativeValue)) {
40
+			throw new InvalidArgumentException('Given values can not be compared using this comparer.');
41 41
 		}
42 42
 
43 43
 		/**
@@ -47,21 +47,21 @@  discard block
 block discarded – undo
47 47
 
48 48
 		$texts = $value->getTexts();
49 49
 		$comparativeTexts = $comparativeValue->getTexts();
50
-		$commonLanguages = array_intersect( array_keys( $texts ), array_keys( $comparativeTexts ) );
50
+		$commonLanguages = array_intersect(array_keys($texts), array_keys($comparativeTexts));
51 51
 
52
-		if ( $commonLanguages ) {
52
+		if ($commonLanguages) {
53 53
 			$totalResult = ComparisonResult::STATUS_MISMATCH;
54 54
 
55
-			foreach ( $commonLanguages as $language ) {
55
+			foreach ($commonLanguages as $language) {
56 56
 				$monolingualText = $texts[$language];
57 57
 				$comparativeMonolingualText = $comparativeTexts[$language];
58 58
 
59
-				$result = $this->stringComparer->compare( $monolingualText->getText(), $comparativeMonolingualText->getText() );
60
-				if ( $result !== ComparisonResult::STATUS_MISMATCH ) {
59
+				$result = $this->stringComparer->compare($monolingualText->getText(), $comparativeMonolingualText->getText());
60
+				if ($result !== ComparisonResult::STATUS_MISMATCH) {
61 61
 					$totalResult = $result;
62 62
 
63 63
 					// FIXME: This reports a partial match in a single language as a full match!
64
-					if ( $result === ComparisonResult::STATUS_MATCH ) {
64
+					if ($result === ComparisonResult::STATUS_MATCH) {
65 65
 						break;
66 66
 					}
67 67
 				}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @param DataValue $comparativeValue
81 81
 	 * @return bool
82 82
 	 */
83
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
83
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
84 84
 		return $value instanceof MultilingualTextValue && $comparativeValue instanceof MultilingualTextValue;
85 85
 	}
86 86
 
Please login to merge, or discard this patch.
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
 		}
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param DataValue $comparativeValue
50 50
 	 * @return bool
51 51
 	 */
52
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
52
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
53 53
 		return $value instanceof QuantityValue && $comparativeValue instanceof QuantityValue;
54 54
 	}
55 55
 
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/StringComparer.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	/**
27 27
 	 * @param StringNormalizer $stringNormalizer
28 28
 	 */
29
-	public function __construct( StringNormalizer $stringNormalizer ) {
29
+	public function __construct(StringNormalizer $stringNormalizer) {
30 30
 		$this->stringNormalizer = $stringNormalizer;
31 31
 	}
32 32
 
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 	 * @param string $comparativeValue
38 38
 	 * @return string
39 39
 	 */
40
-	public function compare( $value, $comparativeValue ) {
41
-		Assert::parameterType( 'string', $value, '$value' );
42
-		Assert::parameterType( 'string', $comparativeValue, '$comparativeValue' );
40
+	public function compare($value, $comparativeValue) {
41
+		Assert::parameterType('string', $value, '$value');
42
+		Assert::parameterType('string', $comparativeValue, '$comparativeValue');
43 43
 
44
-		$value = $this->cleanDataString( $value );
45
-		$comparativeValue = $this->cleanDataString( $comparativeValue );
44
+		$value = $this->cleanDataString($value);
45
+		$comparativeValue = $this->cleanDataString($comparativeValue);
46 46
 
47
-		if ( $value === $comparativeValue ) {
47
+		if ($value === $comparativeValue) {
48 48
 			return ComparisonResult::STATUS_MATCH;
49
-		} elseif ( $this->checkSimilarity( $value, $comparativeValue ) ) {
49
+		} elseif ($this->checkSimilarity($value, $comparativeValue)) {
50 50
 			return ComparisonResult::STATUS_PARTIAL_MATCH;
51 51
 		} else {
52 52
 			return ComparisonResult::STATUS_MISMATCH;
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
 	 * @param array $comparativeValues
61 61
 	 * @return string
62 62
 	 */
63
-	public function compareWithArray( $value, array $comparativeValues ) {
64
-		Assert::parameterType( 'string', $value, '$value' );
65
-		Assert::parameterElementType( 'string', $comparativeValues, '$comparativeValues' );
63
+	public function compareWithArray($value, array $comparativeValues) {
64
+		Assert::parameterType('string', $value, '$value');
65
+		Assert::parameterElementType('string', $comparativeValues, '$comparativeValues');
66 66
 
67
-		$value = $this->cleanDataString( $value );
68
-		$comparativeValues = $this->cleanDataArray( $comparativeValues );
67
+		$value = $this->cleanDataString($value);
68
+		$comparativeValues = $this->cleanDataArray($comparativeValues);
69 69
 
70
-		if ( in_array( $value, $comparativeValues ) ) {
70
+		if (in_array($value, $comparativeValues)) {
71 71
 			return ComparisonResult::STATUS_MATCH;
72 72
 		}
73 73
 
74
-		foreach ( $comparativeValues as $comparativeValue ) {
75
-			if ( $this->checkSimilarity( $comparativeValue, $value ) ) {
74
+		foreach ($comparativeValues as $comparativeValue) {
75
+			if ($this->checkSimilarity($comparativeValue, $value)) {
76 76
 				return ComparisonResult::STATUS_PARTIAL_MATCH;
77 77
 			}
78 78
 		}
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 	 * @param string $comparativeValue
88 88
 	 * @return bool
89 89
 	 */
90
-	private function checkSimilarity( $value, $comparativeValue ) {
90
+	private function checkSimilarity($value, $comparativeValue) {
91 91
 		return
92
-			$this->percentagePrefixSimilarity( $value, $comparativeValue ) > self::SIMILARITY_THRESHOLD ||
93
-			$this->percentageSuffixSimilarity( $value, $comparativeValue ) > self::SIMILARITY_THRESHOLD ||
94
-			$this->percentageLevenshteinDistance( $value, $comparativeValue ) > self::SIMILARITY_THRESHOLD;
92
+			$this->percentagePrefixSimilarity($value, $comparativeValue) > self::SIMILARITY_THRESHOLD ||
93
+			$this->percentageSuffixSimilarity($value, $comparativeValue) > self::SIMILARITY_THRESHOLD ||
94
+			$this->percentageLevenshteinDistance($value, $comparativeValue) > self::SIMILARITY_THRESHOLD;
95 95
 	}
96 96
 
97 97
 	/**
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
 	 *
102 102
 	 * @return string
103 103
 	 */
104
-	private function cleanDataString( $value ) {
105
-		$value = $this->stringNormalizer->trimToNFC( $value );
104
+	private function cleanDataString($value) {
105
+		$value = $this->stringNormalizer->trimToNFC($value);
106 106
 
107
-		return mb_strtolower( $value );
107
+		return mb_strtolower($value);
108 108
 	}
109 109
 
110 110
 	/**
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @return array
116 116
 	 */
117
-	private function cleanDataArray( array $array ) {
117
+	private function cleanDataArray(array $array) {
118 118
 
119 119
 		return array_map(
120
-			array( $this, 'cleanDataString' ),
120
+			array($this, 'cleanDataString'),
121 121
 			$array );
122 122
 	}
123 123
 
@@ -129,19 +129,19 @@  discard block
 block discarded – undo
129 129
 	 *
130 130
 	 * @return float
131 131
 	 */
132
-	private function percentagePrefixSimilarity( $value, $comparativeValue ) {
132
+	private function percentagePrefixSimilarity($value, $comparativeValue) {
133 133
 		$prefixLength = 0; // common prefix length
134
-		$localLength = strlen( $value );
135
-		$externalLength = strlen( $comparativeValue );
136
-		while ( $prefixLength < min( $localLength, $externalLength ) ) {
134
+		$localLength = strlen($value);
135
+		$externalLength = strlen($comparativeValue);
136
+		while ($prefixLength < min($localLength, $externalLength)) {
137 137
 			$c = $value[$prefixLength];
138
-			if ( $externalLength > $prefixLength && $comparativeValue[$prefixLength] !== $c ) {
138
+			if ($externalLength > $prefixLength && $comparativeValue[$prefixLength] !== $c) {
139 139
 				break;
140 140
 			}
141 141
 			$prefixLength++;
142 142
 		}
143 143
 
144
-		return $prefixLength / max( $localLength, $externalLength );
144
+		return $prefixLength / max($localLength, $externalLength);
145 145
 	}
146 146
 
147 147
 	/**
@@ -152,19 +152,19 @@  discard block
 block discarded – undo
152 152
 	 *
153 153
 	 * @return float
154 154
 	 */
155
-	private function percentageSuffixSimilarity( $value, $comparativeValue ) {
155
+	private function percentageSuffixSimilarity($value, $comparativeValue) {
156 156
 		$suffixLength = 0; // common suffix length
157
-		$localLength = strlen( $value );
158
-		$externalLength = strlen( $comparativeValue );
159
-		while ( $suffixLength < min( $localLength, $externalLength ) ) {
157
+		$localLength = strlen($value);
158
+		$externalLength = strlen($comparativeValue);
159
+		while ($suffixLength < min($localLength, $externalLength)) {
160 160
 			$c = $value[$localLength - 1 - $suffixLength];
161
-			if ( $externalLength > $suffixLength && $comparativeValue[$externalLength - 1 - $suffixLength] !== $c ) {
161
+			if ($externalLength > $suffixLength && $comparativeValue[$externalLength - 1 - $suffixLength] !== $c) {
162 162
 				break;
163 163
 			}
164 164
 			$suffixLength++;
165 165
 		}
166 166
 
167
-		return $suffixLength / max( $localLength, $externalLength );
167
+		return $suffixLength / max($localLength, $externalLength);
168 168
 	}
169 169
 
170 170
 	/**
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @return float
177 177
 	 */
178
-	private function percentageLevenshteinDistance( $value, $comparativeValue ) {
179
-		$distance = levenshtein( $value, $comparativeValue );
180
-		$percentage = 1.0 - $distance / max( strlen( $value ), strlen( $comparativeValue ) );
178
+	private function percentageLevenshteinDistance($value, $comparativeValue) {
179
+		$distance = levenshtein($value, $comparativeValue);
180
+		$percentage = 1.0 - $distance / max(strlen($value), strlen($comparativeValue));
181 181
 
182 182
 		return $percentage;
183 183
 	}
Please login to merge, or discard this patch.
includes/CrossCheck/Comparer/StringValueComparer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	/**
22 22
 	 * @param StringComparer $stringComparer
23 23
 	 */
24
-	public function __construct( StringComparer $stringComparer ) {
24
+	public function __construct(StringComparer $stringComparer) {
25 25
 		$this->stringComparer = $stringComparer;
26 26
 	}
27 27
 
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 	 * @throws InvalidArgumentException
35 35
 	 * @return string One of the ComparisonResult::STATUS_... constants.
36 36
 	 */
37
-	public function compare( DataValue $value, DataValue $comparativeValue ) {
38
-		if ( !$this->canCompare( $value, $comparativeValue ) ) {
39
-			throw new InvalidArgumentException( 'Given values can not be compared using this comparer.' );
37
+	public function compare(DataValue $value, DataValue $comparativeValue) {
38
+		if (!$this->canCompare($value, $comparativeValue)) {
39
+			throw new InvalidArgumentException('Given values can not be compared using this comparer.');
40 40
 		}
41 41
 
42
-		return $this->stringComparer->compare( $value->getValue(), $comparativeValue->getValue() );
42
+		return $this->stringComparer->compare($value->getValue(), $comparativeValue->getValue());
43 43
 	}
44 44
 
45 45
 	/**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param DataValue $comparativeValue
50 50
 	 * @return bool
51 51
 	 */
52
-	public function canCompare( DataValue $value, DataValue $comparativeValue ) {
52
+	public function canCompare(DataValue $value, DataValue $comparativeValue) {
53 53
 		return $value instanceof StringValue && $comparativeValue instanceof StringValue;
54 54
 	}
55 55
 
Please login to merge, or discard this patch.