Use imports instead of FQNs

This commit is contained in:
Jan Böhmer 2023-06-11 14:55:06 +02:00
parent f63b6d7207
commit 5629215ce4
179 changed files with 792 additions and 597 deletions

View file

@ -64,7 +64,7 @@ class ResetAutoIncrementORMPurger implements PurgerInterface, ORMPurgerInterface
* @param string[] $excluded array of table/view names to be excluded from purge
*/
public function __construct(
private ?\Doctrine\ORM\EntityManagerInterface $em = null,
private ?EntityManagerInterface $em = null,
/**
* Table/view names to be excluded from purge
*/

View file

@ -20,6 +20,7 @@
namespace App\Doctrine\SetSQLMode;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\Middleware\AbstractDriverMiddleware;
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
@ -29,7 +30,7 @@ use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
*/
class SetSQLModeMiddlewareDriver extends AbstractDriverMiddleware
{
public function connect(array $params): \Doctrine\DBAL\Driver\Connection
public function connect(array $params): Connection
{
//Only set this on MySQL connections, as other databases don't support this parameter
if($this->getDatabasePlatform() instanceof AbstractMySQLPlatform) {

View file

@ -53,7 +53,7 @@ class BigDecimalType extends Type
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (!$value instanceof \Brick\Math\BigDecimal) {
if (!$value instanceof BigDecimal) {
return null;
}