Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpcs fixes #2

Open
wants to merge 9 commits into
base: 1.x
Choose a base branch
from
Open

phpcs fixes #2

wants to merge 9 commits into from

Conversation

a-frear
Copy link

@a-frear a-frear commented Jan 30, 2024

No description provided.

@a-frear
Copy link
Author

a-frear commented Jan 30, 2024

@pingevt I have just one more warning but get errors when I try to fix it, maybe we can look at it together:

\Drupal calls should be avoided in classes, use dependency injection instead
(DrupalPractice.Objects.GlobalDrupal.GlobalDrupal)

Here's the line:
$msg = \Drupal::translation()->formatPlural($result_count, '1 result loaded.', '@count results loaded.');

I tried the following use statement:
Drupal\Core\StringTranslation\TranslationManager

But haven't figured out how to use the function correctly in the code itself!

@a-frear a-frear requested a review from pingevt January 30, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant