private function checkMax($max) { if (!is_int($max)) { throw new InvalidArgumentException('The title maximum lenght must be integer.'); } if ($max <= 0) { throw new InvalidArgumentException('The title maximum lenght must be greater 0.'); } }