mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Use imports instead of FQNs
This commit is contained in:
parent
f63b6d7207
commit
5629215ce4
179 changed files with 792 additions and 597 deletions
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue