Skip to content

Commit

Permalink
Merge pull request #673 from ergebnis/fix/rename
Browse files Browse the repository at this point in the history
Fix: Rename interface
  • Loading branch information
localheinz committed Jan 30, 2022
2 parents c61a58d + 7a55291 commit 0715c64
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
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

0 comments on commit 0715c64

Please sign in to comment.