FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\umami_analytics\src\JavascriptLocalCache.php
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
130 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Drupal-calls-should-be-avoided-in-classes-3294089-3.patch | 551 bytes | pivica |
Comments
Comment #2
Harsh panchal commentedI have fixed this issue and providing a patch.
Comment #3
pivica commented@Harsh panchal thx for the issue report. The static analysis is correct but your patch has a small error, instead of
$query_string = '?' . ($this->state()->get('system.css_js_query_string') ?: '0');it should be
$query_string = '?' . ($this->state->get('system.css_js_query_string') ?: '0');because `state` is a class property and not it's method.
Attaching a patch that is fixing this.
Comment #5
pivica commentedCommitted.