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 interface #673

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 @@ -19,6 +19,7 @@ For a full diff see [`2.2.0...3.0.0`][2.2.0...3.0.0].
- 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]
- Renamed `Format\FormatterInterface` to `Format\Formatter` ([#673]), by [@dependabot]

## [`2.2.0`][2.2.0]

Expand Down Expand Up @@ -495,6 +496,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0].
[#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
[#673]: https://github.com/ergebnis/json-normalizer/pull/673

[@BackEndTea]: https://github.com/BackEndTea
[@dependabot]: https://github.com/dependabot
Expand Down
4 changes: 2 additions & 2 deletions src/AutoFormatNormalizer.php
Expand Up @@ -16,11 +16,11 @@
final class AutoFormatNormalizer implements Normalizer
{
private Normalizer $normalizer;
private Format\FormatterInterface $formatter;
private Format\Formatter $formatter;

public function __construct(
Normalizer $normalizer,
Format\FormatterInterface $formatter
Format\Formatter $formatter
) {
$this->normalizer = $normalizer;
$this->formatter = $formatter;
Expand Down
4 changes: 2 additions & 2 deletions src/FixedFormatNormalizer.php
Expand Up @@ -17,12 +17,12 @@ final class FixedFormatNormalizer implements Normalizer
{
private Normalizer $normalizer;
private Format\Format $format;
private Format\FormatterInterface $formatter;
private Format\Formatter $formatter;

public function __construct(
Normalizer $normalizer,
Format\Format $format,
Format\FormatterInterface $formatter
Format\Formatter $formatter
) {
$this->normalizer = $normalizer;
$this->format = $format;
Expand Down
2 changes: 1 addition & 1 deletion src/Format/DefaultFormatter.php
Expand Up @@ -16,7 +16,7 @@
use Ergebnis\Json\Normalizer\Json;
use Ergebnis\Json\Printer;

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

Expand Down
Expand Up @@ -15,7 +15,7 @@

use Ergebnis\Json\Normalizer\Json;

interface FormatterInterface
interface Formatter
{
public function format(
Json $json,
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/AutoFormatNormalizerTest.php
Expand Up @@ -65,7 +65,7 @@ public function testNormalizeNormalizesAndFormatsUsingJsonFormat(): void
->with(self::identicalTo($json))
->willReturn($normalized);

$formatter = $this->createMock(Format\FormatterInterface::class);
$formatter = $this->createMock(Format\Formatter::class);

$formatter
->expects(self::once())
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/FixedFormatNormalizerTest.php
Expand Up @@ -74,7 +74,7 @@ public function testNormalizeNormalizesAndFormatsUsingFormat(): void
->with(self::identicalTo($json))
->willReturn($normalized);

$formatter = $this->createMock(Format\FormatterInterface::class);
$formatter = $this->createMock(Format\Formatter::class);

$formatter
->expects(self::once())
Expand Down