mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 02:25:00 +00:00
Use dependency injection and EntityManagerInterface.
This commit is contained in:
@@ -15,7 +15,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
class ObjectToIdTransformer implements DataTransformerInterface
|
||||
final class ObjectToIdTransformer implements DataTransformerInterface
|
||||
{
|
||||
private ?string $class;
|
||||
|
||||
@@ -38,7 +38,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
||||
*/
|
||||
public function reverseTransform($id)
|
||||
{
|
||||
if (!$id) {
|
||||
if (null === $id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user