@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | foreach ($allNewItemsData as $newItemType => $newItemsData) { |
| 45 | 45 | $newItemType = mb_convert_case($newItemType, MB_CASE_TITLE); |
| 46 | - $itemClass = 'Rottenwood\\KingdomBundle\\Entity\\Items\\' . $newItemType; |
|
| 46 | + $itemClass = 'Rottenwood\\KingdomBundle\\Entity\\Items\\'.$newItemType; |
|
| 47 | 47 | |
| 48 | 48 | foreach ($newItemsData as $newItemId => $newItemData) { |
| 49 | 49 | /** @var Item $newItem */ |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $em->flush(); |
| 92 | 92 | |
| 93 | - $output->writeln('Создано новых предметов: ' . count($itemRepository->findAll())); |
|
| 93 | + $output->writeln('Создано новых предметов: '.count($itemRepository->findAll())); |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $fileFinder = new Finder(); |
| 104 | 104 | |
| 105 | 105 | /** @var SplFileInfo[] $yamlFiles */ |
| 106 | - $yamlFiles = $fileFinder->files()->in(__DIR__ . '/../../Resources/items')->name('*.yml'); |
|
| 106 | + $yamlFiles = $fileFinder->files()->in(__DIR__.'/../../Resources/items')->name('*.yml'); |
|
| 107 | 107 | |
| 108 | 108 | $yamlData = []; |
| 109 | 109 | foreach ($yamlFiles as $yamlFile) { |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | |
| 30 | 30 | try { |
| 31 | 31 | $connection->query('SET FOREIGN_KEY_CHECKS=0'); |
| 32 | - $connection->query('DELETE FROM ' . $tableName); |
|
| 32 | + $connection->query('DELETE FROM '.$tableName); |
|
| 33 | 33 | $connection->query('SET FOREIGN_KEY_CHECKS=1'); |
| 34 | 34 | $connection->commit(); |
| 35 | 35 | } catch (\Exception $e) { |
| 36 | 36 | $connection->rollback(); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $connection->exec('ALTER TABLE ' . $tableName . ' AUTO_INCREMENT = 1;'); |
|
| 39 | + $connection->exec('ALTER TABLE '.$tableName.' AUTO_INCREMENT = 1;'); |
|
| 40 | 40 | |
| 41 | 41 | if ($output) { |
| 42 | 42 | $output->writeln($endEcho); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } elseif ($event == 'playerExit') { |
| 43 | 43 | $eventPhrase = 'вышел из игры'; |
| 44 | 44 | } else { |
| 45 | - throw new InvalidCommandParameter('Неизвестное событие: ' . $event); |
|
| 45 | + throw new InvalidCommandParameter('Неизвестное событие: '.$event); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $logger->info(sprintf('[%d]%s %s', $userId, $userName, $eventPhrase)); |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | { |
| 18 | 18 | parent::__construct(); |
| 19 | 19 | |
| 20 | - $username = 'Robot_' . $this->generateRandomLetters(); |
|
| 20 | + $username = 'Robot_'.$this->generateRandomLetters(); |
|
| 21 | 21 | $this->setUsername($username); |
| 22 | - $this->setEmail($username . '@' . $this->generateRandomLetters() . '.bot'); |
|
| 22 | + $this->setEmail($username.'@'.$this->generateRandomLetters().'.bot'); |
|
| 23 | 23 | $this->setPlainPassword($this->generateRandomLetters()); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | ); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - private function updateUserAndForm(User &$user, FormInterface &$form, UserService $userService) |
|
| 88 | + private function updateUserAndForm(User&$user, FormInterface&$form, UserService $userService) |
|
| 89 | 89 | { |
| 90 | 90 | $cyrillicName = $userService->transliterate($user->getLiteralUsername()); |
| 91 | 91 | |
@@ -93,9 +93,9 @@ |
||
| 93 | 93 | $output->writeln('персонаж создан!'); |
| 94 | 94 | |
| 95 | 95 | $output->writeln('===================================='); |
| 96 | - $output->writeln('Логин: ' . $username); |
|
| 97 | - $output->writeln('Пароль: ' . $password); |
|
| 98 | - $output->writeln('E-mail: ' . $email); |
|
| 96 | + $output->writeln('Логин: '.$username); |
|
| 97 | + $output->writeln('Пароль: '.$password); |
|
| 98 | + $output->writeln('E-mail: '.$email); |
|
| 99 | 99 | $output->writeln('===================================='); |
| 100 | 100 | |
| 101 | 101 | /** @var RegistrationLogger $logger */ |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | private function executeExternal(int $userId, string $commandName, $parameters): string |
| 64 | 64 | { |
| 65 | - $commandClass = __NAMESPACE__ . '\\Game\\' . ucfirst($commandName); |
|
| 65 | + $commandClass = __NAMESPACE__.'\\Game\\'.ucfirst($commandName); |
|
| 66 | 66 | $container = $this->getContainer(); |
| 67 | 67 | |
| 68 | 68 | try { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | private function createRoomTypes(AbstractRepository $repository, OutputInterface $output): array |
| 48 | 48 | { |
| 49 | 49 | /** @var SplFileInfo[] $typeClasses */ |
| 50 | - $typeClasses = (new Finder())->files()->name('*.php')->in(__DIR__ . '/../../Entity/RoomTypes'); |
|
| 50 | + $typeClasses = (new Finder())->files()->name('*.php')->in(__DIR__.'/../../Entity/RoomTypes'); |
|
| 51 | 51 | $typeNamespace = 'Rottenwood\\KingdomBundle\\Entity\\RoomTypes\\'; |
| 52 | 52 | |
| 53 | 53 | $output->write('Создание типов комнат ... '); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $roomTypes = []; |
| 56 | 56 | foreach ($typeClasses as $typeFile) { |
| 57 | 57 | $typeName = $typeFile->getBasename('.php'); |
| 58 | - $typeClass = $typeNamespace . $typeName; |
|
| 58 | + $typeClass = $typeNamespace.$typeName; |
|
| 59 | 59 | $roomType = new $typeClass(); |
| 60 | 60 | $roomTypes[strtolower($typeName)] = $roomType; |
| 61 | 61 | $repository->persist($roomType); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | private function createRooms(AbstractRepository $repository, array $roomTypes, OutputInterface $output): array |
| 76 | 76 | { |
| 77 | 77 | $yamlParser = new Yaml(); |
| 78 | - $roomsData = $yamlParser->parse(__DIR__ . '/../../Resources/rooms/rooms.yml'); |
|
| 78 | + $roomsData = $yamlParser->parse(__DIR__.'/../../Resources/rooms/rooms.yml'); |
|
| 79 | 79 | |
| 80 | 80 | $output->write('Создание новых комнат ... '); |
| 81 | 81 | |
@@ -70,8 +70,8 @@ |
||
| 70 | 70 | $output->writeln('Робот создан!'); |
| 71 | 71 | |
| 72 | 72 | $output->writeln('===================================='); |
| 73 | - $output->writeln('Id: ' . $robot->getId()); |
|
| 74 | - $output->writeln('Имя: ' . $robot->getName()); |
|
| 73 | + $output->writeln('Id: '.$robot->getId()); |
|
| 74 | + $output->writeln('Имя: '.$robot->getName()); |
|
| 75 | 75 | $output->writeln( |
| 76 | 76 | sprintf( |
| 77 | 77 | 'Комната: [%d]%s %d/%d (%d)', |