Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tag handling; update test #289

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Feb 23, 2025

This isn't a new feature, but rather a small improvement on tag handling.

Here's what changed:

  1. hasTag/hasTags code is always the same, so I moved it into a trait (that depends on abstract method getTags).
  2. I removed the somewhat redundant PHPDoc comments, in favour of the one provided by the interface
  3. ExampleTableNode now implements TaggedNodeInterface and the new trait - I couldn't see why it wouldn't have that in the first place
  4. I've updated a test to cover point 3.

It would have been nice to move getTags to the trait too, but at this PHP level we can't define abstract properties or property requirements, so I think this is the safest and cleanest approach at the moment.

@uuf6429 uuf6429 requested a review from stof February 24, 2025 18:53
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