Skip to content

Conversation

@Morgy93
Copy link
Collaborator

@Morgy93 Morgy93 commented Jan 21, 2026

This pull request primarily includes refactoring and minor behavior adjustments across several files to improve code clarity, error handling, and dependency management. The most important changes involve relaxing static analysis requirements, refining command return values, and cleaning up unused dependencies.

Static Analysis and CI Adjustments:

  • Lowered the PHPStan static analysis level from 6 to 5 in phpstan.neon, making static analysis less strict.
  • Removed continue-on-error: true from the PHPStan GitHub Actions workflow, so the workflow will now fail on PHPStan errors.

Command and Return Value Handling:

  • Updated TokensCommand.php and InspectorCommand.php to return null instead of Cli::RETURN_FAILURE in some cases, aligning return values with expected behaviors and possibly improving error handling. [1] [2] [3]

Dependency and Constructor Cleanup:

  • Removed unused dependencies from constructors in ThemePath and CompatibilityChecker, simplifying these classes and reducing coupling. [1] [2]

Logic and Behavior Refinements:

  • Changed StaticContentCleaner to return a boolean based only on files being cleaned, not on the existence of static files, clarifying its intent.
  • Added a guard in InspectorHints to skip block hint injection when not enabled, preventing unnecessary processing.

Miscellaneous Cleanup:

  • Removed the unused PACKAGE_NAME constant from VersionCommand.php.

@Morgy93 Morgy93 enabled auto-merge (squash) January 21, 2026 08:30
@Morgy93 Morgy93 requested a review from dermatz January 21, 2026 08:31
@Morgy93 Morgy93 marked this pull request as draft January 21, 2026 10:17
auto-merge was automatically disabled January 21, 2026 10:17

Pull request was converted to draft

@dermatz dermatz changed the title fix: phpstan level 5 errors fix: phpstan level 5 errors #84 Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants