stable

Clone or download

Read-only

refactor: Enforce signature of SearchableVisitor

An interface is extracted and define the contract of the two methods visitField and visitMetadata. 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: Filter on Artifact Links with TQL Change-Id: I04160f172e9f6b9c9f9e350a3047895ebd82e4c9

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidComparisonCollectorVisitor.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSearchableCollectorVisitor.php +9 −10 Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/SearchableVisitor.php Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/SearchableVisitorParameters.php Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilderVisitor.php +22 −22 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Field.php +3 −12 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Metadata.php +3 −6 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Searchable.php +9 −3 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/SearchableVisitor.php +41 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidComparisonCollectorVisitor.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidSearchableCollectorVisitor.php +9 −10 Go to diff View file
R plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/SearchableVisitor.php Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereSearchableVisitorParameter.php +56 −0 Go to diff View file
D plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/SearchableVisitorParameter.php +0 −89 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilderVisitor.php +21 −26 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report.class.php +1 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/QueryBuilderVisitorTest.php +1 −1 Go to diff View file