Skip to content

Commit

Permalink
Implicitly cast public ID to string on notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyCupic committed May 9, 2024
1 parent f1e5268 commit f12be89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bundle/Controller/Callback/Cloudinary/Notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private function handleResourceUploaded(array $requestContent): void
$cloudinaryRemoteId = new CloudinaryRemoteId(
$requestContent['type'],
$requestContent['resource_type'],
$requestContent['public_id'],
(string) $requestContent['public_id'],
);

if ($this->gateway instanceof CacheableGatewayInterface) {
Expand Down Expand Up @@ -162,7 +162,7 @@ private function handleResourceDeleted(array $requestContent): void
$cloudinaryRemoteId = new CloudinaryRemoteId(
$resourceData['type'],
$resourceData['resource_type'],
$resourceData['public_id'],
(string) $resourceData['public_id'],
);

$this->gateway->invalidateResourceCache($cloudinaryRemoteId);
Expand Down Expand Up @@ -211,7 +211,7 @@ private function handleResourceRenamed(array $requestContent): void
$cloudinaryRemoteId = new CloudinaryRemoteId(
$apiResource['type'],
$apiResource['resource_type'],
$apiResource['public_id'],
(string) $apiResource['public_id'],
);

$resource
Expand All @@ -227,7 +227,7 @@ private function handleResourceRenamed(array $requestContent): void
new CloudinaryRemoteId(
$apiResource['type'],
$apiResource['resource_type'],
$requestContent['from_public_id'],
(string) $requestContent['from_public_id'],
),
);
}
Expand All @@ -244,7 +244,7 @@ private function handleTagsChanged(array $requestContent): void
$cloudinaryRemoteId = new CloudinaryRemoteId(
$resourceData['type'],
$resourceData['resource_type'],
$resourceData['public_id'],
(string) $resourceData['public_id'],
);

$this->gateway->invalidateResourceCache($cloudinaryRemoteId);
Expand Down Expand Up @@ -279,7 +279,7 @@ private function handleContextChanged(array $requestContent): void
$cloudinaryRemoteId = new CloudinaryRemoteId(
$resourceData['type'],
$resourceData['resource_type'],
$publicId,
(string) $publicId,
);

$this->gateway->invalidateResourceCache($cloudinaryRemoteId);
Expand Down

0 comments on commit f12be89

Please sign in to comment.