public function setLimit($violationSeverity, $length) { $length = (int) $length; $this->limits[$violationSeverity] = $length > 0 ? $length : null; return $this; }