@@ -30,8 +30,8 @@ |
||
30 | 30 | $attributes = []; |
31 | 31 | $className = get_class($object); |
32 | 32 | |
33 | - foreach ((array) $object as $name => $value) { |
|
34 | - $name = explode("\0", (string) $name); |
|
33 | + foreach ((array)$object as $name => $value) { |
|
34 | + $name = explode("\0", (string)$name); |
|
35 | 35 | |
36 | 36 | if (count($name) === 1) { |
37 | 37 | $name = $name[0]; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function testStaticAttributes() |
37 | 37 | { |
38 | 38 | $this->blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback( |
39 | - function ($class) { |
|
39 | + function($class) { |
|
40 | 40 | return $class !== SnapshotClass::class; |
41 | 41 | } |
42 | 42 | ); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public static function init() |
29 | 29 | { |
30 | 30 | self::$dom = new DomDocument(); |
31 | - self::$closure = function () {}; |
|
31 | + self::$closure = function() {}; |
|
32 | 32 | self::$arrayObject = new ArrayObject([1, 2, 3]); |
33 | 33 | self::$snapshotDomDocument = new SnapshotDomDocument(); |
34 | 34 | self::$resource = \fopen('php://memory', 'r'); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function testAcceptsSucceeds($expected, $actual): void |
82 | 82 | { |
83 | 83 | $this->assertTrue( |
84 | - $this->comparator->accepts($expected, $actual) |
|
84 | + $this->comparator->accepts($expected, $actual) |
|
85 | 85 | ); |
86 | 86 | } |
87 | 87 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function testAcceptsFails($expected, $actual): void |
92 | 92 | { |
93 | 93 | $this->assertFalse( |
94 | - $this->comparator->accepts($expected, $actual) |
|
94 | + $this->comparator->accepts($expected, $actual) |
|
95 | 95 | ); |
96 | 96 | } |
97 | 97 |
@@ -66,8 +66,8 @@ |
||
66 | 66 | [2.3, 2.5, 0.5], |
67 | 67 | [3, 3.05, 0.05], |
68 | 68 | [1.2e3, 1201, 1], |
69 | - [(string) (1 / 3), 1 - 2 / 3], |
|
70 | - [1 / 3, (string) (1 - 2 / 3)] |
|
69 | + [(string)(1/3), 1 - 2/3], |
|
70 | + [1/3, (string)(1 - 2/3)] |
|
71 | 71 | ]; |
72 | 72 | } |
73 | 73 |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function testAcceptsSucceeds($expected, $actual): void |
82 | 82 | { |
83 | 83 | $this->assertTrue( |
84 | - $this->comparator->accepts($expected, $actual) |
|
84 | + $this->comparator->accepts($expected, $actual) |
|
85 | 85 | ); |
86 | 86 | } |
87 | 87 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function testAcceptsFails($expected, $actual): void |
92 | 92 | { |
93 | 93 | $this->assertFalse( |
94 | - $this->comparator->accepts($expected, $actual) |
|
94 | + $this->comparator->accepts($expected, $actual) |
|
95 | 95 | ); |
96 | 96 | } |
97 | 97 |
@@ -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 |
@@ -75,7 +75,7 @@ |
||
75 | 75 | public function testAcceptsSucceeds($expected, $actual): void |
76 | 76 | { |
77 | 77 | $this->assertTrue( |
78 | - $this->comparator->accepts($expected, $actual) |
|
78 | + $this->comparator->accepts($expected, $actual) |
|
79 | 79 | ); |
80 | 80 | } |
81 | 81 |
@@ -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 |
@@ -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 | } |
@@ -52,8 +52,8 @@ |
||
52 | 52 | // always compare as strings to avoid strange behaviour |
53 | 53 | // otherwise 0 == 'Foobar' |
54 | 54 | if (\is_string($expected) || \is_string($actual)) { |
55 | - $expectedToCompare = (string) $expectedToCompare; |
|
56 | - $actualToCompare = (string) $actualToCompare; |
|
55 | + $expectedToCompare = (string)$expectedToCompare; |
|
56 | + $actualToCompare = (string)$actualToCompare; |
|
57 | 57 | |
58 | 58 | if ($ignoreCase) { |
59 | 59 | $expectedToCompare = \strtolower($expectedToCompare); |