Merged
Conversation
Contributor
There was a problem hiding this comment.
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
BlockCacheCollectorand 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 previousNodeSetupValidator::validateAndRestore()call was removed). This is a functional behavior change in a PR described as PHPCS/docblock-only, and it also leavesNodeSetupValidatorunused 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
InspectorCommand,CompatibilityCheckCommand,CheckCommand,VersionCommand,BuildCommand,CleanCommand, andListCommand, clarifying their purpose and expected parameters and return types. [1] [2] [3] [4] [5] [6] [7]CompatibilityCheckCommandfor configuration, execution, and scan-related methods, specifying input/output interfaces and return values. [1] [2] [3] [4]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:
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:
configureandexecuteCommandmethods in system and theme command classes, clarifying input/output interfaces and return values. [1] [2] [3] [4] [5] [6]