Skip to content

chore: fix phpcs warnings#144

Merged
Morgy93 merged 3 commits intomainfrom
fix-phpcs-3
Feb 23, 2026
Merged

chore: fix phpcs warnings#144
Morgy93 merged 3 commits intomainfrom
fix-phpcs-3

Conversation

@Morgy93
Copy link
Collaborator

@Morgy93 Morgy93 commented Feb 22, 2026

This pull request adds detailed PHPDoc comments to constructors, methods, and private functions across several console command classes. The main goal is to improve code documentation, making the purpose, parameters, and return values of each function clearer for future maintainers and developers.

Documentation improvements:

  • Added PHPDoc blocks to constructors and methods in InspectorCommand, CompatibilityCheckCommand, CheckCommand, VersionCommand, BuildCommand, CleanCommand, and ListCommand, clarifying their purpose and expected parameters and return types. [1] [2] [3] [4] [5] [6] [7]
  • Enhanced method documentation in CompatibilityCheckCommand for configuration, execution, and scan-related methods, specifying input/output interfaces and return values. [1] [2] [3] [4]
  • Improved documentation for theme-related commands, including TokensCommand, detailing methods for theme selection, validation, token generation, output handling, and vendor theme token copying. [1] [2] [3] [4] [5] [6] [7] [8]

Internal utility function documentation:

  • Added PHPDoc blocks to private functions in AbstractCommand.php, including environment variable handling, sanitization, and cache management, specifying parameters and return types. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Execution method documentation:

  • Updated PHPDoc for configure and executeCommand methods in system and theme command classes, clarifying input/output interfaces and return values. [1] [2] [3] [4] [5] [6]

Copilot AI review requested due to automatic review settings February 22, 2026 21:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily targets PHPCS warnings by expanding PHPDoc coverage across MageForge’s console commands and services, improving type clarity and maintainability for CLI/theme-building workflows.

Changes:

  • Added/expanded PHPDoc blocks for constructors and methods across multiple commands/services.
  • Introduced richer PHPStan type aliases in BlockCacheCollector and adjusted export formatting.
  • Reformatted several method signatures/conditionals for readability (with one notable behavior change in the MagentoStandard theme builder).

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Service/ThemeCleaner.php Added constructor PHPDoc.
src/Service/ThemeBuilder/TailwindCSS/Builder.php Added PHPDoc and reformatted method signatures/calls.
src/Service/ThemeBuilder/MagentoStandard/Builder.php Added PHPDoc, reformatted signatures, refactored Node setup detection, removed NodeSetupValidator usage.
src/Service/ThemeBuilder/HyvaThemes/Builder.php Added PHPDoc and reformatted calls.
src/Service/ThemeBuilder/BuilderPool.php Added PHPDoc for builder retrieval methods.
src/Service/ThemeBuilder/BuilderInterface.php Added detailed PHPDoc for interface methods and formatted signatures.
src/Service/ThemeBuilder/BuilderFactory.php Added PHPDoc for builder registration/creation methods.
src/Service/SymlinkCleaner.php Added constructor PHPDoc.
src/Service/StaticContentDeployer.php Added constructor/method PHPDoc for deploy().
src/Service/StaticContentCleaner.php Added constructor PHPDoc.
src/Service/StandardThemeBuilder.php Added constructor/method PHPDoc.
src/Service/NodeSetupValidator.php Minor formatting; still uses Laravel Prompts confirm().
src/Service/NodePackageManager.php Added constructor PHPDoc.
src/Service/Inspector/Cache/BlockCacheCollector.php Added PHPStan type aliases; adjusted return docs; minor logic refactor for timestamp.
src/Service/Hyva/ModuleScanner.php Added missing PHPDoc param annotations.
src/Service/Hyva/IncompatibilityDetector.php Added missing PHPDoc param/return annotations.
src/Service/Hyva/CompatibilityChecker.php Added constructor PHPDoc and reformatted console output text call.
src/Service/GruntTaskRunner.php Import ordering + added constructor/method PHPDoc.
src/Service/DependencyChecker.php Import ordering + added/expanded PHPDoc on methods.
src/Service/CacheCleaner.php Added constructor/method PHPDoc.
src/Model/ThemePath.php Added constructor/method PHPDoc.
src/Model/TemplateEngine/Plugin/InspectorHints.php Added constructor PHPDoc.
src/Model/TemplateEngine/Decorator/InspectorHints.php Added property PHPDoc for runtime root path field.
src/Model/Config/Source/InspectorTheme.php Added method purpose text to PHPDoc.
src/Console/Command/Theme/WatchCommand.php Replaced inheritdoc with explicit PHPDoc and added return type to configure().
src/Console/Command/Theme/TokensCommand.php Replaced inheritdoc with explicit PHPDoc; added PHPDoc for private helpers.
src/Console/Command/Theme/ListCommand.php Replaced inheritdoc with explicit PHPDoc.
src/Console/Command/Theme/CleanCommand.php Replaced inheritdoc with explicit PHPDoc.
src/Console/Command/Theme/BuildCommand.php Replaced inheritdoc with explicit PHPDoc.
src/Console/Command/System/VersionCommand.php Replaced inheritdoc with explicit PHPDoc.
src/Console/Command/System/CheckCommand.php Replaced inheritdoc with explicit PHPDoc.
src/Console/Command/Hyva/CompatibilityCheckCommand.php Added/expanded PHPDoc for configure/execute and helper methods.
src/Console/Command/Dev/InspectorCommand.php Added constructor PHPDoc.
src/Console/Command/AbstractCommand.php Added PHPDoc for internal env/sanitization helper methods.
Comments suppressed due to low confidence (1)

src/Service/ThemeBuilder/MagentoStandard/Builder.php:138

  • processNodeSetup() no longer validates/restores the standard Magento Node/Grunt setup files (the previous NodeSetupValidator::validateAndRestore() call was removed). This is a functional behavior change in a PR described as PHPCS/docblock-only, and it also leaves NodeSetupValidator unused in the codebase. If the restoration step is still required for projects missing Grunt/Node setup files, please reintroduce it (or replace with an equivalent flow); otherwise consider removing the unused service to avoid dead code.

@Morgy93 Morgy93 merged commit 81e5e28 into main Feb 23, 2026
12 checks passed
@Morgy93 Morgy93 deleted the fix-phpcs-3 branch February 23, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants