Add equals method to Violation.

you don't need to use `serialize` since php does it by default.

`return  $this == $violation;`