$ phpcs --standard=Drupalpractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml bookable_calendar/

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\BookableCalendarOpeningInstanceViewsData.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
32 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
33 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
35 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
40 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
75 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
80 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\BookableCalendarOpeningViewsData.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
32 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
33 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
35 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
40 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
75 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
80 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\BookingViewsData.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
32 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
33 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
35 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
40 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
75 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
80 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Rakhi Soni created an issue. See original summary.

rakhi soni’s picture

Assigned: rakhi soni » Unassigned
Status: Active » Needs review
StatusFileSize
new9.31 KB

I have created a patch to fix the issue of "t() calls should be avoided in classes.",, please review.

urvashi_vora’s picture

Assigned: Unassigned » urvashi_vora

Hi,
I will review this.

urvashi_vora’s picture

Hi @Rakhi,

Your patch was applied cleanly.

urvasi@urvasi-Inspiron-15-3552:/var/www/html/contribution/d8_cont/web/modules/contrib/bookable_calendar-3291632$ git apply -v T_calls_should_be_avoided-3291632-2.patch
Checking patch src/BookableCalendarOpeningInstanceViewsData.php...
Hunk #4 succeeded at 86 (offset 11 lines).
Checking patch src/BookableCalendarOpeningViewsData.php...
Checking patch src/BookingViewsData.php...
Applied patch src/BookableCalendarOpeningInstanceViewsData.php cleanly.
Applied patch src/BookableCalendarOpeningViewsData.php cleanly.
Applied patch src/BookingViewsData.php cleanly.

Thanks for the patch.

urvashi_vora’s picture

Status: Needs review » Needs work

However, it still contains some t() calls. Marking it to "Needs work".

I am working on this.

urvashi_vora’s picture

Assigned: urvashi_vora » Unassigned
Status: Needs work » Needs review
StatusFileSize
new39.07 KB
new29.27 KB

Hi,

Please review this patch.

Thanks

anoopsingh92’s picture

Status: Needs review » Needs work

Hi @urvashi_vora,

I reviewed your patch. Your patch has been applied successfully.

Lenovo@LAPTOP-PDE747K8 MINGW64 /c/xampp/htdocs/drupal-9/web/modules/contrib/bookable_calendar-3291632 (3291632-t-calls-should)
$ git apply -v t_calls_replaced-3291632-6.patch
Checking patch bookable_calendar.install...
Checking patch src/BookableCalendarOpeningInstanceViewsData.php...
Checking patch src/BookableCalendarOpeningViewsData.php...
Checking patch src/BookingViewsData.php...
Checking patch src/Entity/BookableCalendar.php...
Checking patch src/Entity/BookableCalendarOpening.php...
Checking patch src/Entity/BookableCalendarOpeningInstance.php...
Checking patch src/Entity/Booking.php...
Checking patch src/Entity/BookingContact.php...
Applied patch bookable_calendar.install cleanly.
Applied patch src/BookableCalendarOpeningInstanceViewsData.php cleanly.
Applied patch src/BookableCalendarOpeningViewsData.php cleanly.
Applied patch src/BookingViewsData.php cleanly.
Applied patch src/Entity/BookableCalendar.php cleanly.
Applied patch src/Entity/BookableCalendarOpening.php cleanly.
Applied patch src/Entity/BookableCalendarOpeningInstance.php cleanly.
Applied patch src/Entity/Booking.php cleanly.
Applied patch src/Entity/BookingContact.php cleanly.

Thanks for the patch.

Thanks

anoopsingh92’s picture

Assigned: Unassigned » anoopsingh92
anoopsingh92’s picture

Assigned: anoopsingh92 » Unassigned
Status: Needs work » Reviewed & tested by the community

Mistakenly changes the status as Need work.

josh.fabean’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.