stable

Clone or download

Read-only

refactor: Enforce signature of ComparisonVisitor

Same vibes than for previous changes in SearchableVisitor[0] An interface is extracted and define the contract of the nine methods visitXxxxComparison (=, !=, <, >, <=, >=, IN, NOT IN, BETWEEN). Since there is no generics in PHP, we rely on PHP annotations & psalm to enforce the signature. When we will introduce a new visitor, there will be less chance to miss the implementation of one method (like it is currently the case for `Visitor` implementations). No functional change. Preparation step for epic #32276[1]: Filter on Artifact Links with TQL [0]: git #tuleap/stable/4bc1b7d17f9ca49941dcaeac35d01e94842a8b05 [1]: https://tuleap.net/plugins/tracker/?aid=32276 Change-Id: If91e13c5383507d9b049ba22693c8ee10029ec46

Modified Files

Name
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/BetweenComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Comparison.php +9 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/ComparisonVisitor.php +90 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/EqualComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/GreaterThanComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/GreaterThanOrEqualComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/InComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/LesserThanComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/LesserThanOrEqualComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/NotEqualComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/NotInComparison.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidFields/Date/DateToEmptyStringComparisonException.php +26 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidFields/FloatFields/FloatToEmptyStringComparisonException.php +25 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidFields/Integer/IntegerToEmptyStringComparisonException.php +25 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidFields/ListFields/ListToEmptyStringComparisonException.php +40 −7 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/InvalidFields/DateFieldCheckerTest.php +1 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/InvalidFields/DateTimeFieldCheckerTest.php +1 −1 Go to diff View file