Fix PHP Stan errors
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3310754. -->
Reported by: [vitorbs](https://www.drupal.org/user/3719802)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Used the PHPStan tool on level 0 and found 4 errors, need to fix them.</p>
<pre>------ ----------------------------------------------------------------------------------- <br> Line src/Controller/AdminFeedbackController.php <br> ------ ----------------------------------------------------------------------------------- <br> 55 Unsafe usage of new static(). <br> 💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static <br> ------ ----------------------------------------------------------------------------------- <br><br> ------ ----------------------------------------------------------------------------------- <br> Line src/Form/AdminFeedbackAjaxForm.php <br> ------ ----------------------------------------------------------------------------------- <br> 54 Unsafe usage of new static(). <br> 💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static <br> ------ ----------------------------------------------------------------------------------- <br><br> ------ ------------------------------------------------------------------------------ <br> Line src/Form/AdminFeedbackDeleteForm.php <br> ------ ------------------------------------------------------------------------------ <br> 85 \Drupal calls should be avoided in classes, use dependency injection instead <br> ------ ------------------------------------------------------------------------------ <br><br> ------ ----------------------------------------------------------------------------------- <br> Line src/Plugin/Block/AdminFeedbackBlock.php <br> ------ ----------------------------------------------------------------------------------- <br> 51 Unsafe usage of new static(). <br> 💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static <br> ------ ----------------------------------------------------------------------------------- </pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Use the command <code>lando phpstan analyse web/modules/contrib/admin_feedback/</code></p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Fix manually.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue