stable

Clone or download

Read-only

refactor: And & Or are Logical

The aim of this contribution is to better segregate Visitable implementations. Currently we have the following inheritance: Visitable ├ AndExpression ├ AndOperand ├ OrExpression ├ OrExpression ├ Comparison │ ├ BetweenComparison │ ├ GreaterThanOrEqualComparison │ ├ NotEqualComparison │ ├ LesserThanOrEqualComparison │ ├ NotInComparison │ ├ InComparison │ ├ LesserThanComparison │ ├ GreaterThanComparison │ └ EqualComparison └ Searchable ├ Metadata └ Field This contribution introduces the `Logical` interface so that we now have: Visitable ├ Logical │ ├ AndExpression │ ├ AndOperand │ ├ OrExpression │ └ OrExpression ├ Comparison │ ├ BetweenComparison │ ├ GreaterThanOrEqualComparison │ ├ NotEqualComparison │ ├ LesserThanOrEqualComparison │ ├ NotInComparison │ ├ InComparison │ ├ LesserThanComparison │ ├ GreaterThanComparison │ └ EqualComparison └ Searchable ├ Metadata └ Field Note: since we now have return types on getExpression/getOperand, psalm is not happy about Term not having `accept` method (In QueryBuilderVisitor for example). So now Term extends Visitable. No functional changes Preparation step for epic #32276: Filter on Artifact Links with TQL Change-Id: I85f1fb96a21d2bc41c2b8b13efbd3d68c23b35f4

Modified Files

Name
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/AndExpression.php +4 −15 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/AndOperand.php +4 −15 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Logical.php +26 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/OrExpression.php +4 −15 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/OrOperand.php +4 −15 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Term.php +1 −1 Go to diff View file