Skip to content

v0.0.12

Choose a tag to compare

@daniesy daniesy released this 20 May 09:44
· 16 commits to main since this release
  1. Added Null Safety throughout the code:
  • Added proper null checking in collectStyleNodes method
  • Added null checks in applyAdvancedInlineStyles method
  • Added null checks in deepCloneWithAdvancedStyleRemoval method
  • Added null checking in toInlinedHtml method
  1. Applied the DRY (Don't Repeat Yourself) principle:
  • Created a generic insertRelative method that handles both insertBefore and insertAfter functionality
  • Improved code organization and reusability
  1. Improved Documentation:
  • Added detailed PHP doc comments to methods in TextNode.php
  • Added improved comments to the CommentNode constructor
  • Added better documentation to the parseAttributes method in DOMinator.php
  • Added clarifying comments for code blocks in more complex methods
  1. Fixed Inconsistencies:
  • Added missing use statements in ScriptNode.php and StyleNode.php
  • Ensured consistent use of null checking throughout traversal methods
  • Fixed and improved the CommentNode class
  • Improved the PrettyPrinting functionality
  1. Code Style and Quality Improvements:
  • Improved variable naming for clarity (e.g., 'styleValue' instead of initially setting an empty string)
  • Added explicit null checks before accessing properties
  • Structured complex methods with consistent indentation and logical grouping
  • Added explanatory comments for complex logic