Skip to content

Commit

Permalink
minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Jan 26, 2024
1 parent ab7657c commit 98a594c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
final class Country
{
public function __construct(
private readonly string $entity,
private readonly string $currency,
private readonly string $alphabeticCode,
private readonly int $numericCode,
private readonly int $minorUnit)
{
private readonly string $entity,
private readonly string $currency,
private readonly string $alphabeticCode,
private readonly int $numericCode,
private readonly int $minorUnit
) {
}

public function getAlphabeticCode(): string
Expand Down
10 changes: 5 additions & 5 deletions src/Fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
final class Fetcher
{
/**
* @var null|array|Country[]
* @var array<int, Country>
*/
private ?array $currentCountries = null;

/**
* @var null|array|Country[]
* @var array<int, Country>
*/
private ?array $historicCountries = null;

public function __construct(
private readonly string $currentLocation,
private readonly string $historicLocation)
{
private readonly string $currentLocation,
private readonly string $historicLocation
) {
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
interface Serializer
{
/**
* @param Country[] $countries
* @param array<int|string, Country> $countries
*/
public function serialize(array $countries): string;
}
2 changes: 1 addition & 1 deletion src/Serializer/JsonSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
final class JsonSerializer implements Serializer
{
/**
* @param array|Country[] $countries
* @param array<int|string, Country> $countries
* @throws \JsonException
*/
public function serialize(array $countries): string
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/PhpExportSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
final class PhpExportSerializer implements Serializer
{
/**
* @param array|Country[] $countries
* @param array<int|string, Country> $countries
*/
public function serialize(array $countries): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/YamlSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
final class YamlSerializer implements Serializer
{
/**
* @param array|Country[] $countries
* @param array<int|string, Country> $countries
*/
public function serialize(array $countries): string
{
Expand Down

0 comments on commit 98a594c

Please sign in to comment.