mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code-style (using PHPCSFixer and PHPCS).
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocGeneratorBundle\Context\Exception;
|
||||
|
||||
use LogicException;
|
||||
|
||||
use function get_class;
|
||||
use function gettype;
|
||||
use function is_object;
|
||||
|
@@ -28,12 +28,10 @@ use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\TransferException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
// TODO à mettre dans services
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
@@ -42,7 +40,6 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
@@ -206,8 +203,10 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
|
||||
$contextGenerationData = [];
|
||||
|
||||
if ($context instanceof DocGeneratorContextWithPublicFormInterface
|
||||
&& $context->hasPublicForm($template, $entity) || $isTest) {
|
||||
if (
|
||||
$context instanceof DocGeneratorContextWithPublicFormInterface
|
||||
&& $context->hasPublicForm($template, $entity) || $isTest
|
||||
) {
|
||||
if ($context instanceof DocGeneratorContextWithPublicFormInterface) {
|
||||
$builder = $this->createFormBuilder(
|
||||
array_merge(
|
||||
|
@@ -54,8 +54,10 @@ class DocGeneratorTemplateType extends AbstractType
|
||||
'required' => true,
|
||||
]);
|
||||
|
||||
if ($context instanceof DocGeneratorContextWithAdminFormInterface
|
||||
&& $context->hasAdminForm()) {
|
||||
if (
|
||||
$context instanceof DocGeneratorContextWithAdminFormInterface
|
||||
&& $context->hasAdminForm()
|
||||
) {
|
||||
$sub = $builder
|
||||
->create('options', null, ['compound' => true])
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
|
@@ -15,6 +15,7 @@ use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function in_array;
|
||||
|
||||
class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
|
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocGeneratorBundle\Serializer\Encoder;
|
||||
|
||||
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
||||
|
||||
use function array_keys;
|
||||
use function is_array;
|
||||
|
||||
|
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocGeneratorBundle\Serializer\Helper;
|
||||
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
class NormalizeNullValueHelper
|
||||
|
@@ -26,6 +26,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
use function array_filter;
|
||||
use function array_key_exists;
|
||||
use function array_merge;
|
||||
@@ -65,7 +66,7 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
if (!$this->classMetadataFactory->hasMetadataFor($classMetadataKey)) {
|
||||
throw new LogicException(sprintf(
|
||||
'This object does not have metadata: %s. Add groups on this entity to allow to serialize with the format %s and groups %s',
|
||||
is_object($object) ? get_class($object) : '(todo' /*$context['docgen:expects'],*/ ,
|
||||
is_object($object) ? get_class($object) : '(todo' /*$context['docgen:expects'],*/,
|
||||
$format,
|
||||
implode(', ', ($context['groups'] ?? []))
|
||||
));
|
||||
|
Reference in New Issue
Block a user