SARB uses an SCM to answer the question: "Where was line number X for file Y at the time the baseline was created". There are 2 possible answers:
- It wasn't in the baseline
- It was line A in file B
To support another SCM the following interfaces need implementing:
- HistoryMarker
- HistoryMarkerFactory
- HistoryAnalyser
- HistoryFactory
src/Domain/HistoryAnalyser/HistoryMarker.php
This holds a string representation of the point where the baseline was taken. E.g. for git this is the git SHA of the baseline.
src/Domain/HistoryAnalyser/HistoryMarkerFactory.php
Responsible for creating a HistoryMarker.
src/Domain/HistoryAnalyser/HistoryAnalyser.php
This is used to answer the question: "Where was line number X for file Y at the time the baseline was created".
src/Domain/HistoryAnalyser/HistoryFactory.php
This is responsible for building the HistoryAnalyser and HistoryMarkerFactory.