diff --git a/Bundle/BlogBundle/Controller/ArticleController.php b/Bundle/BlogBundle/Controller/ArticleController.php index dfb1b0fb4..fa2cd4232 100644 --- a/Bundle/BlogBundle/Controller/ArticleController.php +++ b/Bundle/BlogBundle/Controller/ArticleController.php @@ -204,7 +204,9 @@ public function deleteAction(Article $article) $response = [ 'success' => true, - 'url' => $this->generateUrl('victoire_core_page_show', [ + 'url' => $this->generateUrl( + 'victoire_core_page_show', + [ 'url' => $blogViewReference->getUrl(), ] ), diff --git a/Bundle/BlogBundle/Controller/BlogController.php b/Bundle/BlogBundle/Controller/BlogController.php index 5e3558356..fa13cd422 100644 --- a/Bundle/BlogBundle/Controller/BlogController.php +++ b/Bundle/BlogBundle/Controller/BlogController.php @@ -235,13 +235,13 @@ public function categoryAction(Request $request, BasePage $blog) return new Response( $this->container->get('templating')->render( - $this->getBaseTemplatePath().':Tabs/_category.html.twig', - [ - 'blog' => $blog, - 'form' => $form->createView(), - 'businessProperties' => $businessProperties, - ] - ) + $this->getBaseTemplatePath().':Tabs/_category.html.twig', + [ + 'blog' => $blog, + 'form' => $form->createView(), + 'businessProperties' => $businessProperties, + ] + ) ); } diff --git a/Bundle/BlogBundle/Filter/DateFilter.php b/Bundle/BlogBundle/Filter/DateFilter.php index 98cc2bc19..102fa7fc3 100644 --- a/Bundle/BlogBundle/Filter/DateFilter.php +++ b/Bundle/BlogBundle/Filter/DateFilter.php @@ -113,7 +113,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) } $builder ->add( - 'year', ChoiceType::class, [ + 'year', + ChoiceType::class, + [ 'label' => false, 'choices' => $years, 'required' => false, diff --git a/Bundle/BlogBundle/Form/ArticleType.php b/Bundle/BlogBundle/Form/ArticleType.php index 8d33c0cfd..4e9552612 100644 --- a/Bundle/BlogBundle/Form/ArticleType.php +++ b/Bundle/BlogBundle/Form/ArticleType.php @@ -210,9 +210,9 @@ protected function manageTemplate($blog_id, $form) public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ - 'data_class' => 'Victoire\Bundle\BlogBundle\Entity\Article', - 'translation_domain' => 'victoire', - 'cascade_validation' => true, - ]); + 'data_class' => 'Victoire\Bundle\BlogBundle\Entity\Article', + 'translation_domain' => 'victoire', + 'cascade_validation' => true, + ]); } } diff --git a/Bundle/BlogBundle/Form/CategoryType.php b/Bundle/BlogBundle/Form/CategoryType.php index e389ea9fe..d3b1e5ba3 100644 --- a/Bundle/BlogBundle/Form/CategoryType.php +++ b/Bundle/BlogBundle/Form/CategoryType.php @@ -24,16 +24,19 @@ class CategoryType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('title', TextType::class, [ - 'label' => 'blog.form.title.label', - 'required' => true, - 'constraints' => [ - new \Symfony\Component\Validator\Constraints\NotBlank(), - ], - 'attr' => [ - 'class' => 'vic-blogCategoryWidget-formControl', + ->add( + 'title', + TextType::class, + [ + 'label' => 'blog.form.title.label', + 'required' => true, + 'constraints' => [ + new \Symfony\Component\Validator\Constraints\NotBlank(), + ], + 'attr' => [ + 'class' => 'vic-blogCategoryWidget-formControl', ], - ] + ] ) ->add('description', TextType::class, [ 'label' => 'blog.form.description.label', diff --git a/Bundle/BlogBundle/Form/ChooseBlogType.php b/Bundle/BlogBundle/Form/ChooseBlogType.php index cea60723d..9a278a978 100644 --- a/Bundle/BlogBundle/Form/ChooseBlogType.php +++ b/Bundle/BlogBundle/Form/ChooseBlogType.php @@ -54,7 +54,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->addEventListener( FormEvents::PRE_SET_DATA, - function (FormEvent $event) use ($currentLocale, $currentBlog, $localesNb, $blogsNb) { + function (FormEvent $event) use ($currentLocale, $currentBlog) { $data = $event->getData(); $event->setData([ 'locale' => $data['locale'] !== null ? $data['locale'] : $currentLocale, @@ -67,7 +67,7 @@ function (FormEvent $event) use ($currentLocale, $currentBlog, $localesNb, $blog if ($localesNb > 1 && $blogsNb > 1) { $builder->addEventListener( FormEvents::PRE_SUBMIT, - function (FormEvent $event) use ($currentLocale, $currentBlog, $blogsNb, $localesNb) { + function (FormEvent $event) use ($currentLocale, $currentBlog , $localesNb) { $data = $event->getData(); $currentLocale = $data['locale'] !== null ? $data['locale'] : $currentLocale; $availableBlogs = $localesNb > 1 ? $this->blogRepository->getBlogsForLocale($currentLocale) : $this->blogRepository->findAll(); @@ -96,7 +96,9 @@ public function addLocaleField($builder, $currentLocale, $availableLocales) ]; } - $builder->add('locale', $localesNb > 1 ? ChoiceType::class : HiddenType::class, + $builder->add( + 'locale', + $localesNb > 1 ? ChoiceType::class : HiddenType::class, array_merge( [ 'label' => 'victoire.blog.choose.locale.label', @@ -135,7 +137,9 @@ public function addBlogField($builder, Blog $currentBlog, $availableBlogs, $curr ]; } - $builder->add('blog', $blogsNb > 1 ? ChoiceType::class : EntityHiddenType::class, + $builder->add( + 'blog', + $blogsNb > 1 ? ChoiceType::class : EntityHiddenType::class, array_merge( [ 'label' => 'victoire.blog.choose.blog.label', diff --git a/Bundle/BlogBundle/Listener/ArticleMenuListener.php b/Bundle/BlogBundle/Listener/ArticleMenuListener.php index 843f7e832..10db5edc4 100644 --- a/Bundle/BlogBundle/Listener/ArticleMenuListener.php +++ b/Bundle/BlogBundle/Listener/ArticleMenuListener.php @@ -38,7 +38,8 @@ public function addContextual($event) $bottomRightNavbar = $this->menuBuilder->getBottomRightNavbar(); - $bottomRightNavbar->addChild('menu.page.settings', + $bottomRightNavbar->addChild( + 'menu.page.settings', [ 'route' => 'victoire_blog_article_settings', 'routeParameters' => [ diff --git a/Bundle/BlogBundle/Listener/BlogMenuListener.php b/Bundle/BlogBundle/Listener/BlogMenuListener.php index 9dfd981a8..e415bb2af 100644 --- a/Bundle/BlogBundle/Listener/BlogMenuListener.php +++ b/Bundle/BlogBundle/Listener/BlogMenuListener.php @@ -66,7 +66,7 @@ public function addBlogContextual($event) [ 'route' => 'victoire_blog_article_new', 'routeParameters' => ['id' => $event->getPage()->getId()], - ] + ] )->setLinkAttribute('data-toggle', 'vic-modal'); } diff --git a/Bundle/BusinessEntityBundle/Annotation/AnnotationDriver.php b/Bundle/BusinessEntityBundle/Annotation/AnnotationDriver.php index 079ec7e4e..be8c221f9 100644 --- a/Bundle/BusinessEntityBundle/Annotation/AnnotationDriver.php +++ b/Bundle/BusinessEntityBundle/Annotation/AnnotationDriver.php @@ -313,22 +313,22 @@ protected function loadReceiverProperties(\ReflectionClass $class) foreach ($annotations as $key => $annotationObj) { if ($annotationObj instanceof Column && $annotationObj->nullable === false) { throw new Exception(sprintf( - 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence must have "nullable=true" for ORM\Column annotation', - $refProperty->name, - $refProperty->class - )); + 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence must have "nullable=true" for ORM\Column annotation', + $refProperty->name, + $refProperty->class + )); } elseif ($annotationObj instanceof NotBlank) { throw new Exception(sprintf( - 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence can not use NotBlank annotation', - $refProperty->name, - $refProperty->class - )); + 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence can not use NotBlank annotation', + $refProperty->name, + $refProperty->class + )); } elseif ($annotationObj instanceof NotNull) { throw new Exception(sprintf( - 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence can not use NotNull annotation', - $refProperty->name, - $refProperty->class - )); + 'Property "%s" in class "%s" has a @ReceiverProperty annotation and by consequence can not use NotNull annotation', + $refProperty->name, + $refProperty->class + )); } elseif ($annotationObj instanceof ReceiverPropertyAnnotation && $annotationObj->isRequired()) { $receiverProperty->setRequired(true); } diff --git a/Bundle/BusinessEntityBundle/EventSubscriber/BusinessEntitySubscriber.php b/Bundle/BusinessEntityBundle/EventSubscriber/BusinessEntitySubscriber.php index d169e40f9..8b5f9f642 100644 --- a/Bundle/BusinessEntityBundle/EventSubscriber/BusinessEntitySubscriber.php +++ b/Bundle/BusinessEntityBundle/EventSubscriber/BusinessEntitySubscriber.php @@ -37,10 +37,10 @@ class BusinessEntitySubscriber implements EventSubscriber * @param EventDispatcherInterface $dispatcher */ public function __construct( - BusinessPageBuilder $businessPageBuilder, - BusinessEntityHelper $businessEntityHelper, - BusinessPageHelper $businessPageHelper, - EventDispatcherInterface $dispatcher + BusinessPageBuilder $businessPageBuilder, + BusinessEntityHelper $businessEntityHelper, + BusinessPageHelper $businessPageHelper, + EventDispatcherInterface $dispatcher ) { $this->businessPageBuilder = $businessPageBuilder; $this->businessEntityHelper = $businessEntityHelper; diff --git a/Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php b/Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php index 6af0e40e4..6cc481df6 100644 --- a/Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php +++ b/Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php @@ -2,7 +2,6 @@ namespace Victoire\Bundle\BusinessEntityBundle\Helper; -use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity; use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessProperty; diff --git a/Bundle/BusinessEntityBundle/Security/Voter/BusinessEntityOwnerVoter.php b/Bundle/BusinessEntityBundle/Security/Voter/BusinessEntityOwnerVoter.php index 1c126bdd7..3eeac3241 100644 --- a/Bundle/BusinessEntityBundle/Security/Voter/BusinessEntityOwnerVoter.php +++ b/Bundle/BusinessEntityBundle/Security/Voter/BusinessEntityOwnerVoter.php @@ -39,7 +39,8 @@ protected function supports($attribute, $subject) protected function voteOnAttribute($attribute, $subject, TokenInterface $token) { return $token->getUser() instanceof $this->userClass - && ($token->getUser()->hasRole('ROLE_VICTOIRE') + && ( + $token->getUser()->hasRole('ROLE_VICTOIRE') || $token->getUser()->hasRole('ROLE_VICTOIRE_DEVELOPER') || $subject->getAuthor() === $token->getUser() ); diff --git a/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php b/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php index 4482aeeb5..6a7ed627d 100644 --- a/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php +++ b/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php @@ -45,11 +45,13 @@ class BusinessPageBuilder * @param ParameterConverter $parameterConverter * @param EntityProxyProvider $entityProxyProvider */ - public function __construct(BusinessEntityHelper $businessEntityHelper, + public function __construct( + BusinessEntityHelper $businessEntityHelper, UrlBuilder $urlBuilder, ParameterConverter $parameterConverter, EntityProxyProvider $entityProxyProvider, - ViewReferenceBuilder $viewReferenceBuilder) + ViewReferenceBuilder $viewReferenceBuilder + ) { $this->businessEntityHelper = $businessEntityHelper; $this->urlBuilder = $urlBuilder; diff --git a/Bundle/BusinessPageBundle/Controller/BusinessTemplateController.php b/Bundle/BusinessPageBundle/Controller/BusinessTemplateController.php index 7ccff1378..7e77b8da6 100644 --- a/Bundle/BusinessPageBundle/Controller/BusinessTemplateController.php +++ b/Bundle/BusinessPageBundle/Controller/BusinessTemplateController.php @@ -57,15 +57,15 @@ public function indexAction() } return new JsonResponse([ - 'html' => $this->container->get('templating')->render( - 'VictoireBusinessPageBundle:BusinessEntity:index.html.twig', - [ - 'businessEntities' => $businessEntities, - 'BusinessTemplates' => $BusinessTemplates, - ] - ), - 'success' => true, - ]); + 'html' => $this->container->get('templating')->render( + 'VictoireBusinessPageBundle:BusinessEntity:index.html.twig', + [ + 'businessEntities' => $businessEntities, + 'BusinessTemplates' => $BusinessTemplates, + ] + ), + 'success' => true, + ]); } /** diff --git a/Bundle/BusinessPageBundle/Listener/BusinessPageMenuListener.php b/Bundle/BusinessPageBundle/Listener/BusinessPageMenuListener.php index 3c03b017f..7e8d6f046 100644 --- a/Bundle/BusinessPageBundle/Listener/BusinessPageMenuListener.php +++ b/Bundle/BusinessPageBundle/Listener/BusinessPageMenuListener.php @@ -67,7 +67,8 @@ public function addContextual($event) $bottomRightNavbar = $this->menuBuilder->getBottomRightNavbar(); //if there is a template, we add the link in the top bar - $bottomRightNavbar->addChild('menu.page.settings', + $bottomRightNavbar->addChild( + 'menu.page.settings', [ 'route' => 'victoire_business_template_edit', 'routeParameters' => ['id' => $event->getPage()->getId()], @@ -76,7 +77,8 @@ public function addContextual($event) ], ] )->setLinkAttribute('data-toggle', 'vic-modal'); - $bottomRightNavbar->addChild('menu.page.seoSettings', + $bottomRightNavbar->addChild( + 'menu.page.seoSettings', [ 'route' => 'victoire_seo_pageSeo_settings', 'routeParameters' => ['id' => $event->getPage()->getId()], diff --git a/Bundle/ConfigBundle/Favicon/FaviconConfigDumper.php b/Bundle/ConfigBundle/Favicon/FaviconConfigDumper.php index 3872b9cce..12aa4fcd6 100644 --- a/Bundle/ConfigBundle/Favicon/FaviconConfigDumper.php +++ b/Bundle/ConfigBundle/Favicon/FaviconConfigDumper.php @@ -43,10 +43,11 @@ public function dump(GlobalConfig $globalConfig, string $path = 'faviconConfig.j try { $fileSystem->dumpFile( - $path, $this->environment->render('VictoireConfigBundle:global:faviconConfig.json.twig', [ - 'globalConfig' => $globalConfig, - 'webDir' => $this->webDir, - ]) + $path, + $this->environment->render('VictoireConfigBundle:global:faviconConfig.json.twig', [ + 'globalConfig' => $globalConfig, + 'webDir' => $this->webDir, + ]) ); return $path; diff --git a/Bundle/ConfigBundle/Favicon/FaviconGenerator.php b/Bundle/ConfigBundle/Favicon/FaviconGenerator.php index 23be15674..4d1e592f9 100644 --- a/Bundle/ConfigBundle/Favicon/FaviconGenerator.php +++ b/Bundle/ConfigBundle/Favicon/FaviconGenerator.php @@ -105,10 +105,10 @@ public function generateFromConfigFile(string $configPath) throw new GenerateFaviconException( sprintf( - 'An issue occured with the real favicon generation, you can dive into the %s file', - $faviconRequestPath - ) - ); + 'An issue occured with the real favicon generation, you can dive into the %s file', + $faviconRequestPath + ) + ); } catch (FileNotFoundException | ProcessFailedException $e) { throw $e; } diff --git a/Bundle/CoreBundle/Builder/ViewCssBuilder.php b/Bundle/CoreBundle/Builder/ViewCssBuilder.php index 60b8ddd8c..552605c4e 100644 --- a/Bundle/CoreBundle/Builder/ViewCssBuilder.php +++ b/Bundle/CoreBundle/Builder/ViewCssBuilder.php @@ -61,12 +61,12 @@ public function generateViewCss(View $view, array $widgets) foreach ($widgets as $widget) { $style = $this->container->get('templating')->render( - 'VictoireCoreBundle:Widget:style/style.html.twig', - [ - 'widget' => $widget, - 'victoire_twig_responsive' => $this->victoireTwigResponsive, - ] - ); + 'VictoireCoreBundle:Widget:style/style.html.twig', + [ + 'widget' => $widget, + 'victoire_twig_responsive' => $this->victoireTwigResponsive, + ] + ); $css .= trim($style); } diff --git a/Bundle/CoreBundle/Command/WidgetCssGenerateCommand.php b/Bundle/CoreBundle/Command/WidgetCssGenerateCommand.php index 22679d770..7a8fd2525 100644 --- a/Bundle/CoreBundle/Command/WidgetCssGenerateCommand.php +++ b/Bundle/CoreBundle/Command/WidgetCssGenerateCommand.php @@ -13,7 +13,7 @@ class WidgetCssGenerateCommand extends ContainerAwareCommand { - /** @var EntityManager $entityManager */ + /** @var EntityManager */ private $entityManager; /** diff --git a/Bundle/CoreBundle/Controller/VictoireAlertifyControllerTrait.php b/Bundle/CoreBundle/Controller/VictoireAlertifyControllerTrait.php index 29af1527f..fbb296231 100644 --- a/Bundle/CoreBundle/Controller/VictoireAlertifyControllerTrait.php +++ b/Bundle/CoreBundle/Controller/VictoireAlertifyControllerTrait.php @@ -22,10 +22,10 @@ public function alert($content, $type = 'success') } $content = array_merge($content, [ - 'context' => 'victoire', - 'layout' => 'growl', - 'effect' => 'jelly', - ]); + 'context' => 'victoire', + 'layout' => 'growl', + 'effect' => 'jelly', + ]); $this->container->get('alertify')->alert($content, $type); } diff --git a/Bundle/CoreBundle/DependencyInjection/VictoireCoreExtension.php b/Bundle/CoreBundle/DependencyInjection/VictoireCoreExtension.php index 2b06d4696..b2b0dcb7a 100644 --- a/Bundle/CoreBundle/DependencyInjection/VictoireCoreExtension.php +++ b/Bundle/CoreBundle/DependencyInjection/VictoireCoreExtension.php @@ -45,46 +45,59 @@ public function load(array $configs, ContainerBuilder $container) } $container->setParameter( - 'victoire_core.cache_dir', $config['cache_dir'] + 'victoire_core.cache_dir', + $config['cache_dir'] ); $container->setParameter( - 'victoire_core.business_entity_debug', $config['business_entity_debug'] + 'victoire_core.business_entity_debug', + $config['business_entity_debug'] ); if (array_key_exists('templates', $config)) { $container->setParameter( - 'victoire_core.templates', $config['templates'] + 'victoire_core.templates', + $config['templates'] ); } else { $container->setParameter( - 'victoire_core.templates', '' + 'victoire_core.templates', + '' ); } $container->setParameter( - 'victoire_core.widgets', $config['widgets'] + 'victoire_core.widgets', + $config['widgets'] ); $container->setParameter( - 'victoire_core.layouts', $config['layouts'] + 'victoire_core.layouts', + $config['layouts'] ); $container->setParameter( - 'victoire_core.modal_layouts', $config['modal_layouts'] + 'victoire_core.modal_layouts', + $config['modal_layouts'] ); $container->setParameter( - 'victoire_core.slots', $config['slots'] + 'victoire_core.slots', + $config['slots'] ); $container->setParameter( - 'victoire_core.user_class', $config['user_class'] + 'victoire_core.user_class', + $config['user_class'] ); $container->setParameter( - 'victoire_core.base_paths', $config['base_paths'] + 'victoire_core.base_paths', + $config['base_paths'] ); $container->setParameter( - 'victoire_core.entity_finder_regex', $config['entity_finder_regex'] + 'victoire_core.entity_finder_regex', + $config['entity_finder_regex'] ); $container->setParameter( - 'victoire_core.businessTemplates', $config['businessTemplates'] + 'victoire_core.businessTemplates', + $config['businessTemplates'] ); $container->setParameter( - 'victoire_core.domain_name', $config['domain_name'] + 'victoire_core.domain_name', + $config['domain_name'] ); } } diff --git a/Bundle/CoreBundle/EventSubscriber/EntityProxySubscriber.php b/Bundle/CoreBundle/EventSubscriber/EntityProxySubscriber.php index 80f6c6147..7a5ca035d 100644 --- a/Bundle/CoreBundle/EventSubscriber/EntityProxySubscriber.php +++ b/Bundle/CoreBundle/EventSubscriber/EntityProxySubscriber.php @@ -49,10 +49,11 @@ public static function loadClassMetadata($eventArgs) if ($metadatas->name === 'Victoire\Bundle\CoreBundle\Entity\EntityProxy') { foreach (self::$cacheReader->getBusinessClasses() as $entity) { if (!$metadatas->hasAssociation($entity->getId())) { - $metadatas->mapOneToOne([ - 'fieldName' => $entity->getId(), - 'targetEntity' => $entity->getClass(), - 'cascade' => ['persist'], + $metadatas->mapOneToOne( + [ + 'fieldName' => $entity->getId(), + 'targetEntity' => $entity->getClass(), + 'cascade' => ['persist'], ] ); $metadatas->associationMappings[$entity->getId()]['joinColumns'][0]['onDelete'] = 'CASCADE'; diff --git a/Bundle/CoreBundle/Form/ViewType.php b/Bundle/CoreBundle/Form/ViewType.php index adae8163b..6e0a849d8 100644 --- a/Bundle/CoreBundle/Form/ViewType.php +++ b/Bundle/CoreBundle/Form/ViewType.php @@ -97,7 +97,10 @@ public function buildForm(FormBuilderInterface $builder, array $options) }; } - $form->add('parent', null, [ + $form->add( + 'parent', + null, + [ 'class' => 'Victoire\Bundle\PageBundle\Entity\BasePage', 'label' => 'form.view.type.parent.label', 'query_builder' => $getAllPageWithoutMe, diff --git a/Bundle/CoreBundle/Form/WidgetType.php b/Bundle/CoreBundle/Form/WidgetType.php index ecfee5892..5092d3ea3 100644 --- a/Bundle/CoreBundle/Form/WidgetType.php +++ b/Bundle/CoreBundle/Form/WidgetType.php @@ -126,7 +126,7 @@ function (FormEvent $event) use ($options) { ); $builder->addEventListener( FormEvents::POST_SUBMIT, - function (FormEvent $event) use ($options) { + function (FormEvent $event) { $widget = $event->getData(); /** @var Criteria $criteria */ foreach ($widget->getCriterias() as $criteria) { diff --git a/Bundle/CoreBundle/Listener/BackendMenuListener.php b/Bundle/CoreBundle/Listener/BackendMenuListener.php index 0ef208507..0f4702c2b 100644 --- a/Bundle/CoreBundle/Listener/BackendMenuListener.php +++ b/Bundle/CoreBundle/Listener/BackendMenuListener.php @@ -41,7 +41,9 @@ public function addGlobal(Event $event) { $this->mainItem = $this->menuBuilder->getLeftNavbar(); - $this->mainItem->addChild('hamburger_menu.backend.back_home', [ + $this->mainItem->addChild( + 'hamburger_menu.backend.back_home', + [ 'route' => 'victoire_core_homepage_show', ] ); diff --git a/Bundle/CoreBundle/Menu/MenuBuilder.php b/Bundle/CoreBundle/Menu/MenuBuilder.php index 2f97a5621..73217075b 100644 --- a/Bundle/CoreBundle/Menu/MenuBuilder.php +++ b/Bundle/CoreBundle/Menu/MenuBuilder.php @@ -45,7 +45,9 @@ public function __construct(FactoryInterface $factory, AuthorizationChecker $aut */ public function initTopNavbar() { - $this->topNavbar = $this->factory->createItem('root', [ + $this->topNavbar = $this->factory->createItem( + 'root', + [ 'childrenAttributes' => [ 'id' => 'v-navbar-top', 'class' => 'v-menu', @@ -63,7 +65,9 @@ public function initTopNavbar() */ public function initBottomLeftNavbar() { - $this->bottomLeftNavbar = $this->factory->createItem('root', [ + $this->bottomLeftNavbar = $this->factory->createItem( + 'root', + [ 'childrenAttributes' => [ 'id' => 'v-footer-navbar-bottom-left', ], @@ -105,7 +109,9 @@ public function initBottomLeftNavbar() */ public function initBottomRightNavbar() { - $this->bottomRightNavbar = $this->factory->createItem('root', [ + $this->bottomRightNavbar = $this->factory->createItem( + 'root', + [ 'childrenAttributes' => [ 'id' => 'v-footer-navbar-bottom-right', ], @@ -146,7 +152,9 @@ public function initBottomRightNavbar() */ public function initFloatActionNavbar() { - $this->floatActionNavbar = $this->factory->createItem('root', [ + $this->floatActionNavbar = $this->factory->createItem( + 'root', + [ 'childrenAttributes' => [ 'id' => 'v-float-container', ], diff --git a/Bundle/CoreBundle/Repository/StateFullRepositoryTrait.php b/Bundle/CoreBundle/Repository/StateFullRepositoryTrait.php index 7b54f2390..9e2758cb1 100644 --- a/Bundle/CoreBundle/Repository/StateFullRepositoryTrait.php +++ b/Bundle/CoreBundle/Repository/StateFullRepositoryTrait.php @@ -12,7 +12,7 @@ */ trait StateFullRepositoryTrait { - /** @var QueryBuilder $qb */ + /** @var QueryBuilder */ protected $qb; /** diff --git a/Bundle/CoreBundle/Repository/ViewRepository.php b/Bundle/CoreBundle/Repository/ViewRepository.php index e2054ba41..119687ae8 100644 --- a/Bundle/CoreBundle/Repository/ViewRepository.php +++ b/Bundle/CoreBundle/Repository/ViewRepository.php @@ -91,7 +91,8 @@ public function findByViewReferences(array $viewReferences) $viewReferences, function ($e) use ($pageId) { return $e->getViewId() == $pageId; - }); + } + ); if (!empty($viewReference[0])) { $page->setCurrentLocale($viewReference[0]->getLocale()); } diff --git a/Bundle/CoreBundle/Twig/Extension/RoutingExtension.php b/Bundle/CoreBundle/Twig/Extension/RoutingExtension.php index fa75be5cf..fc9d9e388 100644 --- a/Bundle/CoreBundle/Twig/Extension/RoutingExtension.php +++ b/Bundle/CoreBundle/Twig/Extension/RoutingExtension.php @@ -74,11 +74,15 @@ public function getPath($name, $parameters = [], $relative = false) ]); $errorPage = $this->errorPageRepository->findOneByCode(404); $parameters['url'] = $this->generator->generate( - 'victoire_core_page_show', array_merge([ - '_locale' => $requestLocale, - 'url' => $errorPage ? $errorPage->getSlug() : '', - ], $parameters - )); + 'victoire_core_page_show', + array_merge( + [ + '_locale' => $requestLocale, + 'url' => $errorPage ? $errorPage->getSlug() : '', + ], + $parameters + ) + ); } $name = 'victoire_core_page_show'; diff --git a/Bundle/FilterBundle/DependencyInjection/Compiler/FilterCompilerPass.php b/Bundle/FilterBundle/DependencyInjection/Compiler/FilterCompilerPass.php index 3cf313d7d..66b330849 100644 --- a/Bundle/FilterBundle/DependencyInjection/Compiler/FilterCompilerPass.php +++ b/Bundle/FilterBundle/DependencyInjection/Compiler/FilterCompilerPass.php @@ -25,7 +25,9 @@ public function process(ContainerBuilder $container) ); foreach ($taggedServices as $id => $attributes) { - $definition->addMethodCall('addFilter', [ + $definition->addMethodCall( + 'addFilter', + [ new Reference($id), ] ); diff --git a/Bundle/I18nBundle/Command/ImportViewTranslationsCommand.php b/Bundle/I18nBundle/Command/ImportViewTranslationsCommand.php index 2fe28bbdf..85b0f1e6a 100644 --- a/Bundle/I18nBundle/Command/ImportViewTranslationsCommand.php +++ b/Bundle/I18nBundle/Command/ImportViewTranslationsCommand.php @@ -8,7 +8,6 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Victoire\Bundle\CoreBundle\Entity\View; class ImportViewTranslationsCommand extends ContainerAwareCommand { diff --git a/Bundle/I18nBundle/DependencyInjection/VictoireI18nExtension.php b/Bundle/I18nBundle/DependencyInjection/VictoireI18nExtension.php index a63854771..ebb2fbc51 100644 --- a/Bundle/I18nBundle/DependencyInjection/VictoireI18nExtension.php +++ b/Bundle/I18nBundle/DependencyInjection/VictoireI18nExtension.php @@ -28,19 +28,24 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.yml'); $container->setParameter( - 'victoire_i18n.available_locales', $config['available_locales'] + 'victoire_i18n.available_locales', + $config['available_locales'] ); $container->setParameter( - 'victoire_i18n.locale_pattern_table', $config['locale_pattern_table'] + 'victoire_i18n.locale_pattern_table', + $config['locale_pattern_table'] ); $container->setParameter( - 'victoire_i18n.victoire_locale', $config['victoire_locale'] + 'victoire_i18n.victoire_locale', + $config['victoire_locale'] ); $container->setParameter( - 'victoire_i18n.users_locale.domains', $config['users_locale_domains'] + 'victoire_i18n.users_locale.domains', + $config['users_locale_domains'] ); $container->setParameter( - 'victoire_i18n.locale_pattern', $config['locale_pattern'] + 'victoire_i18n.locale_pattern', + $config['locale_pattern'] ); } diff --git a/Bundle/MediaBundle/Controller/ChooserController.php b/Bundle/MediaBundle/Controller/ChooserController.php index 9277ff6d0..bd01d6bc5 100644 --- a/Bundle/MediaBundle/Controller/ChooserController.php +++ b/Bundle/MediaBundle/Controller/ChooserController.php @@ -71,15 +71,15 @@ public function chooserShowFolderAction(Request $request, $folderId) } return $this->render('@VictoireMedia/Chooser/chooserShowFolder.html.twig', [ - 'mediamanager' => $mediaHandler, - 'handler' => $handler, - 'folder' => $folder, - 'folders' => $folders, - 'forms' => [ - 'fileform' => $this->createTypeFormView($mediaHandler, FileType::class), - 'videoform' => $this->createTypeFormView($mediaHandler, RemoteVideoType::class), - 'slideform' => $this->createTypeFormView($mediaHandler, RemoteSlideType::class), - ], + 'mediamanager' => $mediaHandler, + 'handler' => $handler, + 'folder' => $folder, + 'folders' => $folders, + 'forms' => [ + 'fileform' => $this->createTypeFormView($mediaHandler, FileType::class), + 'videoform' => $this->createTypeFormView($mediaHandler, RemoteVideoType::class), + 'slideform' => $this->createTypeFormView($mediaHandler, RemoteSlideType::class), + ], ]); } diff --git a/Bundle/MediaBundle/Controller/MediaController.php b/Bundle/MediaBundle/Controller/MediaController.php index 15bca4c1f..e33dfb994 100644 --- a/Bundle/MediaBundle/Controller/MediaController.php +++ b/Bundle/MediaBundle/Controller/MediaController.php @@ -60,12 +60,12 @@ public function showAction(Request $request, $mediaId) $showTemplate = $mediaManager->getHandler($media)->getShowTemplate($media); return $this->render($showTemplate, [ - 'handler' => $handler, - 'mediamanager' => $this->get('victoire_media.media_manager'), - 'editform' => $form->createView(), - 'media' => $media, - 'helper' => $helper, - 'folder' => $folder, ]); + 'handler' => $handler, + 'mediamanager' => $this->get('victoire_media.media_manager'), + 'editform' => $form->createView(), + 'media' => $media, + 'helper' => $helper, + 'folder' => $folder, ]); } /** diff --git a/Bundle/MediaBundle/Form/BulkUploadType.php b/Bundle/MediaBundle/Form/BulkUploadType.php index bd744b3e7..872098445 100644 --- a/Bundle/MediaBundle/Form/BulkUploadType.php +++ b/Bundle/MediaBundle/Form/BulkUploadType.php @@ -30,7 +30,9 @@ class BulkUploadType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( - 'files', 'file', [ + 'files', + 'file', + [ 'required' => false, 'attr' => [ 'accept' => $this->accept, diff --git a/Bundle/MediaBundle/Form/FolderType.php b/Bundle/MediaBundle/Form/FolderType.php index ef68c852d..58d08482e 100644 --- a/Bundle/MediaBundle/Form/FolderType.php +++ b/Bundle/MediaBundle/Form/FolderType.php @@ -50,7 +50,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) return $qb; }, - ]); + ]); } /** diff --git a/Bundle/MediaBundle/Form/RemoteSlide/RemoteSlideType.php b/Bundle/MediaBundle/Form/RemoteSlide/RemoteSlideType.php index 734dbb86f..7e19dc44d 100644 --- a/Bundle/MediaBundle/Form/RemoteSlide/RemoteSlideType.php +++ b/Bundle/MediaBundle/Form/RemoteSlide/RemoteSlideType.php @@ -38,7 +38,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ - 'data_class' => 'Victoire\Bundle\MediaBundle\Helper\RemoteSlide\RemoteSlideHelper', + 'data_class' => 'Victoire\Bundle\MediaBundle\Helper\RemoteSlide\RemoteSlideHelper', ]); } } diff --git a/Bundle/MediaBundle/Helper/File/FileHandler.php b/Bundle/MediaBundle/Helper/File/FileHandler.php index f0b4f0b65..3dfe74349 100644 --- a/Bundle/MediaBundle/Helper/File/FileHandler.php +++ b/Bundle/MediaBundle/Helper/File/FileHandler.php @@ -2,7 +2,6 @@ namespace Victoire\Bundle\MediaBundle\Helper\File; -use Gaufrette\Adapter\Local; use Gaufrette\Filesystem; use Gedmo\Sluggable\Util\Urlizer; use Symfony\Component\HttpFoundation\File\File; @@ -207,9 +206,9 @@ public function getShowTemplate(Media $media) public function getAddFolderActions() { return [ - self::TYPE => [ - 'type' => self::TYPE, - 'name' => 'media.file.add', ], + self::TYPE => [ + 'type' => self::TYPE, + 'name' => 'media.file.add', ], ]; } } diff --git a/Bundle/MediaBundle/Helper/RemoteSlide/RemoteSlideHandler.php b/Bundle/MediaBundle/Helper/RemoteSlide/RemoteSlideHandler.php index 8a7be8d16..237736453 100644 --- a/Bundle/MediaBundle/Helper/RemoteSlide/RemoteSlideHandler.php +++ b/Bundle/MediaBundle/Helper/RemoteSlide/RemoteSlideHandler.php @@ -120,11 +120,11 @@ public function updateMedia(Media $media) public function getAddUrlFor(array $params = []) { return [ - 'slide' => [ - 'path' => 'VictoireMediaBundle_folder_slidecreate', - 'params' => [ - 'folderId' => $params['folderId'], - ], + 'slide' => [ + 'path' => 'VictoireMediaBundle_folder_slidecreate', + 'params' => [ + 'folderId' => $params['folderId'], + ], ], ]; } @@ -186,9 +186,9 @@ public function getImageUrl(Media $media, $basepath) public function getAddFolderActions() { return [ - self::TYPE => [ - 'type' => self::TYPE, - 'name' => 'media.slide.add', ], - ]; + self::TYPE => [ + 'type' => self::TYPE, + 'name' => 'media.slide.add', ], + ]; } } diff --git a/Bundle/SeoBundle/Controller/PageSeoController.php b/Bundle/SeoBundle/Controller/PageSeoController.php index 0ab7c599b..cd8761abf 100644 --- a/Bundle/SeoBundle/Controller/PageSeoController.php +++ b/Bundle/SeoBundle/Controller/PageSeoController.php @@ -106,9 +106,12 @@ public function settingsPostAction(Request $request, View $view) */ private function createSettingsForm(PageSeo $pageSeo, View $view) { - return $this->get('form.factory')->create(PageSeoType::class, $pageSeo, + return $this->get('form.factory')->create( + PageSeoType::class, + $pageSeo, [ - 'action' => $this->get('router')->generate('victoire_seo_pageSeo_settings_post', + 'action' => $this->get('router')->generate( + 'victoire_seo_pageSeo_settings_post', [ 'id' => $view->getId(), ] diff --git a/Bundle/SeoBundle/Controller/RedirectionController.php b/Bundle/SeoBundle/Controller/RedirectionController.php index 708e7590b..401470bbc 100644 --- a/Bundle/SeoBundle/Controller/RedirectionController.php +++ b/Bundle/SeoBundle/Controller/RedirectionController.php @@ -50,7 +50,8 @@ public function indexAction(Request $request) /** @var Redirection[] $redirection */ foreach ($redirections as $redirection) { - $forms[$redirection->getId()] = $this->getRedirectionForm($redirection, + $forms[$redirection->getId()] = $this->getRedirectionForm( + $redirection, sprintf('#redirection-%d-item-container', $redirection->getId()) )->createView(); } diff --git a/Bundle/SeoBundle/DependencyInjection/VictoireSeoExtension.php b/Bundle/SeoBundle/DependencyInjection/VictoireSeoExtension.php index 92f07e1c6..eead6dfda 100644 --- a/Bundle/SeoBundle/DependencyInjection/VictoireSeoExtension.php +++ b/Bundle/SeoBundle/DependencyInjection/VictoireSeoExtension.php @@ -29,7 +29,8 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.yml'); $container->setParameter( - 'victoire_seo.analytics', $config['analytics'] + 'victoire_seo.analytics', + $config['analytics'] ); } } diff --git a/Bundle/SeoBundle/Form/PageSeoType.php b/Bundle/SeoBundle/Form/PageSeoType.php index fc31a2d42..0ad29631a 100644 --- a/Bundle/SeoBundle/Form/PageSeoType.php +++ b/Bundle/SeoBundle/Form/PageSeoType.php @@ -9,7 +9,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Victoire\Bundle\FormBundle\Form\Type\LinkType; use Victoire\Bundle\MediaBundle\Form\Type\MediaType; -use Victoire\Bundle\SeoBundle\Entity\PageSeo; use Victoire\Bundle\SeoBundle\Entity\PageSeoTranslation; class PageSeoType extends AbstractType @@ -77,19 +76,19 @@ public function buildForm(FormBuilderInterface $builder, array $options) ], ], 'twitterCard' => [ - 'field_type' => ChoiceType::class, - 'label' => 'form.pageSeo.twitterCard.label', - 'choices' => [ - 'form.pageSeo.twitterCard.summary.label' => 'summary', - 'form.pageSeo.twitterCard.summary_large_image.label' => 'summary_large_image', - 'form.pageSeo.twitterCard.photo.label' => 'photo', - 'form.pageSeo.twitterCard.app.label' => 'app', - 'form.pageSeo.twitterCard.player.label' => 'player', - 'form.pageSeo.twitterCard.product.label' => 'product', - ], - 'choices_as_values' => true, - 'preferred_choices' => ['summary'], - 'vic_help_block' => 'form.pageSeo.twitterCard.vic_help_block', + 'field_type' => ChoiceType::class, + 'label' => 'form.pageSeo.twitterCard.label', + 'choices' => [ + 'form.pageSeo.twitterCard.summary.label' => 'summary', + 'form.pageSeo.twitterCard.summary_large_image.label' => 'summary_large_image', + 'form.pageSeo.twitterCard.photo.label' => 'photo', + 'form.pageSeo.twitterCard.app.label' => 'app', + 'form.pageSeo.twitterCard.player.label' => 'player', + 'form.pageSeo.twitterCard.product.label' => 'product', + ], + 'choices_as_values' => true, + 'preferred_choices' => ['summary'], + 'vic_help_block' => 'form.pageSeo.twitterCard.vic_help_block', ], 'twitterUrl' => [ 'label' => 'form.pageSeo.twitterUrl.label', diff --git a/Bundle/SitemapBundle/Command/GenerateCommand.php b/Bundle/SitemapBundle/Command/GenerateCommand.php index 99a4c7fa1..45956b2c4 100644 --- a/Bundle/SitemapBundle/Command/GenerateCommand.php +++ b/Bundle/SitemapBundle/Command/GenerateCommand.php @@ -55,10 +55,12 @@ protected function getLocalesFromInput(InputInterface $input) if ($locale != 'all') { //validate the given locale is a valid locale if (!array_search($locale, $locales)) { - throw new \Exception(sprintf( - 'The given locale %s doesn\'t exist (%s)', - $locale, - implode($locales)) + throw new \Exception( + sprintf( + 'The given locale %s doesn\'t exist (%s)', + $locale, + implode($locales) + ) ); } $locales = [$locale]; diff --git a/Bundle/SitemapBundle/Controller/SitemapController.php b/Bundle/SitemapBundle/Controller/SitemapController.php index e8573995b..c0bca9ba1 100644 --- a/Bundle/SitemapBundle/Controller/SitemapController.php +++ b/Bundle/SitemapBundle/Controller/SitemapController.php @@ -2,7 +2,6 @@ namespace Victoire\Bundle\SitemapBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; @@ -126,8 +125,13 @@ public function changePriorityAction(Request $request, BasePage $page) */ protected function createSitemapPriorityType(BasePage $page, PageSeo $pageSeo) { - $form = $this->createForm(SitemapPriorityPageSeoType::class, $pageSeo, [ - 'action' => $this->generateUrl('victoire_sitemap_changePriority', [ + $form = $this->createForm( + SitemapPriorityPageSeoType::class, + $pageSeo, + [ + 'action' => $this->generateUrl( + 'victoire_sitemap_changePriority', + [ 'id' => $page->getId(), ] ), diff --git a/Bundle/TemplateBundle/Controller/TemplateController.php b/Bundle/TemplateBundle/Controller/TemplateController.php index c236897af..31f5a0214 100644 --- a/Bundle/TemplateBundle/Controller/TemplateController.php +++ b/Bundle/TemplateBundle/Controller/TemplateController.php @@ -148,11 +148,11 @@ public function settingsAction(Request $request, $template) $em->flush(); return new JsonResponse( - [ - 'success' => true, - 'url' => $this->generateUrl('victoire_template_show', ['id' => $template->getId()]), - ] - ); + [ + 'success' => true, + 'url' => $this->generateUrl('victoire_template_show', ['id' => $template->getId()]), + ] + ); } return new JsonResponse( diff --git a/Bundle/TemplateBundle/Listener/TemplateMenuListener.php b/Bundle/TemplateBundle/Listener/TemplateMenuListener.php index 798259758..5f2575017 100644 --- a/Bundle/TemplateBundle/Listener/TemplateMenuListener.php +++ b/Bundle/TemplateBundle/Listener/TemplateMenuListener.php @@ -35,7 +35,8 @@ public function addContextual($event) $template = $event->getTemplate(); //this contextual menu appears only for template - $menuBottomRight->addChild('menu.template.settings', + $menuBottomRight->addChild( + 'menu.template.settings', [ 'route' => 'victoire_template_settings', 'routeParameters' => ['id' => $template->getId()], diff --git a/Bundle/TwigBundle/Controller/ExceptionController.php b/Bundle/TwigBundle/Controller/ExceptionController.php index 669530f50..dcaed605a 100644 --- a/Bundle/TwigBundle/Controller/ExceptionController.php +++ b/Bundle/TwigBundle/Controller/ExceptionController.php @@ -84,7 +84,7 @@ public function showAction(Request $request, FlattenException $exception, DebugL $page = $this->em->getRepository('VictoireTwigBundle:ErrorPage')->findOneByCode($code); if ($page) { return $this->forward('VictoireTwigBundle:ErrorPage:show', [ - 'code' => $page->getCode(), + 'code' => $page->getCode(), ]); } } diff --git a/Bundle/TwigBundle/DependencyInjection/VictoireTwigExtension.php b/Bundle/TwigBundle/DependencyInjection/VictoireTwigExtension.php index 7ec291c03..43bd53d97 100644 --- a/Bundle/TwigBundle/DependencyInjection/VictoireTwigExtension.php +++ b/Bundle/TwigBundle/DependencyInjection/VictoireTwigExtension.php @@ -26,7 +26,8 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.xml'); $container->setParameter( - 'victoire_twig.responsive', $config['responsive'] + 'victoire_twig.responsive', + $config['responsive'] ); } } diff --git a/Bundle/UIBundle/Command/FetchAssetsCommand.php b/Bundle/UIBundle/Command/FetchAssetsCommand.php index 5895c970a..8d6453deb 100644 --- a/Bundle/UIBundle/Command/FetchAssetsCommand.php +++ b/Bundle/UIBundle/Command/FetchAssetsCommand.php @@ -24,25 +24,29 @@ public function configure() $this ->setName('victoire:ui:fetchAssets') - ->addArgument('victoireUIConfigPath', + ->addArgument( + 'victoireUIConfigPath', InputArgument::OPTIONAL, 'The victoire vendor path', 'vendor/victoire/victoire/Bundle/UIBundle/Resources/config' ) - ->addArgument('bowerPath', + ->addArgument( + 'bowerPath', InputArgument::OPTIONAL, 'The bower path', 'bower' ) - ->addArgument('yarnPath', + ->addArgument( + 'yarnPath', InputArgument::OPTIONAL, 'The yarn path', 'yarn' ) - ->addOption('force', + ->addOption( + 'force', null, InputOption::VALUE_NONE, - 'If dependencies are installed, it reinstalls all installed components. It also forces installation even when there are non-bower directories with the same name in the components directory. Also bypasses the cache and overwrites to the cache anyway.' + 'If dependencies are installed, it reinstalls all installed components. It also forces installation even when there are non-bower directories with the same name in the components directory. Also bypasses the cache and overwrites to the cache anyway.' ) ->setDescription('Fetch every assets (with bower and npm)'); } diff --git a/Bundle/UIBundle/Resources/config/yarn.lock b/Bundle/UIBundle/Resources/config/yarn.lock index 67b71f478..9f3954e6e 100644 --- a/Bundle/UIBundle/Resources/config/yarn.lock +++ b/Bundle/UIBundle/Resources/config/yarn.lock @@ -643,8 +643,8 @@ bluebird@3.*: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" boolbase@~1.0.0: version "1.0.0" @@ -1245,8 +1245,8 @@ electron-to-chromium@^1.2.5: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.5.tgz#d373727228843dfd8466c276089f13b40927a952" elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -1879,10 +1879,11 @@ has-unicode@^2.0.0: resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" dependencies: - inherits "^2.0.1" + inherits "^2.0.3" + minimalistic-assert "^1.0.1" hawk@~3.1.3: version "3.1.3" @@ -1898,8 +1899,8 @@ highlight.js: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.9.0.tgz#b9995dcfdc2773e307a34f0460d92b9a474782c0" hmac-drbg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.0.tgz#3db471f45aae4a994a0688322171f51b8b91bee5" + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" @@ -1978,9 +1979,9 @@ inherits@1: version "1.0.2" resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" inherits@2.0.1: version "2.0.1" @@ -2684,9 +2685,9 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.26.0" -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" diff --git a/Bundle/ViewReferenceBundle/Command/GenerateViewReferenceCommand.php b/Bundle/ViewReferenceBundle/Command/GenerateViewReferenceCommand.php index b2fcd227c..ffca675d8 100644 --- a/Bundle/ViewReferenceBundle/Command/GenerateViewReferenceCommand.php +++ b/Bundle/ViewReferenceBundle/Command/GenerateViewReferenceCommand.php @@ -5,7 +5,6 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Victoire\Bundle\CoreBundle\Entity\View; use Victoire\Bundle\CoreBundle\Helper\ViewHelper; class GenerateViewReferenceCommand extends ContainerAwareCommand diff --git a/Bundle/ViewReferenceBundle/Connector/ViewReferenceManager.php b/Bundle/ViewReferenceBundle/Connector/ViewReferenceManager.php index fa67d59c5..35d333636 100644 --- a/Bundle/ViewReferenceBundle/Connector/ViewReferenceManager.php +++ b/Bundle/ViewReferenceBundle/Connector/ViewReferenceManager.php @@ -76,7 +76,8 @@ public function saveReference(ViewReference $viewReference, $parentId = null, $p { // Transform the viewReference in array $arrayTransformer = $this->transformer->getViewReferenceTransformer( - $viewReference->getViewNamespace(), 'array' + $viewReference->getViewNamespace(), + 'array' ); $referenceArray = $arrayTransformer->reverseTransform($viewReference); // Remove old url if exist diff --git a/Bundle/ViewReferenceBundle/Connector/ViewReferenceRepository.php b/Bundle/ViewReferenceBundle/Connector/ViewReferenceRepository.php index 5e30f4c5c..192ea7de3 100644 --- a/Bundle/ViewReferenceBundle/Connector/ViewReferenceRepository.php +++ b/Bundle/ViewReferenceBundle/Connector/ViewReferenceRepository.php @@ -41,7 +41,8 @@ public function findReferenceByView(View $view) $referenceId = ViewReferenceHelper::generateViewReferenceId($view); $reference = $this->getOneReferenceByParameters(['id' => $referenceId], false); $transformer = $this->transformer->getViewReferenceTransformer( - (string) $reference['viewNamespace'], 'array' + (string) $reference['viewNamespace'], + 'array' ); return $transformer->transform($reference); @@ -66,7 +67,8 @@ public function getReferenceByUrl($url, $locale) $ref = $this->repository->findById($refId); // Transform the reference into a viewReference $transformer = $this->transformer->getViewReferenceTransformer( - (string) $ref['viewNamespace'], 'array' + (string) $ref['viewNamespace'], + 'array' ); return $transformer->transform($ref); diff --git a/Bundle/ViewReferenceBundle/DependencyInjection/ViewReferenceExtension.php b/Bundle/ViewReferenceBundle/DependencyInjection/ViewReferenceExtension.php index d5d6f2e57..a585e77cd 100644 --- a/Bundle/ViewReferenceBundle/DependencyInjection/ViewReferenceExtension.php +++ b/Bundle/ViewReferenceBundle/DependencyInjection/ViewReferenceExtension.php @@ -26,10 +26,12 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.yml'); $container->setParameter( - 'victoire_view_reference.cache.path', $config['cache_path'] + 'victoire_view_reference.cache.path', + $config['cache_path'] ); $container->setParameter( - 'victoire_view_reference.connector.type', $config['connector_type'] + 'victoire_view_reference.connector.type', + $config['connector_type'] ); } } diff --git a/Bundle/WidgetBundle/Builder/WidgetFormBuilder.php b/Bundle/WidgetBundle/Builder/WidgetFormBuilder.php index 7dada71ae..32901587e 100644 --- a/Bundle/WidgetBundle/Builder/WidgetFormBuilder.php +++ b/Bundle/WidgetBundle/Builder/WidgetFormBuilder.php @@ -253,7 +253,8 @@ public function buildWidgetForm(Widget $widget, View $view, $businessEntityId = $formUrl = $router->generate($action, $actionParams); } else { $viewReference = $this->container->get('victoire_core.current_view')->getCurrentView()->getReference(); - $formUrl = $router->generate('victoire_core_widget_update', + $formUrl = $router->generate( + 'victoire_core_widget_update', [ 'id' => $widget->getId(), 'viewReference' => $viewReference->getId(), diff --git a/Bundle/WidgetBundle/Cache/WidgetCache.php b/Bundle/WidgetBundle/Cache/WidgetCache.php index 8a1c8eb9d..d4ee7703f 100644 --- a/Bundle/WidgetBundle/Cache/WidgetCache.php +++ b/Bundle/WidgetBundle/Cache/WidgetCache.php @@ -106,7 +106,8 @@ protected function getHash(Widget $widget) protected function generateBusinessEntityHash(Widget $widget) { - return sprintf('%s--%s-%s-%s', + return sprintf( + '%s--%s-%s-%s', $widget->generateCacheId(), $widget->getEntity()->getId(), $widget->getEntity()->getUpdatedAt()->getTimestamp(), @@ -121,7 +122,8 @@ private function generateHash(Widget $widget) $roleHash .= $this->authorizationChecker->isGranted($role) ? $role : ''; }, ['ROLE_VICTOIRE_DEVELOPER', 'ROLE_VICTOIRE', 'ROLE_VICTOIRE_BLOG', 'ROLE_VICTOIRE_LEFTNAVBAR', 'ROLE_VICTOIRE_BET', 'ROLE_VICTOIRE_PAGE_DEBUG', 'ROLE_VICTOIRE_STYLE']); - return sprintf('%s-%s', + return sprintf( + '%s-%s', $widget->generateCacheId(), md5($roleHash) ); diff --git a/Bundle/WidgetBundle/Command/CreateWidgetCommand.php b/Bundle/WidgetBundle/Command/CreateWidgetCommand.php index 2672336a7..c09c313d2 100644 --- a/Bundle/WidgetBundle/Command/CreateWidgetCommand.php +++ b/Bundle/WidgetBundle/Command/CreateWidgetCommand.php @@ -48,7 +48,8 @@ public function configure() new InputOption('cache', '', InputOption::VALUE_NONE, 'Use redis cache to store widgets until next modification'), ]) ->setDescription('Generate a new widget') - ->setHelp(<<<'EOT' + ->setHelp( + <<<'EOT' The victoire:generate:widget command helps you to generate new widgets. By default, the command interacts with the developer to tweak the generation. diff --git a/Bundle/WidgetBundle/Controller/WidgetController.php b/Bundle/WidgetBundle/Controller/WidgetController.php index eba563830..b99617079 100644 --- a/Bundle/WidgetBundle/Controller/WidgetController.php +++ b/Bundle/WidgetBundle/Controller/WidgetController.php @@ -43,7 +43,8 @@ public function showAction(Request $request, Widget $widget, $viewReferenceId) $view = $this->get('victoire_page.page_helper')->findPageByParameters(['id' => $viewReferenceId]); $this->get('victoire_widget_map.builder')->build($view); $this->get('victoire_core.current_view')->setCurrentView($view); - $response = new JsonResponse([ + $response = new JsonResponse( + [ 'html' => $this->get('victoire_widget.widget_renderer')->render($widget, $view), 'update' => 'vic-widget-'.$widget->getId().'-container', 'success' => true, @@ -303,7 +304,8 @@ public function deleteAction(Widget $widget, $viewReference) $widgetId = $widget->getId(); $this->get('widget_manager')->deleteWidget($widget, $view); - return new JsonResponse([ + return new JsonResponse( + [ 'success' => true, 'message' => $this->get('translator')->trans('victoire_widget.delete.success', [], 'victoire'), 'widgetId' => $widgetId, @@ -336,7 +338,8 @@ public function deleteBulkAction(Widget $widget, $viewReference) $this->get('widget_manager')->deleteWidget($widget, $view); } - return new JsonResponse([ + return new JsonResponse( + [ 'success' => true, 'message' => $this->get('translator')->trans('victoire_widget.delete.success', [], 'victoire'), ] @@ -375,14 +378,14 @@ public function unlinkAction($id, $viewReference) ->getOneReferenceByParameters(['viewId' => $view->getId()]); $redirect = $this->generateUrl('victoire_core_page_show', [ - 'url' => $viewReference->getUrl(), - ]); + 'url' => $viewReference->getUrl(), + ]); } return new JsonResponse([ - 'success' => true, - 'redirect' => $redirect, - ]); + 'success' => true, + 'redirect' => $redirect, + ]); } catch (Exception $ex) { return $this->getJsonReponseFromException($ex); } diff --git a/Bundle/WidgetBundle/DependencyInjection/Compiler/WidgetItemPass.php b/Bundle/WidgetBundle/DependencyInjection/Compiler/WidgetItemPass.php index d742a38e2..b259dc702 100644 --- a/Bundle/WidgetBundle/DependencyInjection/Compiler/WidgetItemPass.php +++ b/Bundle/WidgetBundle/DependencyInjection/Compiler/WidgetItemPass.php @@ -27,7 +27,8 @@ public function process(ContainerBuilder $container) foreach ($taggedServices as $id => $attributes) { foreach ($attributes as $attribute) { $definition->addMethodCall( - 'addWidgetItem', [new Reference($id)] + 'addWidgetItem', + [new Reference($id)] ); } } diff --git a/Bundle/WidgetBundle/Resolver/Chain/WidgetItemChain.php b/Bundle/WidgetBundle/Resolver/Chain/WidgetItemChain.php index c9549e9af..62206eaac 100644 --- a/Bundle/WidgetBundle/Resolver/Chain/WidgetItemChain.php +++ b/Bundle/WidgetBundle/Resolver/Chain/WidgetItemChain.php @@ -24,7 +24,7 @@ public function addWidgetItem(WidgetItemInterface $widgetItem) $newWidgetItem = [ 'class' => $classname, 'name' => $name, - ]; + ]; $this->widgetItems[$name] = $newWidgetItem; } diff --git a/Bundle/WidgetBundle/Twig/LinkExtension.php b/Bundle/WidgetBundle/Twig/LinkExtension.php index 73df1f2d5..e3482d5a9 100644 --- a/Bundle/WidgetBundle/Twig/LinkExtension.php +++ b/Bundle/WidgetBundle/Twig/LinkExtension.php @@ -135,9 +135,9 @@ public function victoireLinkUrl($parameters, $avoidRefresh = true, $url = '#') $linkUrl = $this->router->generate( 'victoire_core_page_show', array_merge([ - '_locale' => $parameters['locale'], - 'url' => $page->getSlug(), - ], $params) + '_locale' => $parameters['locale'], + 'url' => $page->getSlug(), + ], $params) ); } } diff --git a/Bundle/WidgetMapBundle/Command/WidgetMapOverwriteValidationCommand.php b/Bundle/WidgetMapBundle/Command/WidgetMapOverwriteValidationCommand.php index 810e7968e..9d076dce8 100644 --- a/Bundle/WidgetMapBundle/Command/WidgetMapOverwriteValidationCommand.php +++ b/Bundle/WidgetMapBundle/Command/WidgetMapOverwriteValidationCommand.php @@ -7,7 +7,6 @@ use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Victoire\Bundle\CoreBundle\Entity\View; use Victoire\Bundle\WidgetMapBundle\Entity\WidgetMap; class WidgetMapOverwriteValidationCommand extends ContainerAwareCommand diff --git a/Bundle/WidgetMapBundle/Warmer/AssociatedEntityToWarm.php b/Bundle/WidgetMapBundle/Warmer/AssociatedEntityToWarm.php index 6a36c287b..bee2905e8 100644 --- a/Bundle/WidgetMapBundle/Warmer/AssociatedEntityToWarm.php +++ b/Bundle/WidgetMapBundle/Warmer/AssociatedEntityToWarm.php @@ -27,7 +27,8 @@ public function __construct( $inheritorEntity = null, $inheritorPropertyName = null, $entityId = null, - $mappedBy = null) + $mappedBy = null + ) { $this->type = $type; $this->inheritorEntity = $inheritorEntity; diff --git a/Tests/App/src/Acme/AppBundle/Controller/JediController.php b/Tests/App/src/Acme/AppBundle/Controller/JediController.php index 464960fb0..4e033691c 100644 --- a/Tests/App/src/Acme/AppBundle/Controller/JediController.php +++ b/Tests/App/src/Acme/AppBundle/Controller/JediController.php @@ -242,8 +242,8 @@ public function deleteAction(Request $request, $id) private function createDeleteForm($id) { return $this->createFormBuilder(null, [ - 'translation_domain' => 'victoire', - ]) + 'translation_domain' => 'victoire', + ]) ->setAction($this->generateUrl('acme_app_jedi_delete', ['id' => $id])) ->setMethod('DELETE') ->add('submit', SubmitType::class, ['label' => 'acme.app.jedi.form.button.delete']) diff --git a/Tests/App/src/Acme/AppBundle/DataFixtures/Seeds/ORM/LoadFixtureData.php b/Tests/App/src/Acme/AppBundle/DataFixtures/Seeds/ORM/LoadFixtureData.php index 2a8fd39b5..674928adc 100644 --- a/Tests/App/src/Acme/AppBundle/DataFixtures/Seeds/ORM/LoadFixtureData.php +++ b/Tests/App/src/Acme/AppBundle/DataFixtures/Seeds/ORM/LoadFixtureData.php @@ -38,7 +38,7 @@ public function load(ObjectManager $manager) 'locale' => 'fr_FR', 'persist_once' => false, ] - ); + ); $manager->flush(); } @@ -51,9 +51,9 @@ public function load(ObjectManager $manager) public function gender() { $genders = [ - 'male', - 'female', - ]; + 'male', + 'female', + ]; return $genders[array_rand($genders)]; } diff --git a/Tests/App/src/Acme/AppBundle/Form/Type/JediType.php b/Tests/App/src/Acme/AppBundle/Form/Type/JediType.php index 3cdeb84c1..ad70b626f 100644 --- a/Tests/App/src/Acme/AppBundle/Form/Type/JediType.php +++ b/Tests/App/src/Acme/AppBundle/Form/Type/JediType.php @@ -17,29 +17,29 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('name', null, [ - 'label' => 'acme.app.jedi.form.name.label', - ]) + 'label' => 'acme.app.jedi.form.name.label', + ]) ->add('midiChlorians', null, [ - 'label' => 'acme.app.jedi.form.midiChlorians.label', - ]) + 'label' => 'acme.app.jedi.form.midiChlorians.label', + ]) ->add('side', ChoiceType::class, [ - 'label' => 'acme.app.jedi.form.side.label', - 'choices_as_values' => true, - 'choices' => [ - 'acme.app.jedi.form.side.choice.both' => 'both', - 'acme.app.jedi.form.side.choice.dark' => 'dark', - 'acme.app.jedi.form.side.choice.bright' => 'bright', - ], + 'label' => 'acme.app.jedi.form.side.label', + 'choices_as_values' => true, + 'choices' => [ + 'acme.app.jedi.form.side.choice.both' => 'both', + 'acme.app.jedi.form.side.choice.dark' => 'dark', + 'acme.app.jedi.form.side.choice.bright' => 'bright', + ], ]) ->add('slug', null, [ - 'label' => 'acme.app.jedi.form.slug.label', - ]) + 'label' => 'acme.app.jedi.form.slug.label', + ]) ->add('createdAt', null, [ - 'label' => 'acme.app.jedi.form.createdAt.label', - ]) + 'label' => 'acme.app.jedi.form.createdAt.label', + ]) ->add('updatedAt', null, [ - 'label' => 'acme.app.jedi.form.updatedAt.label', - ]) + 'label' => 'acme.app.jedi.form.updatedAt.label', + ]) ->remove('proxy') ->remove('visibleOnFront'); } @@ -52,9 +52,9 @@ public function configureOptions(OptionsResolver $resolver) parent::configureOptions($resolver); $resolver->setDefaults([ - 'data_class' => 'Acme\AppBundle\Entity\Jedi', - 'widget' => 'Force', - 'translation_domain' => 'victoire', - ]); + 'data_class' => 'Acme\AppBundle\Entity\Jedi', + 'widget' => 'Force', + 'translation_domain' => 'victoire', + ]); } } diff --git a/Tests/App/src/Acme/AppBundle/Listener/HamburgerMenuListener.php b/Tests/App/src/Acme/AppBundle/Listener/HamburgerMenuListener.php index 2f30ee2bf..677d508ca 100644 --- a/Tests/App/src/Acme/AppBundle/Listener/HamburgerMenuListener.php +++ b/Tests/App/src/Acme/AppBundle/Listener/HamburgerMenuListener.php @@ -36,7 +36,9 @@ public function addGlobal(Event $event) { $this->mainItem = $this->menuBuilder->getTopNavbar(); - $this->mainItem->addChild('hamburger_menu.jedi', [ + $this->mainItem->addChild( + 'hamburger_menu.jedi', + [ 'route' => 'acme_app_jedi_index', 'attributes' => [ 'class' => 'v-menu__item', @@ -47,7 +49,9 @@ public function addGlobal(Event $event) ] ); - $this->mainItem->addChild('hamburger_menu.spaceship', [ + $this->mainItem->addChild( + 'hamburger_menu.spaceship', + [ 'route' => 'acme_app_spaceship_index', ] ); diff --git a/Tests/App/src/Victoire/Widget/LightSaberBundle/Form/WidgetLightSaberType.php b/Tests/App/src/Victoire/Widget/LightSaberBundle/Form/WidgetLightSaberType.php index e75f206d8..c985b609b 100644 --- a/Tests/App/src/Victoire/Widget/LightSaberBundle/Form/WidgetLightSaberType.php +++ b/Tests/App/src/Victoire/Widget/LightSaberBundle/Form/WidgetLightSaberType.php @@ -21,11 +21,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('length', null, [ - 'label' => 'widget_lightsaber.form.length.label', + 'label' => 'widget_lightsaber.form.length.label', ])->add('crystal', null, [ - 'label' => 'widget_lightsaber.form.crystal.label', + 'label' => 'widget_lightsaber.form.crystal.label', ])->add('color', null, [ - 'label' => 'widget_lightsaber.form.color.label', + 'label' => 'widget_lightsaber.form.color.label', ]); parent::buildForm($builder, $options); } diff --git a/Tests/App/src/Victoire/Widget/TextBundle/Form/WidgetTextType.php b/Tests/App/src/Victoire/Widget/TextBundle/Form/WidgetTextType.php index 24fd2340b..57bdaa6e8 100644 --- a/Tests/App/src/Victoire/Widget/TextBundle/Form/WidgetTextType.php +++ b/Tests/App/src/Victoire/Widget/TextBundle/Form/WidgetTextType.php @@ -23,13 +23,19 @@ public function buildForm(FormBuilderInterface $builder, array $options) parent::buildForm($builder, $options); if ($options['mode'] == Widget::MODE_STATIC || $options['mode'] === null) { - $builder->add('content', null, [ + $builder->add( + 'content', + null, + [ 'label' => 'widget_text.form.content.label', 'required' => true, ] ); } else { - $builder->add('excerpt', null, [ + $builder->add( + 'excerpt', + null, + [ 'label' => 'widget_text.form.excerpt.label', 'attr' => [ 'placeholder' => 'widget_text.form.excerpt.placeholder', diff --git a/Tests/Features/Context/FeatureContext.php b/Tests/Features/Context/FeatureContext.php index 4b5da69d9..c429deb57 100644 --- a/Tests/Features/Context/FeatureContext.php +++ b/Tests/Features/Context/FeatureContext.php @@ -35,7 +35,8 @@ public function getSymfonyProfile() throw new UnsupportedDriverActionException( 'You need to tag the scenario with '. '"@mink:symfony2". Using the profiler is not '. - 'supported by %s', $driver + 'supported by %s', + $driver ); } @@ -111,7 +112,8 @@ public function theMetaShouldBeSet($name, $value) if (!preg_match($regex, $actual)) { $message = sprintf( 'The text "%s" was not found in the content attribute of the meta[name=%s]".', - $value, $name + $value, + $name ); throw new ExpectationException($message, $this->getSession()); diff --git a/Tests/Features/Context/VictoireContext.php b/Tests/Features/Context/VictoireContext.php index 5f25f81b9..faff35795 100644 --- a/Tests/Features/Context/VictoireContext.php +++ b/Tests/Features/Context/VictoireContext.php @@ -519,7 +519,8 @@ public function shouldPrecedeForTheQuery($textBefore, $textAfter) { $element = $this->getPage()->find( 'xpath', - sprintf('//*[normalize-space(text()) = "%s"][preceding::*[normalize-space(text()) = "%s"]]', + sprintf( + '//*[normalize-space(text()) = "%s"][preceding::*[normalize-space(text()) = "%s"]]', $textAfter, $textBefore ) @@ -783,14 +784,17 @@ public function iShouldSeeListWithElements($listId, $number) { $page = $this->getPage(); - $nodes = $page->findAll('xpath', - sprintf('descendant-or-self::ul[contains(@id, "%s")]//li', + $nodes = $page->findAll( + 'xpath', + sprintf( + 'descendant-or-self::ul[contains(@id, "%s")]//li', $listId ) ); if (count($nodes) != $number) { - $message = sprintf('There is %d element(s) corresponding to "%s", %d expected.', + $message = sprintf( + 'There is %d element(s) corresponding to "%s", %d expected.', count($nodes), $listId, $number