From 7187239a3ca5df81802d5fe45d205349f04aa5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Ma=C5=A1a?= Date: Fri, 1 Sep 2017 02:08:21 +0200 Subject: [PATCH] Fix coding standard --- src/DoctrineNullableEmbeddables/Subscriber.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/DoctrineNullableEmbeddables/Subscriber.php b/src/DoctrineNullableEmbeddables/Subscriber.php index 7afe354..e36f559 100644 --- a/src/DoctrineNullableEmbeddables/Subscriber.php +++ b/src/DoctrineNullableEmbeddables/Subscriber.php @@ -28,10 +28,7 @@ public function getSubscribedEvents(): array return ['postLoad']; } - private function clearEmbeddablesIfNecessary( - $object, - EntityManager $entityManager - ) + private function clearEmbeddablesIfNecessary($object, EntityManager $entityManager) { $metadata = $entityManager->getClassMetadata(get_class($object)); @@ -69,7 +66,7 @@ public function postLoad(LifecycleEventArgs $args) } $this->clearEmbeddablesIfNecessary( - $args->getObject(), + $object, $args->getEntityManager() ); } @@ -87,7 +84,7 @@ private function isEmpty($object, ClassMetadata $metadata): bool private function hasNullableAnnotation(\ReflectionProperty $property): bool { - return $this->reader->getPropertyAnnotation($property, Nullable::class) !== NULL; + return $this->reader->getPropertyAnnotation($property, Nullable::class) !== null; } }