mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix phstan error
This commit is contained in:
parent
970431197f
commit
09ca1ec6bb
@ -38,7 +38,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
|||||||
*/
|
*/
|
||||||
public function reverseTransform($id)
|
public function reverseTransform($id)
|
||||||
{
|
{
|
||||||
if (!$id) {
|
if (null === $id) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
|||||||
->getRepository($this->class)
|
->getRepository($this->class)
|
||||||
->find($id);
|
->find($id);
|
||||||
|
|
||||||
if (!$object) {
|
if (null === $object) {
|
||||||
throw new TransformationFailedException();
|
throw new TransformationFailedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
|||||||
*/
|
*/
|
||||||
public function transform($object)
|
public function transform($object)
|
||||||
{
|
{
|
||||||
if (!$object) {
|
if (null === $object) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user