Skip to content

Commit

Permalink
fix: deprecated string interpolation (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-jovanovic-php authored Jan 5, 2023
1 parent 33429ba commit 7323128
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions lib/GetStream/StreamChat/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ public function listBlocklists(): StreamResponse
*/
public function getBlocklist(string $name): StreamResponse
{
return $this->get("blocklists/${name}");
return $this->get("blocklists/{$name}");
}

/** Updates a blocklist.
Expand All @@ -946,7 +946,7 @@ public function getBlocklist(string $name): StreamResponse
*/
public function updateBlocklist(string $name, array $blocklist): StreamResponse
{
return $this->put("blocklists/${name}", $blocklist);
return $this->put("blocklists/{$name}", $blocklist);
}

/** Deletes a blocklist.
Expand All @@ -955,7 +955,7 @@ public function updateBlocklist(string $name, array $blocklist): StreamResponse
*/
public function deleteBlocklist(string $name): StreamResponse
{
return $this->delete("blocklists/${name}");
return $this->delete("blocklists/{$name}");
}

/** Creates a command.
Expand All @@ -982,7 +982,7 @@ public function listCommands(): StreamResponse
*/
public function getCommand(string $name): StreamResponse
{
return $this->get("commands/${name}");
return $this->get("commands/{$name}");
}

/** Updates a command.
Expand All @@ -991,7 +991,7 @@ public function getCommand(string $name): StreamResponse
*/
public function updateCommand(string $name, array $command): StreamResponse
{
return $this->put("commands/${name}", $command);
return $this->put("commands/{$name}", $command);
}

/** Deletes a command.
Expand All @@ -1000,7 +1000,7 @@ public function updateCommand(string $name, array $command): StreamResponse
*/
public function deleteCommand(string $name): StreamResponse
{
return $this->delete("commands/${name}");
return $this->delete("commands/{$name}");
}

/** Creates a device.
Expand Down Expand Up @@ -1199,7 +1199,7 @@ public function sendFile(string $uri, string $url, string $name, array $user, st
*/
public function sendMessageAction(string $messageId, string $userId, array $formData)
{
return $this->post("messages/${messageId}/action", ["user_id" => $userId, "form_data" => $formData]);
return $this->post("messages/{$messageId}/action", ["user_id" => $userId, "form_data" => $formData]);
}

/** Lists all roles.
Expand All @@ -1226,7 +1226,7 @@ public function listPermissions(): StreamResponse
*/
public function getPermission(string $id): StreamResponse
{
return $this->get("permissions/${id}");
return $this->get("permissions/{$id}");
}

/** Creates a role.
Expand All @@ -1247,7 +1247,7 @@ public function createRole(string $name): StreamResponse
*/
public function deleteRole(string $name): StreamResponse
{
return $this->delete("roles/${name}");
return $this->delete("roles/{$name}");
}

/** Translates a message to a language.
Expand All @@ -1256,7 +1256,7 @@ public function deleteRole(string $name): StreamResponse
*/
public function translateMessage(string $messageId, string $language): StreamResponse
{
return $this->post("messages/${messageId}/translate", ["language" => $language]);
return $this->post("messages/{$messageId}/translate", ["language" => $language]);
}

/**
Expand Down Expand Up @@ -1292,7 +1292,7 @@ public function exportChannel(array $request, array $options = []): StreamRespon
*/
public function getExportChannelStatus(string $id): StreamResponse
{
return $this->get("export_channels/${id}");
return $this->get("export_channels/{$id}");
}

/**
Expand Down Expand Up @@ -1353,7 +1353,7 @@ public function createCampaign(array $campaign): StreamResponse
*/
public function getCampaign(string $campaign_id): StreamResponse
{
return $this->get("campaigns/${campaign_id}");
return $this->get("campaigns/{$campaign_id}");
}

/** List all campaigns.
Expand All @@ -1370,47 +1370,47 @@ public function listCampaigns(array $options = []): StreamResponse
*/
public function updateCampaign(string $campaign_id, array $campaign): StreamResponse
{
return $this->put("campaigns/${campaign_id}", ["campaign" => $campaign]);
return $this->put("campaigns/{$campaign_id}", ["campaign" => $campaign]);
}

/** Delete a campaign
* @throws StreamException
*/
public function deleteCampaign(string $campaign_id): StreamResponse
{
return $this->delete("campaigns/${campaign_id}");
return $this->delete("campaigns/{$campaign_id}");
}

/** Schedule a campaign
* @throws StreamException
*/
public function scheduleCampaign(string $campaign_id, int $sendAt): StreamResponse
{
return $this->patch("campaigns/${campaign_id}/schedule", ["send_at" => $sendAt]);
return $this->patch("campaigns/{$campaign_id}/schedule", ["send_at" => $sendAt]);
}

/** Stop a campaign
* @throws StreamException
*/
public function stopCampaign(string $campaign_id): StreamResponse
{
return $this->patch("campaigns/${campaign_id}/stop", []);
return $this->patch("campaigns/{$campaign_id}/stop", []);
}

/** Resume a campaign
* @throws StreamException
*/
public function resumeCampaign(string $campaign_id): StreamResponse
{
return $this->patch("campaigns/${campaign_id}/resume", []);
return $this->patch("campaigns/{$campaign_id}/resume", []);
}

/** Test a campaign
* @throws StreamException
*/
public function testCampaign(string $campaign_id, array $users): StreamResponse
{
return $this->post("campaigns/${campaign_id}/test", ["users" => $users]);
return $this->post("campaigns/{$campaign_id}/test", ["users" => $users]);
}

/** Create a campaign segment
Expand All @@ -1426,7 +1426,7 @@ public function createSegment(array $segment): StreamResponse
*/
public function getSegment(string $segment_id): StreamResponse
{
return $this->get("segments/${segment_id}");
return $this->get("segments/{$segment_id}");
}

/** List all campaign segments.
Expand All @@ -1443,15 +1443,15 @@ public function listSegments(array $options = []): StreamResponse
*/
public function updateSegment(string $segment_id, array $segment): StreamResponse
{
return $this->put("segments/${segment_id}", ["segment" => $segment]);
return $this->put("segments/{$segment_id}", ["segment" => $segment]);
}

/** Delete a campaign segment
* @throws StreamException
*/
public function deleteSegment(string $segment_id): StreamResponse
{
return $this->delete("segments/${segment_id}");
return $this->delete("segments/{$segment_id}");
}

/** Create import url
Expand Down

0 comments on commit 7323128

Please sign in to comment.