Mistři v programování na #hovnokod

PHP #4563

Nie je vyslovene hovnokod, ale naco to else? (nette)

private static function sanitize(int $type, $value)
	{
		if ($type === Form::DATA_TEXT) {
			return is_scalar($value) ? Strings::normalizeNewLines($value) : null;
		} elseif ($type === Form::DATA_LINE) {
			return is_scalar($value) ? Strings::trim(strtr((string) $value, "\r\n", '  ')) : null;
		} elseif ($type === Form::DATA_FILE) {
			return $value instanceof Nette\Http\FileUpload ? $value : null;
		} else {
			throw new Nette\InvalidArgumentException('Unknown data type');
		}
	}

Anonymous,