whiteCube/lingua

View on GitHub

Showing 36 of 36 total issues

Missing class import via use statement (line '94', column '19').
Open

throw new \Exception('Unable to guess the format for input string "' . $code . '"');
Severity: Minor
Found in src/Lingua/Service.php by phpmd

Missing class import via use statement (line '39', column '23').
Open

throw new \Exception('Unable to create language from "' . $this . '"');
Severity: Minor
Found in src/Lingua/Converter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'check'.
Open

if(LanguagesRepository::find('name', self::prepare($format))) return true;
Severity: Minor
Found in src/Lingua/NameConverter.php by phpmd

Avoid unused local variables such as '$key'.
Open

foreach (self::$converters as $key => $converter) {
Severity: Minor
Found in src/Lingua/Service.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'findInRepository'.
Open

?? LanguagesRepository::find('iso-639-2t', $this->original['iso'])
Severity: Minor
Found in src/Lingua/ComponentConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('iso-639-2b', $this->original);
Severity: Minor
Found in src/Lingua/Iso_639_2bConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('iso-639-2t', $this->original);
Severity: Minor
Found in src/Lingua/Iso_639_2tConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'findInRepository'.
Open

return LanguagesRepository::find('iso-639-1', $this->original['iso']);
Severity: Minor
Found in src/Lingua/ComponentConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('iso-639-1', $this->original);
Severity: Minor
Found in src/Lingua/Iso_639_1Converter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('name', $this->original);
Severity: Minor
Found in src/Lingua/NameConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('iso-639-3', $parsed);
Severity: Minor
Found in src/Lingua/Iso_639_3Converter.php by phpmd

Avoid unused parameters such as '$arguments'.
Open

protected function convert($method, $arguments = [])
Severity: Minor
Found in src/Lingua/Service.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'findInRepository'.
Open

return LanguagesRepository::find('iso-639-3', $this->original['iso'])
Severity: Minor
Found in src/Lingua/ComponentConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'check'.
Open

if(LanguagesRepository::find('native', self::prepare($format))) return true;
Severity: Minor
Found in src/Lingua/NativeConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'parse'.
Open

$this->repository = LanguagesRepository::find('native', $this->original);
Severity: Minor
Found in src/Lingua/NativeConverter.php by phpmd

Avoid using static access to class 'WhiteCube\Lingua\LanguagesRepository' in method 'findInRepository'.
Open

?? LanguagesRepository::find('iso-639-2b', $this->original['iso']);
Severity: Minor
Found in src/Lingua/ComponentConverter.php by phpmd
Severity
Category
Status
Source
Language