for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace eXpansion\Bundle\AdminChat\ChatCommand;
use eXpansion\Framework\AdminGroups\Helpers\AdminGroups;
use eXpansion\Framework\Core\Helpers\ChatNotification;
use eXpansion\Framework\Core\Storage\PlayerStorage;
use Maniaplanet\DedicatedServer\Connection;
use Monolog\Logger;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
/**
* Class ReasonUserCommand
*
* @author Reaby
* @package eXpansion\Bundle\AdminChat\ChatCommand
*/
class AdminReturnCommand extends AdminCommand
{
* @inheritdoc
public function execute($login, InputInterface $input)
$nickName = $this->playerStorage->getPlayerInfo($login)->getNickName();
$group = $this->adminGroupsHelper->getLoginUserGroups($login)->getName();
$return = $this->connection->{$this->functionName}();
$this->chatNotification->sendMessage(
$this->chatMessage,
$this->isPublic ? null : $login,
['%adminLevel%' => $group, '%admin%' => $nickName, '%return%' => $return]
);
}