Refactor: Remove duplicated code, part 1
Refactor: Remove duplicated code, part 2
Refactor: Remove duplicated code, part 3
Assert PHP syntax is also supported