Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Rename class #672

Merged
merged 1 commit into from Jan 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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