Skip to content

Commit 221312a

Browse files
committed
Removed unused variables
1 parent f7fec7d commit 221312a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/Services/SlackService.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ class SlackService implements SlackInterface
1717

1818
public function __construct()
1919
{
20-
$channel = env('SLACK_CHANNEL', '');
21-
$username = env('SLACK_BOT_NAME', '');
22-
$webhook = env('SLACK_WEBHOOK', '');
2320
$this->settings = [
2421
'channel' => env('SLACK_CHANNEL', ''),
2522
'username' => env('SLACK_BOT_NAME', ''),
@@ -71,7 +68,9 @@ private function buildMessage($content, $type)
7168
$usersAssigned = [];
7269

7370
foreach ($content['assigned_to'] as $username) {
74-
$usersAssigned[] = "@{$username}";
71+
if (! empty($username)) {
72+
$usersAssigned[] = "@{$username}";
73+
}
7574
}
7675

7776
$usersAssigned = implode(' ', $usersAssigned);

0 commit comments

Comments
 (0)