Skip to content

Commit

Permalink
Apply CS Fixer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jskowronski39 committed Jul 24, 2023
1 parent 00914b0 commit d32da9f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
],
'sort_algorithm' => 'none',
],
'phpdoc_separation' => false
])
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion src/Cache/CacheWarmer/BackgroundImageCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function isOptional(): bool

protected function findImagesToCache(): array
{
$imagesIterator = (Finder::create())->in($this->backgroundImagesDirectory)->files()->getIterator();
$imagesIterator = Finder::create()->in($this->backgroundImagesDirectory)->files()->getIterator();

$images = array_map(static fn (\SplFileInfo $imageFile) => $imageFile->getFilename(), iterator_to_array($imagesIterator));

Expand Down
2 changes: 2 additions & 0 deletions src/Command/PermissionsMakeAdminCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Repository\User\UserRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -55,6 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$allUsersNames = array_map(static fn (User $user) => sprintf('%d (%s)', $user->getExternalId(), $user->getUsername()), $allUsers);

/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
$question = new ChoiceQuestion('Please select user from the list', $allUsersNames);

Expand Down
9 changes: 4 additions & 5 deletions src/Controller/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Security\Authenticator\DiscordAuthenticator;
use App\Security\Enum\ScopeEnum;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -42,22 +41,22 @@ public function connectAction(ClientRegistry $clientRegistry): RedirectResponse
/**
* @Route("/connect/discord/check", name="_connect_discord_check")
*
* @throws RuntimeException
* @throws \RuntimeException
*
* @see DiscordAuthenticator
*/
public function connectCheckAction(): Response
{
throw new RuntimeException('This should never be executed!');
throw new \RuntimeException('This should never be executed!');
}

/**
* @Route("/logout", name="_logout")
*
* @throws RuntimeException
* @throws \RuntimeException
*/
public function logoutAction(): Response
{
throw new RuntimeException('This should never be executed!');
throw new \RuntimeException('This should never be executed!');
}
}
2 changes: 2 additions & 0 deletions src/EventSubscriber/Doctrine/ModGroupUpdatedSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public function postFlush(PostFlushEventArgs $args): void
}

$entityManager = $args->getEntityManager();

/** @var ModListRepository $modListRepository */
$modListRepository = $entityManager->getRepository(ModList::class);

/** @var null|User $currentUser */
$currentUser = $this->security->getUser();

Expand Down
4 changes: 2 additions & 2 deletions src/Form/DataTransformerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ private function createException(FormDtoInterface $formDto, EntityInterface $ent
return new \InvalidArgumentException(
sprintf(
'None of the registered data transformers supports transformation of "%s" to "%s"',
\get_class($formDto),
$entity ? \get_class($formDto) : 'null',
$formDto::class,
$entity ? $formDto::class : 'null',
)
);
}
Expand Down

0 comments on commit d32da9f

Please sign in to comment.