Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Sep 7, 2024
1 parent 3dbd852 commit a18006e
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Concerns/HasValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function get(BackedEnum|int|string $key): mixed
{
$key = $this->resolveKey($key);

$main = $this->key . '.' . $key;
$main = $this->key . '.' . $key;
$default = $this->default ? $this->default . '.' . $key : null;

if ($this->default) {
Expand Down
8 changes: 4 additions & 4 deletions src/Constants/RouteName.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

class RouteName
{
public const Column = 'locale';
public const Cookie = 'Accept-Language';
public const Header = 'Accept-Language';
public const Column = 'locale';
public const Cookie = 'Accept-Language';
public const Header = 'Accept-Language';
public const Parameter = 'locale';
public const Session = 'Accept-Language';
public const Session = 'Accept-Language';
}
3 changes: 2 additions & 1 deletion src/Data/Common/NonPushableData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class NonPushableData
public function __construct(
protected readonly string $key,
protected readonly ?string $default = null
) {}
) {
}

public function all(): array
{
Expand Down
3 changes: 2 additions & 1 deletion src/Data/Common/PushableData.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class PushableData
public function __construct(
protected readonly string $key,
protected readonly ?string $default = null
) {}
) {
}

public function all(): array
{
Expand Down
3 changes: 2 additions & 1 deletion src/Data/Hidden/ModelsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class ModelsData
{
public function __construct(
public array|string $directory
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/HiddenData.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ public function __construct(
public PushableData $packages,
public NonPushableData $map,
public ModelsData $models,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/ModelsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public function __construct(
public string $suffix,
public string $helpers,
public ModelsFilterData $filter,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/ModelsFilterData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class ModelsFilterData
{
public function __construct(
public bool $enabled,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/RouteNameData.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ public function __construct(
public string $cookie,
public string $session,
public string $column,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/RoutesData.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public function __construct(
public RouteNameData $names,
public string $namePrefix,
public bool $redirect,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/SmartPunctuationData.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ public function __construct(
public bool $enabled,
public array $common,
public NonPushableData $locales,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/Translators/TranslatorChannelsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ class TranslatorChannelsData
public function __construct(
public array $all,
public array $enabled,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/Translators/TranslatorData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public function __construct(
public string $translator,
public array $credentials = [],
public int $priority = 0,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/Translators/TranslatorOptionsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class TranslatorOptionsData
{
public function __construct(
public bool|string $preserveParameters
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/Shared/TranslatorsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class TranslatorsData
public function __construct(
public TranslatorChannelsData $channels,
public TranslatorOptionsData $options,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Data/SharedData.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public function __construct(
public RoutesData $routes,
public ModelsData $models,
public TranslatorsData $translators,
) {}
) {
}
}
7 changes: 4 additions & 3 deletions src/Services/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class Config
{
public function __construct(
protected Repository $config
) {}
) {
}

public function shared(): SharedData
{
Expand Down Expand Up @@ -141,7 +142,7 @@ protected function getTranslators(): array
enabled : $item['enabled'] ?? true,
translator : $item['translator'],
credentials: $item['credentials'] ?? [],
priority : $item['priority'] ?? 0
priority : $item['priority'] ?? 0
)
)->sortBy(fn (TranslatorData $item) => $item->priority)->all();
}
Expand All @@ -153,7 +154,7 @@ protected function value(
?string $object = null,
mixed $fallback = null
): mixed {
$main = $name->value . '.' . $key;
$main = $name->value . '.' . $key;
$default = $default ? $name->value . '.' . $default : null;

if (is_null($object)) {
Expand Down

0 comments on commit a18006e

Please sign in to comment.