fix: fix php cs errors
This commit is contained in:
parent
52d7f2b3b9
commit
a5d9bbf45f
8 changed files with 19 additions and 22 deletions
|
|
@ -103,8 +103,7 @@ final class ProductController extends AbstractController
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('pages/product/show.html.twig', compact('slug', 'id', 'product'));
|
return $this->render('pages/product/show.html.twig', compact('slug', 'id', 'product'));
|
||||||
} else {
|
|
||||||
throw new GoneHttpException();
|
|
||||||
}
|
}
|
||||||
|
throw new GoneHttpException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,8 @@ final class ServiceController extends AbstractController
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('pages/product/new_service.html.twig', compact('form', 'product'));
|
return $this->render('pages/product/new_service.html.twig', compact('form', 'product'));
|
||||||
} else {
|
|
||||||
throw new GoneHttpException();
|
|
||||||
}
|
}
|
||||||
|
throw new GoneHttpException();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route([
|
#[Route([
|
||||||
|
|
@ -96,8 +95,7 @@ final class ServiceController extends AbstractController
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('pages/product/edit_service.html.twig', compact('form', 'product'));
|
return $this->render('pages/product/edit_service.html.twig', compact('form', 'product'));
|
||||||
} else {
|
|
||||||
throw new GoneHttpException();
|
|
||||||
}
|
}
|
||||||
|
throw new GoneHttpException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,7 @@ final class UserProductsController extends AbstractController
|
||||||
|
|
||||||
if ($this->configurationRepository->getServicesParameter()) {
|
if ($this->configurationRepository->getServicesParameter()) {
|
||||||
return $this->render('pages/account/product/list.html.twig', compact('pagination', 'form'));
|
return $this->render('pages/account/product/list.html.twig', compact('pagination', 'form'));
|
||||||
} else {
|
|
||||||
throw new GoneHttpException('there is no services');
|
|
||||||
}
|
}
|
||||||
|
throw new GoneHttpException('there is no services');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,16 +80,16 @@ final class PayumManager
|
||||||
'groupOfferId' => (string) $offer->getId(),
|
'groupOfferId' => (string) $offer->getId(),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
// method must be set as the default value is not retrieved from the gateway configuration
|
|
||||||
'method' => PaymentMethod::CREDITCARD->value,
|
|
||||||
'metadata' => [
|
|
||||||
'platformId' => (string) $offer->getConfiguration()?->getId(),
|
|
||||||
'platformOfferId' => (string) $offer->getId(),
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
// method must be set as the default value is not retrieved from the gateway configuration
|
||||||
|
'method' => PaymentMethod::CREDITCARD->value,
|
||||||
|
'metadata' => [
|
||||||
|
'platformId' => (string) $offer->getConfiguration()?->getId(),
|
||||||
|
'platformOfferId' => (string) $offer->getId(),
|
||||||
|
],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ use Doctrine\ORM\QueryBuilder;
|
||||||
use Gedmo\Sortable\Entity\Repository\SortableRepository;
|
use Gedmo\Sortable\Entity\Repository\SortableRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @extends SortableRepository<MenuItem>
|
||||||
* @method MenuItem|null find($id, $lockMode = null, $lockVersion = null)
|
* @method MenuItem|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
* @method MenuItem|null findOneBy(array $criteria, array $orderBy = null)
|
* @method MenuItem|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
* @method MenuItem[] findAll()
|
* @method MenuItem[] findAll()
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use App\Repository\GroupRepository;
|
||||||
final class GroupGetStatsProvider implements ProviderInterface
|
final class GroupGetStatsProvider implements ProviderInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
readonly private GroupRepository $groupRepository,
|
private readonly GroupRepository $groupRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ use App\Repository\UserRepository;
|
||||||
class GroupsProvider implements ProviderInterface
|
class GroupsProvider implements ProviderInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
readonly private GroupRepository $groupRepository,
|
private readonly GroupRepository $groupRepository,
|
||||||
readonly private UserRepository $userRepository,
|
private readonly UserRepository $userRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@ namespace App\Tests\Unit\Notifier;
|
||||||
|
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use App\Notifier\SmsNotifier;
|
use App\Notifier\SmsNotifier;
|
||||||
use Monolog\Test\TestCase;
|
use Monolog\Test\MonologTestCase;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Component\HttpClient\Response\MockResponse;
|
use Symfony\Component\HttpClient\Response\MockResponse;
|
||||||
use Symfony\Component\Notifier\Exception\TransportException;
|
use Symfony\Component\Notifier\Exception\TransportException;
|
||||||
use Symfony\Component\Notifier\TexterInterface;
|
use Symfony\Component\Notifier\TexterInterface;
|
||||||
|
|
||||||
final class SmsNotifierTest extends TestCase
|
final class SmsNotifierTest extends MonologTestCase
|
||||||
{
|
{
|
||||||
public function testNotify(): void
|
public function testNotify(): void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue