@@ -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 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @param Room $room |
| 21 | - * @param array $onlinePlayerIds |
|
| 21 | + * @param integer[] $onlinePlayerIds |
|
| 22 | 22 | * @param array $excludePlayerIds |
| 23 | 23 | * @return Human[] |
| 24 | 24 | */ |
@@ -34,12 +34,12 @@ |
||
| 34 | 34 | $map = []; |
| 35 | 35 | |
| 36 | 36 | for ($y = $currentY - $this->mapRadius, $relativeY = 1, $relativeX = 1; |
| 37 | - $y <= $currentY + $this->mapRadius; |
|
| 38 | - $y++, $relativeY++, $relativeX = 1) { |
|
| 37 | + $y <= $currentY + $this->mapRadius; |
|
| 38 | + $y++, $relativeY++, $relativeX = 1) { |
|
| 39 | 39 | |
| 40 | 40 | for ($x = $currentX - $this->mapRadius; |
| 41 | - $x <= $currentX + $this->mapRadius; |
|
| 42 | - $x++, $relativeX++) { |
|
| 41 | + $x <= $currentX + $this->mapRadius; |
|
| 42 | + $x++, $relativeX++) { |
|
| 43 | 43 | |
| 44 | 44 | // пропуск центра карты, комнаты где находится персонаж |
| 45 | 45 | if ($relativeY == 3 && $relativeX == 3) { |
@@ -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 { |