Skip to content

Commit

Permalink
chore: use new validation attributes from changed namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Oct 19, 2024
1 parent f0ae962 commit c264e2a
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions extensions/package-manager/src/ConfigureAuthValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ class ConfigureAuthValidator extends AbstractValidator
protected function attributes()
{
return [
'github-oauth' => $this->translator->trans('validation.attributes.github_oauth'),
'github-oauth.*' => $this->translator->trans('validation.attributes.github_oauth_*'),
'gitlab-oauth' => $this->translator->trans('validation.attributes.gitlab_oauth'),
'gitlab-oauth.*' => $this->translator->trans('validation.attributes.gitlab_oauth_*'),
'gitlab-token' => $this->translator->trans('validation.attributes.gitlab_token'),
'gitlab-token.*' => $this->translator->trans('validation.attributes.gitlab_token_*'),
'bearer' => $this->translator->trans('validation.attributes.bearer'),
'bearer.*' => $this->translator->trans('validation.attributes.bearer_*'),
'github-oauth' => $this->translator->trans('flarum-extension-manager.validation.attributes.github_oauth'),
'github-oauth.*' => $this->translator->trans('flarum-extension-manager.validation.attributes.github_oauth_*'),
'gitlab-oauth' => $this->translator->trans('flarum-extension-manager.validation.attributes.gitlab_oauth'),
'gitlab-oauth.*' => $this->translator->trans('flarum-extension-manager.validation.attributes.gitlab_oauth_*'),
'gitlab-token' => $this->translator->trans('flarum-extension-manager.validation.attributes.gitlab_token'),
'gitlab-token.*' => $this->translator->trans('flarum-extension-manager.validation.attributes.gitlab_token_*'),
'bearer' => $this->translator->trans('flarum-extension-manager.validation.attributes.bearer'),
'bearer.*' => $this->translator->trans('flarum-extension-manager.validation.attributes.bearer_*'),
];
}
}
10 changes: 5 additions & 5 deletions extensions/package-manager/src/ConfigureComposerValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class ConfigureComposerValidator extends AbstractValidator
protected function attributes()
{
return [
'minimum-stability' => $this->translator->trans('validation.attributes.minimum_stability'),
'repositories' => $this->translator->trans('validation.attributes.repositories'),
'repositories.*' => $this->translator->trans('validation.attributes.repositories_*'),
'repositories.*.type' => $this->translator->trans('validation.attributes.repositories_*_type'),
'repositories.*.url' => $this->translator->trans('validation.attributes.repositories_*_url'),
'minimum-stability' => $this->translator->trans('flarum-extension-manager.validation.attributes.minimum_stability'),
'repositories' => $this->translator->trans('flarum-extension-manager.validation.attributes.repositories'),
'repositories.*' => $this->translator->trans('flarum-extension-manager.validation.attributes.repositories_*'),
'repositories.*.type' => $this->translator->trans('flarum-extension-manager.validation.attributes.repositories_*_type'),
'repositories.*.url' => $this->translator->trans('flarum-extension-manager.validation.attributes.repositories_*_url'),
];
}
}
2 changes: 1 addition & 1 deletion extensions/package-manager/src/RequirePackageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class RequirePackageValidator extends AbstractValidator
protected function attributes()
{
return [
'package' => $this->translator->trans('validation.attributes.package')
'package' => $this->translator->trans('flarum-extension-manager.validation.attributes.package')
];
}
}
4 changes: 2 additions & 2 deletions extensions/package-manager/src/UpdateExtensionValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class UpdateExtensionValidator extends AbstractValidator
protected function attributes()
{
return [
'extensionId' => $this->translator->trans('validation.attributes.extension_id'),
'updateMode' => $this->translator->trans('validation.attributes.update_mode')
'extensionId' => $this->translator->trans('flarum-extension-manager.validation.attributes.extension_id'),
'updateMode' => $this->translator->trans('flarum-extension-manager.validation.attributes.update_mode')
];
}
}
4 changes: 2 additions & 2 deletions extensions/package-manager/src/WhyNotValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class WhyNotValidator extends AbstractValidator
protected function attributes()
{
return [
'package' => $this->translator->trans('validation.attributes.package'),
'version' => $this->translator->trans('validation.attributes.version')
'package' => $this->translator->trans('flarum-extension-manager.validation.attributes.package'),
'version' => $this->translator->trans('flarum-extension-manager.validation.attributes.version')
];
}
}
2 changes: 1 addition & 1 deletion extensions/suspend/src/SuspendValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SuspendValidator extends AbstractValidator
protected function attributes()
{
return [
'suspendedUntil' => $this->translator->trans('validation.attributes.suspended_until')
'suspendedUntil' => $this->translator->trans('flarum-suspend.validation.attributes.suspended_until')
];
}
}
4 changes: 2 additions & 2 deletions extensions/tags/src/Listener/SaveTagsToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ protected function getMessages()
protected function attributes()
{
return [
'tag_count_primary' => $this->translator->trans('validation.attributes.tag_count_primary'),
'tag_count_secondary' => $this->translator->trans('validation.attributes.tag_count_secondary'),
'tag_count_primary' => $this->translator->trans('flarum-tags.validation.attributes.tag_count_primary'),
'tag_count_secondary' => $this->translator->trans('flarum-tags.validation.attributes.tag_count_secondary'),
];
}
}
10 changes: 5 additions & 5 deletions extensions/tags/src/TagValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class TagValidator extends AbstractValidator
protected function attributes()
{
return [
'name' => $this->translator->trans('validation.attributes.name'),
'slug' => $this->translator->trans('validation.attributes.slug'),
'is_hidden' => $this->translator->trans('validation.attributes.is_hidden'),
'description' => $this->translator->trans('validation.attributes.description'),
'color' => $this->translator->trans('validation.attributes.color'),
'name' => $this->translator->trans('flarum-tags.validation.attributes.name'),
'slug' => $this->translator->trans('flarum-tags.validation.attributes.slug'),
'is_hidden' => $this->translator->trans('flarum-tags.validation.attributes.is_hidden'),
'description' => $this->translator->trans('flarum-tags.validation.attributes.description'),
'color' => $this->translator->trans('flarum-tags.validation.attributes.color'),
];
}
}

0 comments on commit c264e2a

Please sign in to comment.