@@ -3,11 +3,11 @@ |
||
| 3 | 3 | use League\Container\Container; |
| 4 | 4 | use League\Container\ReflectionContainer; |
| 5 | 5 | |
| 6 | -if (! function_exists('getContainer')) { |
|
| 6 | +if (!function_exists('getContainer')) { |
|
| 7 | 7 | // Initialize and save the container instance |
| 8 | 8 | function getContainer() { |
| 9 | 9 | static $container; |
| 10 | - if(!isset($container)) { |
|
| 10 | + if (!isset($container)) { |
|
| 11 | 11 | $container = new Container; |
| 12 | 12 | |
| 13 | 13 | //. Attempt to autowire class constructor dependencies |
@@ -14,15 +14,15 @@ |
||
| 14 | 14 | { |
| 15 | 15 | public function run(Message $message, Discord $discord, WebSocket $webSocket, Logger $log, &$audioStreams, Channel $channel, cURL $curl) |
| 16 | 16 | { |
| 17 | - $webSocket->joinVoiceChannel($channel)->then(function (VoiceClient $vc) use ($message, $discord, $webSocket, $log, &$audioStreams, $channel) { |
|
| 17 | + $webSocket->joinVoiceChannel($channel)->then(function(VoiceClient $vc) use ($message, $discord, $webSocket, $log, &$audioStreams, $channel) { |
|
| 18 | 18 | $guildID = $message->getChannelAttribute()->guild_id; |
| 19 | 19 | // Add this audio stream to the array of audio streams |
| 20 | 20 | $audioStreams[$guildID] = $vc; |
| 21 | - $vc->setFrameSize(40)->then(function () use ($vc, &$audioStreams, $guildID) { |
|
| 21 | + $vc->setFrameSize(40)->then(function() use ($vc, &$audioStreams, $guildID) { |
|
| 22 | 22 | $vc->setBitrate(128000); |
| 23 | 23 | $number = mt_rand(1, 23); |
| 24 | 24 | $file = __DIR__ . "/../../../sounds/reapers/{$number}.mp3"; |
| 25 | - $vc->playFile($file, 2)->done(function () use ($vc, &$audioStreams, $guildID) { |
|
| 25 | + $vc->playFile($file, 2)->done(function() use ($vc, &$audioStreams, $guildID) { |
|
| 26 | 26 | unset($audioStreams[$guildID]); |
| 27 | 27 | $vc->close(); |
| 28 | 28 | }); |
@@ -14,15 +14,15 @@ |
||
| 14 | 14 | { |
| 15 | 15 | public function run(Message $message, Discord $discord, WebSocket $webSocket, Logger $log, &$audioStreams, Channel $channel, cURL $curl) |
| 16 | 16 | { |
| 17 | - $webSocket->joinVoiceChannel($channel)->then(function (VoiceClient $vc) use ($message, $discord, $webSocket, $log, &$audioStreams, $channel) { |
|
| 17 | + $webSocket->joinVoiceChannel($channel)->then(function(VoiceClient $vc) use ($message, $discord, $webSocket, $log, &$audioStreams, $channel) { |
|
| 18 | 18 | $guildID = $message->getChannelAttribute()->guild_id; |
| 19 | 19 | // Add this audio stream to the array of audio streams |
| 20 | 20 | $audioStreams[$guildID] = $vc; |
| 21 | - $vc->setFrameSize(40)->then(function () use ($vc, &$audioStreams, $guildID) { |
|
| 21 | + $vc->setFrameSize(40)->then(function() use ($vc, &$audioStreams, $guildID) { |
|
| 22 | 22 | $vc->setBitrate(128000); |
| 23 | 23 | $number = mt_rand(1, 23); |
| 24 | 24 | $file = __DIR__ . "/../../../sounds/reapers/{$number}.mp3"; |
| 25 | - $vc->playFile($file, 2)->done(function () use ($vc, &$audioStreams, $guildID) { |
|
| 25 | + $vc->playFile($file, 2)->done(function() use ($vc, &$audioStreams, $guildID) { |
|
| 26 | 26 | unset($audioStreams[$guildID]); |
| 27 | 27 | $vc->close(); |
| 28 | 28 | }); |