public function transform($value): ?int
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof TrashItem) {
            throw new TransformationFailedException('Expected a ' . TrashItem::class . ' object.');
        }

        return $value->id;
    }
public function transform($value): ?int
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof TrashItem) {
            throw new TransformationFailedException('Expected a ' . TrashItem::class . ' object.');
        }

        return $value->id;
    }
public function transform ( $ value ) : ? int { if ( null === $ value ) { return null ; } if ( ! $ value instanceof TrashItem ) { throw new TransformationFailedException ( 'Expected a ' . TrashItem :: class . ' object.' ) ; } return $ value -> id ; }
Transforms a domain specific Trash Item object into a Trash Item's identifier.

@param mixed $value

@return mixed|null

@throws TransformationFailedException
Transforms a domain specific Trash Item object into a Trash Item s identifier .