Fix phpstan error level 0 part2 #1577

Merged
MrPetovan merged 14 commits from fix-phpstan-error-level-0-part2 into develop 2024-12-01 03:20:20 +01:00
Showing only changes of commit d7d6a43655 - Show all commits

View file

@ -22,6 +22,16 @@ function cld_detect_languages(array &$data)
return;
}
if (!class_exists('CLD2Detector')) {
Logger::warning('CLD2Detector class does not exist.');
return;
}
if (!class_exists('CLD2Encoding')) {
Logger::warning('CLD2Encoding class does not exist.');
return;
}
$cld2 = new \CLD2Detector();
$cld2->setEncodingHint(CLD2Encoding::UTF8); // optional, hints about text encoding