public function offsetSet($offset, $violation) { if (null === $offset) { $this->add($violation); } else { $this->set($offset, $violation); } }