@@ -26,55 +26,55 @@ discard block |
||
26 | 26 | public function acceptsSucceedsProvider() |
27 | 27 | { |
28 | 28 | return array( |
29 | - array("string", "string"), |
|
30 | - array(new ClassWithToString, "string"), |
|
31 | - array("string", new ClassWithToString), |
|
32 | - array("string", null), |
|
33 | - array(false, "string"), |
|
34 | - array(false, true), |
|
35 | - array(null, false), |
|
36 | - array(null, null), |
|
37 | - array("10", 10), |
|
38 | - array("", false), |
|
39 | - array("1", true), |
|
40 | - array(1, true), |
|
41 | - array(0, false), |
|
42 | - array(0.1, "0.1") |
|
29 | + array("string", "string"), |
|
30 | + array(new ClassWithToString, "string"), |
|
31 | + array("string", new ClassWithToString), |
|
32 | + array("string", null), |
|
33 | + array(false, "string"), |
|
34 | + array(false, true), |
|
35 | + array(null, false), |
|
36 | + array(null, null), |
|
37 | + array("10", 10), |
|
38 | + array("", false), |
|
39 | + array("1", true), |
|
40 | + array(1, true), |
|
41 | + array(0, false), |
|
42 | + array(0.1, "0.1") |
|
43 | 43 | ); |
44 | 44 | } |
45 | 45 | |
46 | 46 | public function acceptsFailsProvider() |
47 | 47 | { |
48 | 48 | return array( |
49 | - array(array(), array()), |
|
50 | - array("string", array()), |
|
51 | - array(new ClassWithToString, new ClassWithToString), |
|
52 | - array(false, new ClassWithToString), |
|
53 | - array(tmpfile(), tmpfile()) |
|
49 | + array(array(), array()), |
|
50 | + array("string", array()), |
|
51 | + array(new ClassWithToString, new ClassWithToString), |
|
52 | + array(false, new ClassWithToString), |
|
53 | + array(tmpfile(), tmpfile()) |
|
54 | 54 | ); |
55 | 55 | } |
56 | 56 | |
57 | 57 | public function assertEqualsSucceedsProvider() |
58 | 58 | { |
59 | 59 | return array( |
60 | - array("string", "string"), |
|
61 | - array(new ClassWithToString, new ClassWithToString), |
|
62 | - array("string representation", new ClassWithToString), |
|
63 | - array(new ClassWithToString, "string representation"), |
|
64 | - array("string", "STRING", true), |
|
65 | - array("STRING", "string", true), |
|
66 | - array("String Representation", new ClassWithToString, true), |
|
67 | - array(new ClassWithToString, "String Representation", true), |
|
68 | - array("10", 10), |
|
69 | - array("", false), |
|
70 | - array("1", true), |
|
71 | - array(1, true), |
|
72 | - array(0, false), |
|
73 | - array(0.1, "0.1"), |
|
74 | - array(false, null), |
|
75 | - array(false, false), |
|
76 | - array(true, true), |
|
77 | - array(null, null) |
|
60 | + array("string", "string"), |
|
61 | + array(new ClassWithToString, new ClassWithToString), |
|
62 | + array("string representation", new ClassWithToString), |
|
63 | + array(new ClassWithToString, "string representation"), |
|
64 | + array("string", "STRING", true), |
|
65 | + array("STRING", "string", true), |
|
66 | + array("String Representation", new ClassWithToString, true), |
|
67 | + array(new ClassWithToString, "String Representation", true), |
|
68 | + array("10", 10), |
|
69 | + array("", false), |
|
70 | + array("1", true), |
|
71 | + array(1, true), |
|
72 | + array(0, false), |
|
73 | + array(0.1, "0.1"), |
|
74 | + array(false, null), |
|
75 | + array(false, false), |
|
76 | + array(true, true), |
|
77 | + array(null, null) |
|
78 | 78 | ); |
79 | 79 | } |
80 | 80 | |
@@ -84,23 +84,23 @@ discard block |
||
84 | 84 | $otherException = 'matches expected'; |
85 | 85 | |
86 | 86 | return array( |
87 | - array("string", "other string", $stringException), |
|
88 | - array("string", "STRING", $stringException), |
|
89 | - array("STRING", "string", $stringException), |
|
90 | - array("string", "other string", $stringException), |
|
91 | - // https://github.com/sebastianbergmann/phpunit/issues/1023 |
|
92 | - array('9E6666666','9E7777777', $stringException), |
|
93 | - array(new ClassWithToString, "does not match", $otherException), |
|
94 | - array("does not match", new ClassWithToString, $otherException), |
|
95 | - array(0, 'Foobar', $otherException), |
|
96 | - array('Foobar', 0, $otherException), |
|
97 | - array("10", 25, $otherException), |
|
98 | - array("1", false, $otherException), |
|
99 | - array("", true, $otherException), |
|
100 | - array(false, true, $otherException), |
|
101 | - array(true, false, $otherException), |
|
102 | - array(null, true, $otherException), |
|
103 | - array(0, true, $otherException) |
|
87 | + array("string", "other string", $stringException), |
|
88 | + array("string", "STRING", $stringException), |
|
89 | + array("STRING", "string", $stringException), |
|
90 | + array("string", "other string", $stringException), |
|
91 | + // https://github.com/sebastianbergmann/phpunit/issues/1023 |
|
92 | + array('9E6666666','9E7777777', $stringException), |
|
93 | + array(new ClassWithToString, "does not match", $otherException), |
|
94 | + array("does not match", new ClassWithToString, $otherException), |
|
95 | + array(0, 'Foobar', $otherException), |
|
96 | + array('Foobar', 0, $otherException), |
|
97 | + array("10", 25, $otherException), |
|
98 | + array("1", false, $otherException), |
|
99 | + array("", true, $otherException), |
|
100 | + array(false, true, $otherException), |
|
101 | + array(true, false, $otherException), |
|
102 | + array(null, true, $otherException), |
|
103 | + array(0, true, $otherException) |
|
104 | 104 | ); |
105 | 105 | } |
106 | 106 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function testAcceptsSucceeds($expected, $actual) |
112 | 112 | { |
113 | 113 | $this->assertTrue( |
114 | - $this->comparator->accepts($expected, $actual) |
|
114 | + $this->comparator->accepts($expected, $actual) |
|
115 | 115 | ); |
116 | 116 | } |
117 | 117 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function testAcceptsFails($expected, $actual) |
123 | 123 | { |
124 | 124 | $this->assertFalse( |
125 | - $this->comparator->accepts($expected, $actual) |
|
125 | + $this->comparator->accepts($expected, $actual) |
|
126 | 126 | ); |
127 | 127 | } |
128 | 128 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | public function testAssertEqualsFails($expected, $actual, $message) |
152 | 152 | { |
153 | 153 | $this->setExpectedException( |
154 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
154 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
155 | 155 | ); |
156 | 156 | $this->comparator->assertEquals($expected, $actual); |
157 | 157 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | array("STRING", "string", $stringException), |
90 | 90 | array("string", "other string", $stringException), |
91 | 91 | // https://github.com/sebastianbergmann/phpunit/issues/1023 |
92 | - array('9E6666666','9E7777777', $stringException), |
|
92 | + array('9E6666666', '9E7777777', $stringException), |
|
93 | 93 | array(new ClassWithToString, "does not match", $otherException), |
94 | 94 | array("does not match", new ClassWithToString, $otherException), |
95 | 95 | array(0, 'Foobar', $otherException), |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | public function acceptsFailsProvider() |
30 | 30 | { |
31 | 31 | return array( |
32 | - array(new SplObjectStorage, new stdClass), |
|
33 | - array(new stdClass, new SplObjectStorage), |
|
34 | - array(new stdClass, new stdClass) |
|
32 | + array(new SplObjectStorage, new stdClass), |
|
33 | + array(new stdClass, new SplObjectStorage), |
|
34 | + array(new stdClass, new stdClass) |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | $storage4->attach($object1); |
53 | 53 | |
54 | 54 | return array( |
55 | - array($storage1, $storage1), |
|
56 | - array($storage1, $storage2), |
|
57 | - array($storage3, $storage3), |
|
58 | - array($storage3, $storage4) |
|
55 | + array($storage1, $storage1), |
|
56 | + array($storage1, $storage2), |
|
57 | + array($storage3, $storage3), |
|
58 | + array($storage3, $storage4) |
|
59 | 59 | ); |
60 | 60 | } |
61 | 61 | |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $storage3->attach($object1); |
75 | 75 | |
76 | 76 | return array( |
77 | - array($storage1, $storage2), |
|
78 | - array($storage1, $storage3), |
|
79 | - array($storage2, $storage3), |
|
77 | + array($storage1, $storage2), |
|
78 | + array($storage1, $storage3), |
|
79 | + array($storage2, $storage3), |
|
80 | 80 | ); |
81 | 81 | } |
82 | 82 | |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | public function testAcceptsSucceeds() |
87 | 87 | { |
88 | 88 | $this->assertTrue( |
89 | - $this->comparator->accepts( |
|
89 | + $this->comparator->accepts( |
|
90 | 90 | new SplObjectStorage, |
91 | 91 | new SplObjectStorage |
92 | - ) |
|
92 | + ) |
|
93 | 93 | ); |
94 | 94 | } |
95 | 95 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function testAcceptsFails($expected, $actual) |
101 | 101 | { |
102 | 102 | $this->assertFalse( |
103 | - $this->comparator->accepts($expected, $actual) |
|
103 | + $this->comparator->accepts($expected, $actual) |
|
104 | 104 | ); |
105 | 105 | } |
106 | 106 | |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | public function testAssertEqualsFails($expected, $actual) |
130 | 130 | { |
131 | 131 | $this->setExpectedException( |
132 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
133 | - 'Failed asserting that two objects are equal.' |
|
132 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
133 | + 'Failed asserting that two objects are equal.' |
|
134 | 134 | ); |
135 | 135 | $this->comparator->assertEquals($expected, $actual); |
136 | 136 | } |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -28,38 +28,38 @@ discard block |
||
28 | 28 | public function acceptsSucceedsProvider() |
29 | 29 | { |
30 | 30 | return array( |
31 | - array(true, 1), |
|
32 | - array(false, array(1)), |
|
33 | - array(null, new stdClass), |
|
34 | - array(1.0, 5), |
|
35 | - array("", "") |
|
31 | + array(true, 1), |
|
32 | + array(false, array(1)), |
|
33 | + array(null, new stdClass), |
|
34 | + array(1.0, 5), |
|
35 | + array("", "") |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function assertEqualsSucceedsProvider() |
40 | 40 | { |
41 | 41 | return array( |
42 | - array(true, true), |
|
43 | - array(true, false), |
|
44 | - array(false, false), |
|
45 | - array(null, null), |
|
46 | - array(new stdClass, new stdClass), |
|
47 | - array(0, 0), |
|
48 | - array(1.0, 2.0), |
|
49 | - array("hello", "world"), |
|
50 | - array("", ""), |
|
51 | - array(array(), array(1,2,3)) |
|
42 | + array(true, true), |
|
43 | + array(true, false), |
|
44 | + array(false, false), |
|
45 | + array(null, null), |
|
46 | + array(new stdClass, new stdClass), |
|
47 | + array(0, 0), |
|
48 | + array(1.0, 2.0), |
|
49 | + array("hello", "world"), |
|
50 | + array("", ""), |
|
51 | + array(array(), array(1,2,3)) |
|
52 | 52 | ); |
53 | 53 | } |
54 | 54 | |
55 | 55 | public function assertEqualsFailsProvider() |
56 | 56 | { |
57 | 57 | return array( |
58 | - array(true, null), |
|
59 | - array(null, false), |
|
60 | - array(1.0, 0), |
|
61 | - array(new stdClass, array()), |
|
62 | - array("1", 1) |
|
58 | + array(true, null), |
|
59 | + array(null, false), |
|
60 | + array(1.0, 0), |
|
61 | + array(new stdClass, array()), |
|
62 | + array("1", 1) |
|
63 | 63 | ); |
64 | 64 | } |
65 | 65 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function testAcceptsSucceeds($expected, $actual) |
71 | 71 | { |
72 | 72 | $this->assertTrue( |
73 | - $this->comparator->accepts($expected, $actual) |
|
73 | + $this->comparator->accepts($expected, $actual) |
|
74 | 74 | ); |
75 | 75 | } |
76 | 76 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | array(1.0, 2.0), |
49 | 49 | array("hello", "world"), |
50 | 50 | array("", ""), |
51 | - array(array(), array(1,2,3)) |
|
51 | + array(array(), array(1, 2, 3)) |
|
52 | 52 | ); |
53 | 53 | } |
54 | 54 |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -182,7 +182,7 @@ |
||
182 | 182 | count($fromMatches[0]) === count($toMatches[0]) && |
183 | 183 | $fromMatches[0] !== $toMatches[0]) { |
184 | 184 | $diff[] = array( |
185 | - '#Warning: Strings contain different line endings!', 0 |
|
185 | + '#Warning: Strings contain different line endings!', 0 |
|
186 | 186 | ); |
187 | 187 | } |
188 | 188 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $old = array(); |
66 | 66 | |
67 | 67 | foreach ($diff as $line) { |
68 | - if ($line[1] === 0 /* OLD */) { |
|
68 | + if ($line[1] === 0 /* OLD */) { |
|
69 | 69 | if ($inOld === false) { |
70 | 70 | $inOld = $i; |
71 | 71 | } |
@@ -54,8 +54,8 @@ |
||
54 | 54 | $j = $toLength; |
55 | 55 | |
56 | 56 | while ($i > 0 && $j > 0) { |
57 | - if ($from[$i-1] === $to[$j-1]) { |
|
58 | - $common[] = $from[$i-1]; |
|
57 | + if ($from[$i - 1] === $to[$j - 1]) { |
|
58 | + $common[] = $from[$i - 1]; |
|
59 | 59 | --$i; |
60 | 60 | --$j; |
61 | 61 | } else { |
@@ -101,15 +101,15 @@ |
||
101 | 101 | |
102 | 102 | public function testCommonSubsequence() |
103 | 103 | { |
104 | - $from = array('A', 'C', 'E', 'F', 'G'); |
|
105 | - $to = array('A', 'B', 'D', 'E', 'H'); |
|
106 | - $expected = array('A', 'E'); |
|
104 | + $from = array('A', 'C', 'E', 'F', 'G'); |
|
105 | + $to = array('A', 'B', 'D', 'E', 'H'); |
|
106 | + $expected = array('A', 'E'); |
|
107 | 107 | $common = $this->implementation->calculate($from, $to); |
108 | 108 | $this->assertEquals($expected, $common); |
109 | 109 | |
110 | - $from = array('A', 'C', 'E', 'F', 'G'); |
|
111 | - $to = array('B', 'C', 'D', 'E', 'F', 'H'); |
|
112 | - $expected = array('C', 'E', 'F'); |
|
110 | + $from = array('A', 'C', 'E', 'F', 'G'); |
|
111 | + $to = array('B', 'C', 'D', 'E', 'F', 'H'); |
|
112 | + $expected = array('C', 'E', 'F'); |
|
113 | 113 | $common = $this->implementation->calculate($from, $to); |
114 | 114 | $this->assertEquals($expected, $common); |
115 | 115 |
@@ -67,17 +67,13 @@ |
||
67 | 67 | if (is_array($value)) { |
68 | 68 | if ($context->contains($data[$key]) !== false) { |
69 | 69 | $result[] = '*RECURSION*'; |
70 | - } |
|
71 | - |
|
72 | - else { |
|
70 | + } else { |
|
73 | 71 | $result[] = sprintf( |
74 | 72 | 'array(%s)', |
75 | 73 | $this->shortenedRecursiveExport($data[$key], $context) |
76 | 74 | ); |
77 | 75 | } |
78 | - } |
|
79 | - |
|
80 | - else { |
|
76 | + } else { |
|
81 | 77 | $result[] = $exporter->shortenedExport($value); |
82 | 78 | } |
83 | 79 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | public function testStaticAttributes() |
22 | 22 | { |
23 | 23 | $blacklist = $this->getBlacklist(); |
24 | - $blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(function ($class) { |
|
24 | + $blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(function($class) { |
|
25 | 25 | return $class !== 'SebastianBergmann\GlobalState\TestFixture\SnapshotClass'; |
26 | 26 | }); |
27 | 27 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function testFunctions() |
47 | 47 | { |
48 | - require_once __DIR__.'/_fixture/SnapshotFunctions.php'; |
|
48 | + require_once __DIR__ . '/_fixture/SnapshotFunctions.php'; |
|
49 | 49 | |
50 | 50 | $snapshot = new Snapshot($this->getBlacklist(), false, false, false, true, false, false, false, false, false); |
51 | 51 | $functions = $snapshot->functions(); |
@@ -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(array(1, 2, 3)); |
33 | 33 | self::$snapshotDomDocument = new SnapshotDomDocument(); |
34 | 34 | self::$resource = fopen('php://memory', 'r'); |