Skip to content

Commit

Permalink
PHP CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Sep 4, 2024
1 parent ac7f413 commit 626e3f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Exception/ExceededPeriodNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class ExceededPeriodNotFoundException extends RuntimeException

public function __construct(?int $level = null)
{
parent::__construct(sprintf('Exceeded period not found for level `%s`', $level));
parent::__construct(\sprintf('Exceeded period not found for level `%s`', $level));
$this->level = $level;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Helper/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private function manageAlphabeticCharacter(string $character): void
private function manageNumericCharacter(string $character): void
{
if (mb_strlen($character, 'UTF-8') > 1 && !is_numeric($character)) {
throw new Exception(sprintf('The string "%s" is not a single numeric character', $character));
throw new Exception(\sprintf('The string "%s" is not a single numeric character', $character));
}

// Reset what we need to reset
Expand Down
5 changes: 3 additions & 2 deletions src/Remover/ExceededQuarantineItemsRemover.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use DateTime;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use MonsieurBiz\SyliusAntiSpamPlugin\Entity\QuarantineItemAwareInterface;
use MonsieurBiz\SyliusAntiSpamPlugin\Entity\QuarantineItemInterface;
use MonsieurBiz\SyliusAntiSpamPlugin\Exception\ExceededPeriodNotFoundException;
Expand Down Expand Up @@ -55,7 +56,7 @@ public function remove(): void

private function removeByEntityClass(QuarantineItemAwareInterface $quarantineableEntity): void
{
$repository = $this->entityManager->getRepository(\get_class($quarantineableEntity));
$repository = $this->entityManager->getRepository($quarantineableEntity::class);
// Retrieve entities with an associated Quarantine Item
$criteria = new Criteria();
$criteria->where(Criteria::expr()->neq('quarantineItem', null));
Expand Down Expand Up @@ -97,7 +98,7 @@ private function canRemoveEntity(QuarantineItemInterface $quarantineItem): bool
}

/**
* @throws \Exception
* @throws Exception
*/
private function getTerminalDateByLevel(?int $level): DateTime
{
Expand Down

0 comments on commit 626e3f7

Please sign in to comment.