Fix issues reported by PHPStan

Created on 14 February 2024, 4 months ago
Updated 15 February 2024, 4 months ago

Problem/Motivation

With πŸ“Œ Integration with Gitlab CI Fixed in place, we can start checking for PHPStan. There is a report now for the issues we can fix.

 ------ -----------------------------------------------------------------------------------
  Line   src/AdminToolbarContentPluginBase.php
 ------ -----------------------------------------------------------------------------------
  156    Unsafe usage of new static().
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
  691    \Drupal calls should be avoided in classes, use dependency injection instead
 ------ -----------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------
  Line   src/Form/AdminToolbarContentSettingsForm.php
 ------ -----------------------------------------------------------------------------------
  45     Unsafe usage of new static().
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
  144    \Drupal calls should be avoided in classes, use dependency injection instead
 ------ -----------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------
  Line   src/Plugin/Derivative/AdminToolbarContentMenuLinks.php
 ------ -----------------------------------------------------------------------------------
  37     Unsafe usage of new static().
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
 ------ -----------------------------------------------------------------------------------

Steps to reproduce

Run phpstan analyse

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024