Fix remaining PHPStan errors
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582236. -->
Reported by: [andybroomfield](https://www.drupal.org/user/636756)
Related to !10
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Here's the remaining errors</p>
<p> ------ ----------------------------------------------------------------------<br>
Line src/Plugin/Field/FieldWidget/FacetFieldWidget.php<br>
------ ----------------------------------------------------------------------<br>
45 \Drupal calls should be avoided in classes, use dependency injection<br>
instead<br>
🪪 globalDrupalDependencyInjection.useDependencyInjection<br>
48 \Drupal calls should be avoided in classes, use dependency injection<br>
instead<br>
🪪 globalDrupalDependencyInjection.useDependencyInjection<br>
------ ----------------------------------------------------------------------<br>
------ -----------------------------------------------------------------------<br>
Line src/Plugin/PreviewLinkAutopopulate/DirectoryChannel.php<br>
------ -----------------------------------------------------------------------<br>
22 Class<br>
Drupal\localgov_directories\Plugin\PreviewLinkAutopopulate\DirectoryC<br>
hannel extends unknown class<br>
Drupal\preview_link\PreviewLinkAutopopulatePluginBase.<br>
🪪 class.notFound (non-ignorable)<br>
💡 Learn more at <a href="https://phpstan.org/user-guide/discovering-symbols">https://phpstan.org/user-guide/discovering-symbols</a><br>
29 Call to an undefined method<br>
Drupal\localgov_directories\Plugin\PreviewLinkAutopopulate\DirectoryC<br>
hannel::getEntity().<br>
🪪 method.notFound<br>
32 Access to an undefined property<br>
Drupal\localgov_directories\Plugin\PreviewLinkAutopopulate\DirectoryC<br>
hannel::$entityTypeManager.<br>
🪪 property.notFound<br>
💡 Learn more: <a href="https://phpstan.org/blog/solving-phpstan-access-to-und">https://phpstan.org/blog/solving-phpstan-access-to-und</a><br>
efined-property<br>
------ -----------------------------------------------------------------------<br>
------ ----------------------------------------------------------------------<br>
Line src/Plugin/facets/query_type/LocalGovDirectoriesQueryType.php<br>
------ ----------------------------------------------------------------------<br>
44 \Drupal calls should be avoided in classes, use dependency injection<br>
instead<br>
🪪 globalDrupalDependencyInjection.useDependencyInjection<br>
185 \Drupal calls should be avoided in classes, use dependency injection<br>
instead<br>
🪪 globalDrupalDependencyInjection.useDependencyInjection<br>
------ ---------------------------------------------------------------------- </p>
issue