Skip to content

Commit

Permalink
Rename $ch variable to commucate its intention [WEB-2638]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Aug 21, 2023
1 parent 7b1365c commit 5e652ba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/Models/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,16 @@ public function toFeedItem(): FeedItem
$heroImage = $this->imageFront('hero');

if ($heroImage) {
$ch = curl_init($heroImage['src']);
$img = curl_init($heroImage['src']);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($img, CURLOPT_RETURNTRANSFER, true);
curl_setopt($img, CURLOPT_HEADER, true);
curl_setopt($img, CURLOPT_NOBODY, true);

$length = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
$type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
$length = curl_getinfo($img, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
$type = curl_getinfo($img, CURLINFO_CONTENT_TYPE);

curl_close($ch);
curl_close($img);

$item = array_merge($item, [
'enclosure' => $heroImage ? $heroImage['src'] : null,
Expand Down

0 comments on commit 5e652ba

Please sign in to comment.