Skip to content

Commit

Permalink
chore: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin authored and actions-user committed Oct 16, 2021
1 parent c4267a0 commit 41be91b
Show file tree
Hide file tree
Showing 60 changed files with 72 additions and 70 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.0.11","version":"3.2.1","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"packages\/airports-en\/src\/AirportsEnServiceProvider.php":4201067309,"packages\/airlines-en\/src\/AirlinesEnServiceProvider.php":1965765665,"packages\/airlines\/resources\/lang\/en\/validation.php":1212480102,"packages\/airlines\/src\/AirlinesServiceProvider.php":3700874927,"packages\/airlines\/src\/Models\/Airline.php":2783474786,"packages\/airlines\/src\/Rules\/AirlineRule.php":1540072304,"packages\/continents-pl\/src\/ContinentsPlServiceProvider.php":1468991983,"packages\/countries-en\/src\/CountriesEnServiceProvider.php":3338106400,"packages\/continents-en\/src\/ContinentsEnServiceProvider.php":4092071792,"packages\/countries-de\/src\/CountriesDeServiceProvider.php":857933946,"packages\/airports\/resources\/lang\/en\/validation.php":1133078076,"packages\/airports\/src\/AirportsServiceProvider.php":451747056,"packages\/airports\/src\/Models\/Airport.php":2009572090,"packages\/airports\/src\/Rules\/AirportRule.php":709627068,"packages\/currencies-en\/src\/CurrenciesEnServiceProvider.php":301954334,"packages\/currencies\/resources\/lang\/en\/validation.php":1857749034,"packages\/currencies\/src\/CurrenciesServiceProvider.php":2839056063,"packages\/currencies\/src\/Models\/Currency.php":3454970495,"packages\/currencies\/src\/Rules\/CurrencyRule.php":404881495,"packages\/continents-de\/src\/ContinentsDeServiceProvider.php":1626504702,"packages\/repository\/src\/Exceptions\/TranslationNotFoundException.php":355654930,"packages\/repository\/src\/Exceptions\/SourceNotFoundException.php":2109233813,"packages\/repository\/src\/Repository.php":3200319258,"packages\/repository\/src\/RepositoryServiceProvider.php":2410663138,"packages\/repository\/src\/RepositoryManager.php":1283987250,"packages\/countries-pl\/src\/CountriesPlServiceProvider.php":81476599,"packages\/countries-fr\/src\/CountriesFrServiceProvider.php":2034651417,"packages\/timezones-en\/src\/TimezonesEnServiceProvider.php":2190853500,"packages\/regions-en\/src\/RegionsEnServiceProvider.php":1796713020,"packages\/countries-es\/src\/CountriesEsServiceProvider.php":683765241,"packages\/timezones\/resources\/lang\/en\/validation.php":3480241605,"packages\/timezones\/src\/Models\/Timezone.php":3910437017,"packages\/timezones\/src\/Rules\/TimezoneRule.php":3020948440,"packages\/timezones\/src\/TimezonesServiceProvider.php":2033971478,"packages\/rule\/src\/Rule.php":3142695346,"packages\/countries\/resources\/lang\/en\/validation.php":2893753600,"packages\/countries\/src\/CountriesServiceProvider.php":622130492,"packages\/countries\/src\/Models\/Country.php":1316359506,"packages\/countries\/src\/Rules\/CountryRule.php":358537341,"packages\/gb-counties-en\/src\/GbCountiesEnServiceProvider.php":2245615346,"packages\/model\/config\/squire.php":3383853396,"packages\/model\/src\/ModelServiceProvider.php":392339172,"packages\/model\/src\/Model.php":664894157,"packages\/gb-counties\/resources\/lang\/en\/validation.php":1367600077,"packages\/gb-counties\/src\/Models\/GbCounty.php":300079046,"packages\/gb-counties\/src\/Rules\/GbCountyRule.php":3357091350,"packages\/gb-counties\/src\/GbCountiesServiceProvider.php":3066316743,"packages\/regions\/resources\/lang\/en\/validation.php":1547340387,"packages\/regions\/src\/Models\/Region.php":970681662,"packages\/regions\/src\/Rules\/RegionRule.php":2348780623,"packages\/regions\/src\/RegionsServiceProvider.php":1575664229,"packages\/continents\/resources\/lang\/en\/validation.php":1535971186,"packages\/continents\/src\/ContinentsServiceProvider.php":190326936,"packages\/continents\/src\/Models\/Continent.php":1624976291,"packages\/continents\/src\/Rules\/ContinentRule.php":92918134,"tests\/TestCase.php":1487765314,"tests\/TranslationsConsistencyTest.php":4202664027,"tests\/RuleTest.php":1010718728,"tests\/Models\/Foo.php":3338386718,"tests\/Rules\/FooRule.php":2460634395,"tests\/ModelTest.php":2131748539}}
2 changes: 1 addition & 1 deletion packages/airlines-en/src/AirlinesEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Airline::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/airlines/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'airline' => 'The selected :attribute is an invalid airline.',

];
];
2 changes: 1 addition & 1 deletion packages/airlines/src/AirlinesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-airlines'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/airlines/src/Models/Airline.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public function continent(): BelongsTo
{
return $this->hasOneThrough(Continent::class, Country::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/airlines/src/Rules/AirlineRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Airline::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/airports-en/src/AirportsEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Airport::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/airports/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'airport' => 'The selected :attribute is an invalid airport.',

];
];
2 changes: 1 addition & 1 deletion packages/airports/src/AirportsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-airports'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/airports/src/Models/Airport.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public function timezone(): BelongsTo
{
return $this->belongsTo(Timezone::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/airports/src/Rules/AirportRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Airport::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/continents-de/src/ContinentsDeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Continent::class, 'de', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/continents-en/src/ContinentsEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Continent::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/continents/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'continent' => 'The selected :attribute is an invalid continent.',

];
];
2 changes: 1 addition & 1 deletion packages/continents/src/ContinentsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-continents'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/continents/src/Models/Continent.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public function timezones(): HasManyThrough
{
return $this->hasManyThrough(Timezone::class, Country::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/continents/src/Rules/ContinentRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Continent::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/countries-de/src/CountriesDeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Country::class, 'de', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/countries-en/src/CountriesEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Country::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/countries-es/src/CountriesEsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Country::class, 'es', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/countries-fr/src/CountriesFrServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Country::class, 'fr', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/countries/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'country' => 'The selected :attribute is an invalid country.',

];
];
2 changes: 1 addition & 1 deletion packages/countries/src/CountriesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-countries'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/countries/src/Models/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public function timezones(): HasMany
{
return $this->hasMany(Timezone::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/countries/src/Rules/CountryRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Country::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/currencies-en/src/CurrenciesEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Currency::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/currencies/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'currency' => 'The selected :attribute is an invalid currency.',

];
];
2 changes: 1 addition & 1 deletion packages/currencies/src/CurrenciesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-currencies'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/currencies/src/Models/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ public function format(int $number, bool $shouldConvert = false): string
$shouldConvert
))->format();
}
}
}
2 changes: 1 addition & 1 deletion packages/currencies/src/Rules/CurrencyRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Currency::query();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(GbCounty::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/gb-counties/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'gb_county' => 'The selected :attribute is an invalid county.',

];
];
2 changes: 1 addition & 1 deletion packages/gb-counties/src/GbCountiesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-gb-counties'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/gb-counties/src/Models/GbCounty.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public function region(): BelongsTo
{
return $this->belongsTo(Region::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/gb-counties/src/Rules/GbCountyRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\GbCounty::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/model/config/squire.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

'cache-prefix' => 'squire',

];
];
2 changes: 1 addition & 1 deletion packages/model/src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function cache(array $locales = [])

public static function migrate(?string $locale = null): void
{
$tableName = (new static)->getTable();
$tableName = (new static())->getTable();

static::resolveConnection()->getSchemaBuilder()->create($tableName, function (Blueprint $table): void {
foreach (static::$schema as $name => $type) {
Expand Down
5 changes: 3 additions & 2 deletions packages/model/src/ModelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public function boot(): void
]);

$this->mergeConfigFrom(
__DIR__ . '/../config/squire.php', 'squire'
__DIR__ . '/../config/squire.php',
'squire'
);
}
}
}
2 changes: 1 addition & 1 deletion packages/regions-en/src/RegionsEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Region::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/regions/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'region' => 'The selected :attribute is an invalid region.',

];
];
2 changes: 1 addition & 1 deletion packages/regions/src/Models/Region.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public function gbCounties(): HasMany
{
return $this->hasMany(GbCounty::class);
}
}
}
2 changes: 1 addition & 1 deletion packages/regions/src/RegionsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-regions'),
]);
}
}
}
2 changes: 1 addition & 1 deletion packages/regions/src/Rules/RegionRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Region::query();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public function __construct(string $name)
"Unable to locate Squire source for [{$name}]"
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public function __construct(string $name, string $locale)
"Unable to locate [{$locale}] translation for the [{$name}] Squire source."
);
}
}
}
2 changes: 1 addition & 1 deletion packages/repository/src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ protected static function getFacadeAccessor(): string
{
return RepositoryManager::class;
}
}
}
9 changes: 6 additions & 3 deletions packages/repository/src/RepositoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ public function getLocale(string $name): string

public function getSources(?string $name = null): array | string
{
if (! $name) return $this->sources;
if (! $name) {
return $this->sources;
}

if (! $this->sourceIsRegistered($name) || ! count($this->sources[$name]))
if (! $this->sourceIsRegistered($name) || ! count($this->sources[$name])) {
throw new SourceNotFoundException($name);
}

return $this->sources[$name];
}
Expand All @@ -75,4 +78,4 @@ public function registerSource(string $name, string $locale, string $path): void

$this->sources[$name][$locale] = realpath($path);
}
}
}
2 changes: 1 addition & 1 deletion packages/repository/src/RepositoryServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class RepositoryServiceProvider extends ServiceProvider
public array $singletons = [
RepositoryManager::class => RepositoryManager::class,
];
}
}
2 changes: 1 addition & 1 deletion packages/rule/src/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public function passes($attribute, $value): bool
}

abstract protected function getQueryBuilder(): Builder;
}
}
2 changes: 1 addition & 1 deletion packages/timezones-en/src/TimezonesEnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function boot(): void
{
Repository::registerSource(Timezone::class, 'en', __DIR__ . '/../resources/data.csv');
}
}
}
2 changes: 1 addition & 1 deletion packages/timezones/resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

'timezone' => 'The selected :attribute is an invalid timezone.',

];
];
2 changes: 1 addition & 1 deletion packages/timezones/src/Models/Timezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public function getOffset(DateTimeInterface $dateTime): int|false|null

return (new DateTimeZone($this->id))->getOffset($dateTime);
}
}
}
2 changes: 1 addition & 1 deletion packages/timezones/src/Rules/TimezoneRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected function getQueryBuilder(): Builder
{
return Models\Timezone::query();
}
}
}
2 changes: 1 addition & 1 deletion packages/timezones/src/TimezonesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function boot(): void
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/squire-timezones'),
]);
}
}
}
Loading

0 comments on commit 41be91b

Please sign in to comment.