See this thread for a similar situation:
You will want to also perform the same work to look for a duplicated declaration like class ThemePlugin. This might occur if you have mixed OJS2 files with OJS3 files, or if you have multiple copies of the same file with different capitalization.
class ThemePlugin