@@ -24,22 +24,22 @@ |
||
| 24 | 24 | { |
| 25 | 25 | self::$di = new DIFactoryConfig(); |
| 26 | 26 | self::$di->loadServices([ |
| 27 | - "services" => [ |
|
| 28 | - "request" => [ |
|
| 29 | - "shared" => true, |
|
| 30 | - "callback" => function () { |
|
| 31 | - $obj = new MockRequest(); |
|
| 32 | - return $obj; |
|
| 33 | - } |
|
| 34 | - ], |
|
| 35 | - "url" => [ |
|
| 36 | - "shared" => true, |
|
| 37 | - "callback" => function () { |
|
| 38 | - $obj = new MockUrl(); |
|
| 39 | - return $obj; |
|
| 40 | - } |
|
| 41 | - ], |
|
| 42 | - ], |
|
| 27 | + "services" => [ |
|
| 28 | + "request" => [ |
|
| 29 | + "shared" => true, |
|
| 30 | + "callback" => function () { |
|
| 31 | + $obj = new MockRequest(); |
|
| 32 | + return $obj; |
|
| 33 | + } |
|
| 34 | + ], |
|
| 35 | + "url" => [ |
|
| 36 | + "shared" => true, |
|
| 37 | + "callback" => function () { |
|
| 38 | + $obj = new MockUrl(); |
|
| 39 | + return $obj; |
|
| 40 | + } |
|
| 41 | + ], |
|
| 42 | + ], |
|
| 43 | 43 | ]); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | class Response |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @var array $headers set all headers to send. |
|
| 12 | - * @var array $statusCode set statuscode to use. |
|
| 13 | - * @var string $body body to send with response. |
|
| 14 | - * @var string $filename a filename to send for download. |
|
| 15 | - */ |
|
| 11 | + * @var array $headers set all headers to send. |
|
| 12 | + * @var array $statusCode set statuscode to use. |
|
| 13 | + * @var string $body body to send with response. |
|
| 14 | + * @var string $filename a filename to send for download. |
|
| 15 | + */ |
|
| 16 | 16 | private $headers = []; |
| 17 | 17 | private $statusCode = null; |
| 18 | 18 | private $body = null; |
@@ -29,21 +29,21 @@ |
||
| 29 | 29 | // on the input arrays. This ordering of the characters avoids the use of strtr, |
| 30 | 30 | // which performs more slowly. |
| 31 | 31 | private static $escapees = ['\\', '\\\\', '\\"', '"', |
| 32 | - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", |
|
| 33 | - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", |
|
| 34 | - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", |
|
| 35 | - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", |
|
| 36 | - "\x7f", |
|
| 37 | - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", |
|
| 38 | - ]; |
|
| 32 | + "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", |
|
| 33 | + "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", |
|
| 34 | + "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", |
|
| 35 | + "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", |
|
| 36 | + "\x7f", |
|
| 37 | + "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", |
|
| 38 | + ]; |
|
| 39 | 39 | private static $escaped = ['\\\\', '\\"', '\\\\', '\\"', |
| 40 | - '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', |
|
| 41 | - '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', |
|
| 42 | - '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', |
|
| 43 | - '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', |
|
| 44 | - '\\x7f', |
|
| 45 | - '\\N', '\\_', '\\L', '\\P', |
|
| 46 | - ]; |
|
| 40 | + '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', |
|
| 41 | + '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', |
|
| 42 | + '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', |
|
| 43 | + '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', |
|
| 44 | + '\\x7f', |
|
| 45 | + '\\N', '\\_', '\\L', '\\P', |
|
| 46 | + ]; |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Determines if a PHP value would require double quoting in YAML. |
@@ -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 | } |
@@ -341,8 +341,8 @@ |
||
| 341 | 341 | |
| 342 | 342 | try { |
| 343 | 343 | $this->assertSame( |
| 344 | - "'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'", |
|
| 345 | - $this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす')) |
|
| 344 | + "'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'", |
|
| 345 | + $this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす')) |
|
| 346 | 346 | ); |
| 347 | 347 | } catch (\Exception $e) { |
| 348 | 348 | \mb_internal_encoding($oldMbInternalEncoding); |