Skip to content

Commit

Permalink
Fix: Rename class
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 30, 2022
1 parent 4f92950 commit 58fc5ea
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,7 @@ For a full diff see [`2.2.0...3.0.0`][2.2.0...3.0.0].
- Renamed `Exception\ExceptionInterface` to `Exception\Exception` ([#667]), by [@dependabot]
- Removed `Exception` suffix from all exceptions ([#668]), by [@dependabot]
- Renamed `NormalizerInterface` to `Normalizer` ([#669]), by [@dependabot]
- Renamed `Format\Formatter` to `Format\DefaultFormatter` ([#672]), by [@dependabot]

## [`2.2.0`][2.2.0]

Expand Down Expand Up @@ -493,6 +494,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0].
[#667]: https://github.com/ergebnis/json-normalizer/pull/667
[#668]: https://github.com/ergebnis/json-normalizer/pull/668
[#669]: https://github.com/ergebnis/json-normalizer/pull/669
[#672]: https://github.com/ergebnis/json-normalizer/pull/672

[@BackEndTea]: https://github.com/BackEndTea
[@dependabot]: https://github.com/dependabot
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -63,7 +63,7 @@ $json = Normalizer\Json::fromEncoded($encoded);
/* @var Normalizer\Normalizer $composedNormalizer */
$normalizer = new Normalizer\AutoFormatNormalizer(
$composedNormalizer,
new Normalizer\Format\Formatter(new Printer\Printer())
new Normalizer\Format\DefaultFormatter(new Printer\Printer())
);

$normalized = $normalizer->normalize($json);
Expand Down Expand Up @@ -184,7 +184,7 @@ $json = Normalizer\Json::fromEncoded($encoded);
$normalizer = new Normalizer\FixedFormatNormalizer(
$composedNormalizer,
$format,
new Normalizer\Format\Formatter(new Printer\Printer())
new Normalizer\Format\DefaultFormatter(new Printer\Printer())
);

$normalized = $normalizer->normalize($json);
Expand Down
16 changes: 8 additions & 8 deletions psalm-baseline.xml
Expand Up @@ -63,21 +63,21 @@
<code>$value</code>
</UnusedForeachValue>
</file>
<file src="test/Unit/Format/FormatTest.php">
<MixedInferredReturnType occurrences="3">
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
</MixedInferredReturnType>
</file>
<file src="test/Unit/Format/FormatterTest.php">
<file src="test/Unit/Format/DefaultFormatterTest.php">
<MixedArgument occurrences="1">
<code>$newLineString</code>
</MixedArgument>
<MixedAssignment occurrences="1">
<code>$newLineString</code>
</MixedAssignment>
</file>
<file src="test/Unit/Format/FormatTest.php">
<MixedInferredReturnType occurrences="3">
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
</MixedInferredReturnType>
</file>
<file src="test/Unit/Format/IndentTest.php">
<MixedArgument occurrences="1">
<code>$style</code>
Expand Down
Expand Up @@ -16,7 +16,7 @@
use Ergebnis\Json\Normalizer\Json;
use Ergebnis\Json\Printer;

final class Formatter implements FormatterInterface
final class DefaultFormatter implements FormatterInterface
{
private Printer\PrinterInterface $printer;

Expand Down
Expand Up @@ -22,15 +22,15 @@
/**
* @internal
*
* @covers \Ergebnis\Json\Normalizer\Format\Formatter
* @covers \Ergebnis\Json\Normalizer\Format\DefaultFormatter
*
* @uses \Ergebnis\Json\Normalizer\Format\Format
* @uses \Ergebnis\Json\Normalizer\Format\Indent
* @uses \Ergebnis\Json\Normalizer\Format\JsonEncodeOptions
* @uses \Ergebnis\Json\Normalizer\Format\NewLine
* @uses \Ergebnis\Json\Normalizer\Json
*/
final class FormatterTest extends Framework\TestCase
final class DefaultFormatterTest extends Framework\TestCase
{
use Test\Util\Helper;

Expand Down Expand Up @@ -92,7 +92,7 @@ public function testFormatEncodesWithJsonEncodeOptionsIndentsAndPossiblySuffixes
)
->willReturn($printedWithIndentAndNewLine);

$formatter = new Format\Formatter($printer);
$formatter = new Format\DefaultFormatter($printer);

$formatted = $formatter->format(
$json,
Expand Down

0 comments on commit 58fc5ea

Please sign in to comment.