@@ -37,7 +37,7 @@ |
||
37 | 37 | $name = $name[0]; |
38 | 38 | } else { |
39 | 39 | if ($name[1] !== $className) { |
40 | - $name = $name[1] . '::' . $name[2]; |
|
40 | + $name = $name[1].'::'.$name[2]; |
|
41 | 41 | } else { |
42 | 42 | $name = $name[2]; |
43 | 43 | } |
@@ -82,8 +82,8 @@ |
||
82 | 82 | $expected, |
83 | 83 | $actual, |
84 | 84 | // replace "Array" with "MyClass object" |
85 | - \substr_replace($e->getExpectedAsString(), \get_class($expected) . ' Object', 0, 5), |
|
86 | - \substr_replace($e->getActualAsString(), \get_class($actual) . ' Object', 0, 5), |
|
85 | + \substr_replace($e->getExpectedAsString(), \get_class($expected).' Object', 0, 5), |
|
86 | + \substr_replace($e->getActualAsString(), \get_class($actual).' Object', 0, 5), |
|
87 | 87 | false, |
88 | 88 | 'Failed asserting that two objects are equal.' |
89 | 89 | ); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | return ((\is_scalar($expected) xor null === $expected) && |
30 | 30 | (\is_scalar($actual) xor null === $actual)) |
31 | - // allow comparison between strings and objects featuring __toString() |
|
31 | + // allow comparison between strings and objects featuring __toString() |
|
32 | 32 | || (\is_string($expected) && \is_object($actual) && \method_exists($actual, '__toString')) |
33 | 33 | || (\is_object($expected) && \method_exists($expected, '__toString') && \is_string($actual)); |
34 | 34 | } |
@@ -123,6 +123,6 @@ |
||
123 | 123 | */ |
124 | 124 | public function toString() |
125 | 125 | { |
126 | - return $this->message . $this->getDiff(); |
|
126 | + return $this->message.$this->getDiff(); |
|
127 | 127 | } |
128 | 128 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public function testAcceptsSucceeds($expected, $actual): void |
128 | 128 | { |
129 | 129 | $this->assertTrue( |
130 | - $this->comparator->accepts($expected, $actual) |
|
130 | + $this->comparator->accepts($expected, $actual) |
|
131 | 131 | ); |
132 | 132 | } |
133 | 133 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function testAcceptsFails($expected, $actual): void |
138 | 138 | { |
139 | 139 | $this->assertFalse( |
140 | - $this->comparator->accepts($expected, $actual) |
|
140 | + $this->comparator->accepts($expected, $actual) |
|
141 | 141 | ); |
142 | 142 | } |
143 | 143 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | public function testAcceptsSucceeds($expected, $actual): void |
95 | 95 | { |
96 | 96 | $this->assertTrue( |
97 | - $this->comparator->accepts($expected, $actual) |
|
97 | + $this->comparator->accepts($expected, $actual) |
|
98 | 98 | ); |
99 | 99 | } |
100 | 100 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function testAcceptsFails($expected, $actual): void |
105 | 105 | { |
106 | 106 | $this->assertFalse( |
107 | - $this->comparator->accepts($expected, $actual) |
|
107 | + $this->comparator->accepts($expected, $actual) |
|
108 | 108 | ); |
109 | 109 | } |
110 | 110 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function testAcceptsSucceeds(): void |
120 | 120 | { |
121 | 121 | $this->assertTrue( |
122 | - $this->comparator->accepts([], []) |
|
122 | + $this->comparator->accepts([], []) |
|
123 | 123 | ); |
124 | 124 | } |
125 | 125 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public function testAcceptsFails($expected, $actual): void |
130 | 130 | { |
131 | 131 | $this->assertFalse( |
132 | - $this->comparator->accepts($expected, $actual) |
|
132 | + $this->comparator->accepts($expected, $actual) |
|
133 | 133 | ); |
134 | 134 | } |
135 | 135 |
@@ -27,16 +27,16 @@ discard block |
||
27 | 27 | $failure = new ComparisonFailure( |
28 | 28 | $expected, |
29 | 29 | $actual, |
30 | - '|' . $expected, |
|
31 | - '|' . $actual, |
|
30 | + '|'.$expected, |
|
31 | + '|'.$actual, |
|
32 | 32 | false, |
33 | 33 | $message |
34 | 34 | ); |
35 | 35 | |
36 | 36 | $this->assertSame($actual, $failure->getActual()); |
37 | 37 | $this->assertSame($expected, $failure->getExpected()); |
38 | - $this->assertSame('|' . $actual, $failure->getActualAsString()); |
|
39 | - $this->assertSame('|' . $expected, $failure->getExpectedAsString()); |
|
38 | + $this->assertSame('|'.$actual, $failure->getActualAsString()); |
|
39 | + $this->assertSame('|'.$expected, $failure->getExpectedAsString()); |
|
40 | 40 | |
41 | 41 | $diff = ' |
42 | 42 | --- Expected |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | +B |
48 | 48 | '; |
49 | 49 | $this->assertSame($diff, $failure->getDiff()); |
50 | - $this->assertSame($message . $diff, $failure->toString()); |
|
50 | + $this->assertSame($message.$diff, $failure->toString()); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | public function testDiffNotPossible(): void |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | public function testAcceptsSucceeds(): void |
90 | 90 | { |
91 | 91 | $this->assertTrue( |
92 | - $this->comparator->accepts( |
|
92 | + $this->comparator->accepts( |
|
93 | 93 | new SplObjectStorage, |
94 | 94 | new SplObjectStorage |
95 | - ) |
|
95 | + ) |
|
96 | 96 | ); |
97 | 97 | } |
98 | 98 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public function testAcceptsFails($expected, $actual): void |
103 | 103 | { |
104 | 104 | $this->assertFalse( |
105 | - $this->comparator->accepts($expected, $actual) |
|
105 | + $this->comparator->accepts($expected, $actual) |
|
106 | 106 | ); |
107 | 107 | } |
108 | 108 |