[PHPStan] Namespaces erronés dans UserRepository #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Erreurs PHPStan détectées
Fichier :
src/Repository/UserRepository.phpInstantiated class App\\Repository\\InvalidArgumentException not foundThrowing object of an unknown class App\\Repository\\InvalidArgumentExceptionCaught class App\\Repository\\PDOException not foundCall to method getCode() on an unknown class App\\Repository\\PDOExceptionThrowing object of an unknown class App\\Repository\\PDOExceptionMethod nullIfEmpty() is unusedCause
Les exceptions
PDOExceptionetInvalidArgumentExceptionsont utilisées sans namespace, mais PHP les cherche dansApp\\Repository\\au lieu de l'espace global\\.Correction
Remplacer
PDOExceptionpar\\PDOExceptionetInvalidArgumentExceptionpar\\InvalidArgumentException.Supprimer ou utiliser la méthode
nullIfEmpty().Détecté par PHPStan level 5 — baseline commit
70304d3