Skip to content

PHP Mess Detector Report

Unused Code

PriorityFileLineRuleMessage
3src/Command/CreateClassCommand.php184UnusedLocalVariableAvoid unused local variables such as $isEnumType.
3src/Command/WatchCommand.php34UnusedPrivateFieldAvoid unused private fields such as $data.
3src/Command/WatchCommand.php228UnusedPrivateMethodAvoid unused private methods such as parseFile.
3src/Command/WatchCommand.php228UnusedFormalParameterAvoid unused parameters such as $generator.
3src/Command/WatchCommand.php228UnusedFormalParameterAvoid unused parameters such as $sourceFile.
3src/Command/WatchCommand.php228UnusedFormalParameterAvoid unused parameters such as $dest.
3src/Command/WatchCommand.php228UnusedFormalParameterAvoid unused parameters such as $io.
3src/Command/WatchCommand.php233UnusedPrivateMethodAvoid unused private methods such as formatHtml.
3src/Service/ComponentBuilder.php50UnusedLocalVariableAvoid unused local variables such as $childElement.

Issues detected: 9

Code Size

PriorityFileLineRuleMessage
3src/Command/CreateClassCommand.php21ExcessiveClassComplexityThe class CreateClassCommand has an overall complexity of 57 which is very high. The configured complexity threshold is 50.
3src/Command/CreateEnumCommand.php28CyclomaticComplexityThe method __invoke() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
3src/Command/WatchCommand.php50CyclomaticComplexityThe method __invoke() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
3src/Command/WatchCommand.php50NPathComplexityThe method __invoke() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
3src/Delegator/HTMLElementDelegator.php35ExcessiveClassComplexityThe class HTMLElementDelegator has an overall complexity of 51 which is very high. The configured complexity threshold is 50.
3src/Delegator/HTMLElementDelegator.php175CyclomaticComplexityThe method setAttribute() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
3src/Delegator/HTMLElementDelegator.php175NPathComplexityThe method setAttribute() has an NPath complexity of 324. The configured NPath complexity threshold is 200.
3src/Element/Block/Body.php59ExcessivePublicCountThe class Body has 52 public methods and attributes. Consider reducing the number of public items to less than 45.
3src/Element/Block/Body.php59TooManyFieldsThe class Body has 20 fields. Consider redesigning Body to keep the number of fields under 15.
3src/Element/Inline/Input.php36ExcessivePublicCountThe class Input has 74 public methods and attributes. Consider reducing the number of public items to less than 45.
3src/Element/Inline/Input.php36TooManyFieldsThe class Input has 28 fields. Consider redesigning Input to keep the number of fields under 15.
3src/Element/Inline/Input.php36ExcessiveClassComplexityThe class Input has an overall complexity of 50 which is very high. The configured complexity threshold is 50.
3src/Element/Inline/Textarea.php36TooManyFieldsThe class Textarea has 16 fields. Consider redesigning Textarea to keep the number of fields under 15.
3src/Trait/ClassResolverTrait.php44CyclomaticComplexityThe method getElementByQualifiedName() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
3src/Trait/GlobalAttributesTrait.php19ExcessivePublicCountThe trait GlobalAttributesTrait has 48 public methods and attributes. Consider reducing the number of public items to less than 45.

Issues detected: 15

Clean Code

PriorityFileLineRuleMessage
1src/Command/CreateClassCommand.php36StaticAccessAvoid using static access to class \Symfony\Component\Yaml\Yaml in method __invoke.
1src/Command/CreateClassCommand.php257ElseExpressionThe method getMethods uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Command/CreateClassCommand.php362ElseExpressionThe method getAttributeComment uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Command/CreateClassCommand.php424StaticAccessAvoid using static access to class \Html\Helper\Helper in method getClassName.
1src/Command/CreateEnumCommand.php38StaticAccessAvoid using static access to class \Symfony\Component\Yaml\Yaml in method __invoke.
1src/Command/CreateJsonCommand.php31StaticAccessAvoid using static access to class \Symfony\Component\Yaml\Yaml in method __invoke.
1src/Command/WatchCommand.php54BooleanArgumentFlagThe method __invoke has a boolean flag argument $overwriteExisting, which is a certain sign of a Single Responsibility Principle violation.
1src/Command/WatchCommand.php62ElseExpressionThe method __invoke uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Command/WatchCommand.php112StaticAccessAvoid using static access to class \Revolt\EventLoop in method __invoke.
1src/Command/WatchCommand.php116StaticAccessAvoid using static access to class \Revolt\EventLoop in method __invoke.
1src/Command/WatchCommand.php121StaticAccessAvoid using static access to class \Revolt\EventLoop in method __invoke.
1src/Command/WatchCommand.php163StaticAccessAvoid using static access to class \Html\Delegator\HTMLDocumentDelegator in method processSingleFile.
1src/Command/WatchCommand.php192ElseExpressionThe method processSingleFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Command/WatchCommand.php233ErrorControlOperatorRemove error control operator @ on line 239.
1src/Command/WatchCommand.php247ElseExpressionThe method createDirectory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Delegator/HTMLDocumentDelegator.php87StaticAccessAvoid using static access to class \DOM\HTMLDocument in method createEmpty.
1src/Delegator/HTMLDocumentDelegator.php92StaticAccessAvoid using static access to class \DOM\HTMLDocument in method createFromString.
1src/Delegator/HTMLDocumentDelegator.php97StaticAccessAvoid using static access to class \DOM\HTMLDocument in method createFromFile.
1src/Delegator/HTMLElementDelegator.php73StaticAccessAvoid using static access to class \Html\Helper\Helper in method __set.
1src/Delegator/HTMLElementDelegator.php89ElseExpressionThe method __set uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Delegator/HTMLElementDelegator.php101StaticAccessAvoid using static access to class \Html\Helper\Helper in method __set.
1src/Delegator/HTMLElementDelegator.php191ElseExpressionThe method setAttribute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Delegator/HTMLElementDelegator.php200ElseExpressionThe method setAttribute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Element/Block/Audio.php125StaticAccessAvoid using static access to class \Html\Enum\CrossoriginEnum in method setCrossorigin.
1src/Element/Block/Audio.php167StaticAccessAvoid using static access to class \Html\Enum\PreloadEnum in method setPreload.
1src/Element/Block/Form.php169StaticAccessAvoid using static access to class \Html\Enum\AutocompleteEnum in method setAutocomplete.
1src/Element/Block/Form.php187StaticAccessAvoid using static access to class \Html\Enum\EnctypeEnum in method setEnctype.
1src/Element/Block/Form.php205StaticAccessAvoid using static access to class \Html\Enum\MethodEnum in method setMethod.
1src/Element/Block/Form.php245StaticAccessAvoid using static access to class \Html\Enum\TargetEnum in method setTarget.
1src/Element/Block/HorizontalRule.php86StaticAccessAvoid using static access to class \Html\Enum\AlignEnum in method setAlign.
1src/Element/Block/InlineFrame.php147StaticAccessAvoid using static access to class \Html\Enum\ReferrerpolicyEnum in method setReferrerpolicy.
1src/Element/Block/OrderedList.php111StaticAccessAvoid using static access to class \Html\Enum\TypeOlEnum in method setType.
1src/Element/Block/TableRow.php85StaticAccessAvoid using static access to class \Html\Enum\AlignEnum in method setAlign.
1src/Element/Block/TableRow.php137StaticAccessAvoid using static access to class \Html\Enum\ValignEnum in method setValign.
1src/Element/Block/Video.php137StaticAccessAvoid using static access to class \Html\Enum\CrossoriginEnum in method setCrossorigin.
1src/Element/Block/Video.php203StaticAccessAvoid using static access to class \Html\Enum\PreloadEnum in method setPreload.
1src/Element/Inline/Anchor.php159StaticAccessAvoid using static access to class \Html\Enum\RelEnum in method setRel.
1src/Element/Inline/Anchor.php176StaticAccessAvoid using static access to class \Html\Enum\TargetEnum in method setTarget.
1src/Element/Inline/Button.php146StaticAccessAvoid using static access to class \Html\Enum\TypeButtonEnum in method setType.
1src/Element/Inline/Image.php153StaticAccessAvoid using static access to class \Html\Enum\CrossoriginEnum in method setCrossorigin.
1src/Element/Inline/Image.php171StaticAccessAvoid using static access to class \Html\Enum\DecodingEnum in method setDecoding.
1src/Element/Inline/Image.php213StaticAccessAvoid using static access to class \Html\Enum\ReferrerpolicyEnum in method setReferrerpolicy.
1src/Element/Inline/Input.php234StaticAccessAvoid using static access to class \Html\Enum\AutocompleteEnum in method setAutocomplete.
1src/Element/Inline/Input.php468StaticAccessAvoid using static access to class \Html\Enum\TypeInputEnum in method setType.
1src/Element/Inline/Select.php115StaticAccessAvoid using static access to class \Html\Enum\AutocompleteEnum in method setAutocomplete.
1src/Element/Inline/Textarea.php144StaticAccessAvoid using static access to class \Html\Enum\AutocompleteEnum in method setAutocomplete.
1src/Element/Inline/Textarea.php282StaticAccessAvoid using static access to class \Html\Enum\WrapEnum in method setWrap.
1src/Element/Void/Area.php191StaticAccessAvoid using static access to class \Html\Enum\RelEnum in method setRel.
1src/Element/Void/Area.php207StaticAccessAvoid using static access to class \Html\Enum\ShapeEnum in method setShape.
1src/Element/Void/Area.php223StaticAccessAvoid using static access to class \Html\Enum\TargetEnum in method setTarget.
1src/Element/Void/Base.php83StaticAccessAvoid using static access to class \Html\Enum\TargetEnum in method setTarget.
1src/Element/Void/Link.php104StaticAccessAvoid using static access to class \Html\Enum\CrossoriginEnum in method setCrossorigin.
1src/Element/Void/Link.php170StaticAccessAvoid using static access to class \Html\Enum\ReferrerpolicyEnum in method setReferrerpolicy.
1src/Element/Void/Link.php188StaticAccessAvoid using static access to class \Html\Enum\RelEnum in method setRel.
1src/Element/Void/Meta.php108StaticAccessAvoid using static access to class \Html\Enum\HttpEquivEnum in method setHttpEquiv.
1src/Element/Void/Script.php127StaticAccessAvoid using static access to class \Html\Enum\CrossoriginEnum in method setCrossorigin.
1src/Element/Void/Script.php181StaticAccessAvoid using static access to class \Html\Enum\ReferrerpolicyEnum in method setReferrerpolicy.
1src/Element/Void/Script.php211StaticAccessAvoid using static access to class \Html\Enum\TypeScriptEnum in method setType.
1src/Element/Void/Style.php128StaticAccessAvoid using static access to class \Html\Enum\TypeStyleEnum in method setType.
1src/Element/Void/Track.php114StaticAccessAvoid using static access to class \Html\Enum\KindEnum in method setKind.
1src/Service/ComponentBuilder.php54ElseExpressionThe method buildDOM uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Service/ComponentBuilder.php63ElseExpressionThe method buildDOM uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
1src/Trait/GlobalAttributesTrait.php189StaticAccessAvoid using static access to class \Html\Enum\AutoCapitalizeEnum in method setAutoCapitalize.
1src/Trait/GlobalAttributesTrait.php209StaticAccessAvoid using static access to class \Html\Enum\ContentEditableEnum in method setContentEditable.
1src/Trait/GlobalAttributesTrait.php216StaticAccessAvoid using static access to class \Html\Enum\ContentEditableEnum in method setContentEditable.
1src/Trait/GlobalAttributesTrait.php218StaticAccessAvoid using static access to class \Html\Enum\ContentEditableEnum in method setContentEditable.
1src/Trait/GlobalAttributesTrait.php258StaticAccessAvoid using static access to class \Html\Enum\DirectionEnum in method setDir.
1src/Trait/GlobalAttributesTrait.php262StaticAccessAvoid using static access to class \Html\Enum\DirectionEnum in method setDir.
1src/Trait/GlobalAttributesTrait.php263StaticAccessAvoid using static access to class \Html\Enum\DirectionEnum in method setDir.
1src/Trait/GlobalAttributesTrait.php275BooleanArgumentFlagThe method setDraggable has a boolean flag argument $draggable, which is a certain sign of a Single Responsibility Principle violation.
1src/Trait/GlobalAttributesTrait.php294BooleanArgumentFlagThe method setHidden has a boolean flag argument $hidden, which is a certain sign of a Single Responsibility Principle violation.
1src/Trait/GlobalAttributesTrait.php326StaticAccessAvoid using static access to class \Html\Enum\InputModeEnum in method setInputMode.
1src/Trait/GlobalAttributesTrait.php329StaticAccessAvoid using static access to class \Html\Enum\InputModeEnum in method setInputMode.
1src/Trait/GlobalAttributesTrait.php453StaticAccessAvoid using static access to class \Html\Enum\SpellCheckEnum in method setSpellCheck.
1src/Trait/GlobalAttributesTrait.php456StaticAccessAvoid using static access to class \Html\Enum\SpellCheckEnum in method setSpellCheck.
1src/Trait/GlobalAttributesTrait.php459StaticAccessAvoid using static access to class \Html\Enum\SpellCheckEnum in method setSpellCheck.

Issues detected: 76

Design

PriorityFileLineRuleMessage
2src/Delegator/HTMLElementDelegator.php35CouplingBetweenObjectsThe class HTMLElementDelegator has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.
2src/Element/BlockElement.php7NumberOfChildrenThe class BlockElement has 60 children. Consider to rebalance this class hierarchy to keep number of children under 15.
2src/Element/InlineElement.php7NumberOfChildrenThe class InlineElement has 38 children. Consider to rebalance this class hierarchy to keep number of children under 15.
1src/Command/WatchCommand.php68ExitExpressionThe method __invoke() contains an exit expression.
1src/Command/WatchCommand.php118ExitExpressionThe method __invoke() contains an exit expression.
1src/Command/WatchCommand.php160ExitExpressionThe method processSingleFile() contains an exit expression.
1src/Command/WatchCommand.php199ExitExpressionThe method processSingleFile() contains an exit expression.
1src/Command/WatchCommand.php249ExitExpressionThe method createDirectory() contains an exit expression.

Issues detected: 8

Mon Jul 14 12:31:54 PM CEST 2025

Thanks for visiting!