Skip to content

Commit fd87d4c

Browse files
committed
fix php cs
1 parent a3ae6f9 commit fd87d4c

19 files changed

+34
-33
lines changed

src/CountryAssertions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trait CountryAssertions
1010
{
1111
public static function assertCountry(string $key, $actual): void
1212
{
13-
switch($key) {
13+
switch ($key) {
1414
case ISO3166::KEY_NAME:
1515
self::assertCountryName($actual);
1616
break;
@@ -58,4 +58,4 @@ public static function assertCountryNumeric($actual): void
5858
$country = (new ISO3166)->numeric($actual);
5959
PHPUnit::assertIsArray($country);
6060
}
61-
}
61+
}

src/GeoAssertions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ public static function assertCoordinates($actual, string $lat = 'lat', string $l
2828
PHPUnit::assertArrayHasKey($lng, $actual);
2929
self::assertLongitude($actual[$lng]);
3030
}
31-
}
31+
}

src/HashidAssertions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static function assertHashIds(
1313
?string $salt = null,
1414
int $minHashLength = 0,
1515
?string $alphabet = null
16-
): void{
16+
): void {
1717
PHPUnit::assertIsString($actual);
1818

1919
$hashid = new Hashids(
@@ -25,11 +25,11 @@ public static function assertHashIds(
2525
$ids = $hashid->decode($actual);
2626
PHPUnit::assertIsArray($ids);
2727

28-
if($count !== null) {
28+
if ($count !== null) {
2929
PHPUnit::assertCount($count, $ids);
3030
}
3131

32-
foreach($ids as $id) {
32+
foreach ($ids as $id) {
3333
PHPUnit::assertIsInt($id);
3434
PHPUnit::assertGreaterThanOrEqual(0, $id);
3535
}
@@ -40,7 +40,7 @@ public static function assertHashId(
4040
?string $salt = null,
4141
int $minHashLength = 0,
4242
?string $alphabet = null
43-
): void{
43+
): void {
4444
static::assertHashIds($actual, 1, $salt, $minHashLength, $alphabet);
4545
}
46-
}
46+
}

src/Laravel/HashidAssertions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Astrotomic\PhpunitAssertions\Laravel;
44

5-
use Vinkla\Hashids\Facades\Hashids;
65
use Astrotomic\PhpunitAssertions\HashidAssertions as BaseHashidAssertions;
6+
use Vinkla\Hashids\Facades\Hashids;
77

88
trait HashidAssertions
99
{
@@ -24,4 +24,4 @@ public static function assertHashId($actual, ?string $connection = null): void
2424
{
2525
static::assertHashIds($actual, 1, $connection);
2626
}
27-
}
27+
}

src/PhoneNumberAssertions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ protected static function getPhoneNumber($actual): PhoneNumber
4141
if (is_string($actual)) {
4242
try {
4343
$actual = PhoneNumberUtil::getInstance()->parse($actual);
44-
} catch(Throwable $ex) {
44+
} catch (Throwable $ex) {
4545
}
4646
}
4747

4848
PHPUnit::assertInstanceOf(PhoneNumber::class, $actual);
4949

5050
return $actual;
5151
}
52-
}
52+
}

src/StringAssertions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ public static function assertLengtGreaterThanOrEqual(int $length, $actual): void
4141
PHPUnit::assertIsString($actual);
4242
PHPUnit::assertGreaterThanOrEqual($length, mb_strlen($actual));
4343
}
44-
}
44+
}

src/UuidAssertions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ public static function assertUuid($actual): void
1212
PHPUnit::assertIsString($actual);
1313
PHPUnit::assertTrue(Uuid::isValid($actual));
1414
}
15-
}
15+
}

tests/CountryAssertionsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ public function countries(): iterable
6262

6363
public function countryName(): iterable
6464
{
65-
return array_map(fn(array $country): array => [$country[ISO3166::KEY_NAME]], (new ISO3166())->all());
65+
return array_map(fn (array $country): array => [$country[ISO3166::KEY_NAME]], (new ISO3166())->all());
6666
}
6767

6868
public function countryAlpha2(): iterable
6969
{
70-
return array_map(fn(array $country): array => [$country[ISO3166::KEY_ALPHA2]], (new ISO3166())->all());
70+
return array_map(fn (array $country): array => [$country[ISO3166::KEY_ALPHA2]], (new ISO3166())->all());
7171
}
7272

7373
public function countryAlpha3(): iterable
7474
{
75-
return array_map(fn(array $country): array => [$country[ISO3166::KEY_ALPHA3]], (new ISO3166())->all());
75+
return array_map(fn (array $country): array => [$country[ISO3166::KEY_ALPHA3]], (new ISO3166())->all());
7676
}
7777

7878
public function countryNumeric(): iterable
7979
{
80-
return array_map(fn(array $country): array => [$country[ISO3166::KEY_NUMERIC]], (new ISO3166())->all());
80+
return array_map(fn (array $country): array => [$country[ISO3166::KEY_NUMERIC]], (new ISO3166())->all());
8181
}
82-
}
82+
}

tests/GeoAssertionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ public static function it_can_validate_array_of_coordinates_with_custom_keys():
5454

5555
GeoAssertions::assertCoordinates($coords, $lat, $lng);
5656
}
57-
}
57+
}

tests/HashidAssertionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function it_can_validate_hashids(): void
3434
$length = static::randomInt(0, 32);
3535
$hashid = new Hashids($salt, $length);
3636

37-
$ids = array_map(fn() => static::randomInt(0), range(0, static::randomInt(2, 20)));
37+
$ids = array_map(fn () => static::randomInt(0), range(0, static::randomInt(2, 20)));
3838

3939
HashidAssertions::assertHashIds(
4040
$hashid->encode($ids),
@@ -43,4 +43,4 @@ public static function it_can_validate_hashids(): void
4343
$length
4444
);
4545
}
46-
}
46+
}

0 commit comments

Comments
 (0)