Skip to content

Commit 9c1aae0

Browse files
committed
Apply fixes from StyleCI
1 parent 3e9b9d1 commit 9c1aae0

7 files changed

+14
-14
lines changed

src/Entity/AdministrativeArea.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function getParent(): ?Subdivision
2020

2121
public function is(Subdivision $subdivision = null): bool
2222
{
23-
if (!($subdivision instanceof self)) {
23+
if (! ($subdivision instanceof self)) {
2424
return false;
2525
}
2626

src/Entity/Subdivision.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public function is(self $subdivision = null): bool
9090
return false;
9191
}
9292

93-
if (!$this->getCode() === $subdivision->getCode()) {
93+
if (! $this->getCode() === $subdivision->getCode()) {
9494
return false;
9595
}
9696

97-
if (!$this->getCountry()->is($subdivision->getCountry())) {
97+
if (! $this->getCountry()->is($subdivision->getCountry())) {
9898
return false;
9999
}
100100

src/LaravelAddressing.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function country(string $country_code, ?string $locale = null): ?Country
5959
{
6060
$country_code = strtoupper($country_code);
6161

62-
if (!$this->countries->has($country_code)) {
62+
if (! $this->countries->has($country_code)) {
6363
try {
6464
$this->countries->put($country_code, new Country(
6565
$this->country_repository->get($country_code, $locale ?? $this->locale),
@@ -92,7 +92,7 @@ public function countryOrFail(string $country_code, ?string $locale = null): Cou
9292
*/
9393
public function countries(?string $locale = null): CountryCollection
9494
{
95-
if (!$this->all_countries_loaded) {
95+
if (! $this->all_countries_loaded) {
9696
$all_countries = $this->country_repository->getAll($locale ?? $this->locale);
9797

9898
foreach ($all_countries as $country_code => $base_country) {

src/Support/AddressingServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function bootRoutes(): void
7373
$config = $this->app->make('config');
7474

7575
// Skip if routes have been disabled
76-
if (!$config->get('addressing.routes.enabled', true)) {
76+
if (! $config->get('addressing.routes.enabled', true)) {
7777
return;
7878
}
7979

src/Support/Http/AdministrativeAreasController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __invoke(LaravelAddressing $addressing, Repository $config, Requ
1717
{
1818
$country = $addressing->country($country_code, $request->input('locale', null));
1919

20-
if (!$country) {
20+
if (! $country) {
2121
throw new NotFoundHttpException("No country found for code '{$country_code}'");
2222
}
2323

src/Support/Validation/Rules/PostalCodeRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function passes($attribute, $value): bool
4949
}
5050

5151
// If we don't have a pattern for this country/area, automatically pass
52-
if (!$pattern = $this->pattern()) {
52+
if (! $pattern = $this->pattern()) {
5353
return true;
5454
}
5555

src/Support/Validation/Validator.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function looseCountry($attribute, $value): bool
7171
*/
7272
public function administrativeArea($attribute, $value, array $parameters, BaseValidator $validator): bool
7373
{
74-
if (!$country = $this->loadCountryFromValidationData($parameters, $validator)) {
74+
if (! $country = $this->loadCountryFromValidationData($parameters, $validator)) {
7575
return false;
7676
}
7777

@@ -89,7 +89,7 @@ public function administrativeArea($attribute, $value, array $parameters, BaseVa
8989
*/
9090
public function administrativeAreaName($attribute, $value, array $parameters, BaseValidator $validator): bool
9191
{
92-
if (!$country = $this->loadCountryFromValidationData($parameters, $validator)) {
92+
if (! $country = $this->loadCountryFromValidationData($parameters, $validator)) {
9393
return false;
9494
}
9595

@@ -107,7 +107,7 @@ public function administrativeAreaName($attribute, $value, array $parameters, Ba
107107
*/
108108
public function looseAdministrativeArea($attribute, $value, array $parameters, BaseValidator $validator): bool
109109
{
110-
if (!$country = $this->loadCountryFromValidationData($parameters, $validator)) {
110+
if (! $country = $this->loadCountryFromValidationData($parameters, $validator)) {
111111
return false;
112112
}
113113

@@ -125,7 +125,7 @@ public function looseAdministrativeArea($attribute, $value, array $parameters, B
125125
*/
126126
public function postalCode($attribute, $value, array $parameters, BaseValidator $validator): bool
127127
{
128-
if (!$country = $this->loadCountryFromValidationData($parameters, $validator)) {
128+
if (! $country = $this->loadCountryFromValidationData($parameters, $validator)) {
129129
return false;
130130
}
131131

@@ -147,7 +147,7 @@ protected function loadCountryFromValidationData(array $parameters, BaseValidato
147147
{
148148
$country_input_name = $parameters[0] ?? 'country';
149149

150-
if (!$country_value = Arr::get($validator->getData(), $country_input_name)) {
150+
if (! $country_value = Arr::get($validator->getData(), $country_input_name)) {
151151
return null;
152152
}
153153

@@ -166,7 +166,7 @@ protected function loadCountryFromValidationData(array $parameters, BaseValidato
166166
*/
167167
protected function loadAdministrativeAreaFromValidationData(Country $country, array $parameters, BaseValidator $validator): ?Subdivision
168168
{
169-
if (!$administrative_area_value = $this->loadAdministrativeAreaValueFromValidationData($parameters, $validator)) {
169+
if (! $administrative_area_value = $this->loadAdministrativeAreaValueFromValidationData($parameters, $validator)) {
170170
return null;
171171
}
172172

0 commit comments

Comments
 (0)