Skip to content

Commit

Permalink
Fix: Run friendsofphp/php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and sebastianbergmann committed Feb 9, 2020
1 parent 51b3a9b commit 7b5ae54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Exporter.php
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* This file is part of exporter package.
* This file is part of sebastian/exporter.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
Expand Down Expand Up @@ -240,7 +240,7 @@ protected function recursiveExport(&$value, $indentation, $processed = null)
"'";
}

$whitespace = \str_repeat(' ', (int)(4 * $indentation));
$whitespace = \str_repeat(' ', (int) (4 * $indentation));

if (!$processed) {
$processed = new Context;
Expand Down
22 changes: 11 additions & 11 deletions tests/ExporterTest.php
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* This file is part of exporter package.
* This file is part of sebastian/exporter.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
Expand Down Expand Up @@ -155,19 +155,19 @@ public function exportProvider(): array
],
[
\chr(0) . \chr(1) . \chr(2) . \chr(3) . \chr(4) . \chr(5),
'Binary String: 0x000102030405'
'Binary String: 0x000102030405',
],
[
\implode('', \array_map('chr', \range(0x0e, 0x1f))),
'Binary String: 0x0e0f101112131415161718191a1b1c1d1e1f'
'Binary String: 0x0e0f101112131415161718191a1b1c1d1e1f',
],
[
\chr(0x00) . \chr(0x09),
'Binary String: 0x0009'
'Binary String: 0x0009',
],
[
'',
"''"
"''",
],
'export Exception without trace' => [
new \Exception('The exception message', 42),
Expand Down Expand Up @@ -337,8 +337,8 @@ public function testShortenedExportForMultibyteCharacters(): void

try {
$this->assertSame(
"'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'",
$this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'))
"'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'",
$this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'))
);
} catch (\Exception $e) {
\mb_internal_encoding($oldMbInternalEncoding);
Expand Down Expand Up @@ -379,7 +379,7 @@ public function testNonObjectCanBeReturnedAsArray(): void
public function testIgnoreKeysInValue(): void
{
// Find out what the actual use case was with the PHP bug
$array = [];
$array = [];
$array["\0gcdata"] = '';

$this->assertEquals([], $this->exporter->toArray((object) $array));
Expand All @@ -404,16 +404,16 @@ public function shortenedRecursiveExportProvider(): array
'export float 1.2' => [[1.2], '1.2'],
'export numeric string' => [['1'], "'1'"],
'export with numeric array key' => [[2 => 1], '1'],
'export with assoc array key' => [['foo' => 'bar'], '\'bar\''],
'export with assoc array key' => [['foo' => 'bar'], '\'bar\''],
'export multidimentional array' => [[[1, 2, 3], [3, 4, 5]], 'array(1, 2, 3), array(3, 4, 5)'],
'export object' => [[new \stdClass], 'stdClass Object ()'],
'export object' => [[new \stdClass], 'stdClass Object ()'],
];
}

public function testShortenedRecursiveOccurredRecursion(): void
{
$recursiveValue = [1];
$context = new Context();
$context = new Context();
$context->add($recursiveValue);

$value = [$recursiveValue];
Expand Down

0 comments on commit 7b5ae54

Please sign in to comment.