for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace ReliqArts\DirectTranslator\Utility;
use ReliqArts\DirectTranslator\Constant\LanguageCodes;
/**
* Class LanguageCodeChecker.
*
* @codeCoverageIgnore
*/
class LanguageCodeChecker
{
* @param string $code
* @return bool
public function languageCodeExists(string $code): bool
return !empty($this->getLanguageNameByCode($code));
}
* @return string
private function getLanguageNameByCode(string $code): string
return LanguageCodes::ISO6391[$code] ?? '';