| @@ -19,6 +19,6 @@ | ||
| 19 | 19 | |
| 20 | 20 | public function registerContainerConfiguration(LoaderInterface $loader) | 
| 21 | 21 |      { | 
| 22 | - $loader->load(__DIR__.'/../config/config.yml'); | |
| 22 | + $loader->load(__DIR__ . '/../config/config.yml'); | |
| 23 | 23 | } | 
| 24 | 24 | } | 
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 3 | $_SERVER['env'] = 'test'; | 
| 4 | 4 | use Doctrine\Common\Annotations\AnnotationRegistry; | 
| 5 | -if (!is_file($loaderFile = __DIR__.'/../vendor/autoload.php')) { | |
| 5 | +if (!is_file($loaderFile = __DIR__ . '/../vendor/autoload.php')) { | |
| 6 | 6 |      throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); | 
| 7 | 7 | } | 
| 8 | 8 | $loader = require $loaderFile; | 
| @@ -111,7 +111,7 @@ | ||
| 111 | 111 |      { | 
| 112 | 112 | $item = new Item(); | 
| 113 | 113 | $item->setMenu($menu); | 
| 114 | -        $item->setName('Item '.$i); | |
| 114 | +        $item->setName('Item ' . $i); | |
| 115 | 115 | $item->setPosition($i); | 
| 116 | 116 |          $item->setUri('http://alpixel.fr'); | 
| 117 | 117 | |
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | $configuration = new Configuration(); | 
| 28 | 28 | $this->processConfiguration($configuration, $configs); | 
| 29 | 29 | |
| 30 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
| 30 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); | |
| 31 | 31 |          $loader->load('services.yml'); | 
| 32 | 32 | |
| 33 | 33 |          $menuBuilder = $container->getDefinition('alpixel_menu.builder'); | 
| @@ -146,8 +146,8 @@ discard block | ||
| 146 | 146 |          $this->setKnpMenu($this->factory->createItem('root')); | 
| 147 | 147 | |
| 148 | 148 | $menu = $this->entityManager | 
| 149 | -                     ->getRepository('AlpixelMenuBundle:Menu') | |
| 150 | - ->findOneMenuByMachineNameAndLocale($machineName, $locale); | |
| 149 | +                        ->getRepository('AlpixelMenuBundle:Menu') | |
| 150 | + ->findOneMenuByMachineNameAndLocale($machineName, $locale); | |
| 151 | 151 | |
| 152 | 152 | $items = $menu->getItems()->toArray(); | 
| 153 | 153 | |
| @@ -176,8 +176,8 @@ discard block | ||
| 176 | 176 |          if (($uri = $item->getUri()) !== null) { | 
| 177 | 177 |              if($uri[0] == '/') { | 
| 178 | 178 | $baseUri = $this->request->getBasePath(). | 
| 179 | - $this->request->getBaseURL(). | |
| 180 | - $uri; | |
| 179 | + $this->request->getBaseURL(). | |
| 180 | + $uri; | |
| 181 | 181 | $uri = $this->request->getSchemeAndHttpHost().$baseUri; | 
| 182 | 182 | |
| 183 | 183 |                  if ($baseUri === $this->currentUri) { | 
| @@ -175,10 +175,10 @@ | ||
| 175 | 175 | |
| 176 | 176 |          if (($uri = $item->getUri()) !== null) { | 
| 177 | 177 |              if ($uri[0] == '/') { | 
| 178 | - $baseUri = $this->request->getBasePath(). | |
| 179 | - $this->request->getBaseURL(). | |
| 178 | + $baseUri = $this->request->getBasePath() . | |
| 179 | + $this->request->getBaseURL() . | |
| 180 | 180 | $uri; | 
| 181 | - $uri = $this->request->getSchemeAndHttpHost().$baseUri; | |
| 181 | + $uri = $this->request->getSchemeAndHttpHost() . $baseUri; | |
| 182 | 182 | |
| 183 | 183 |                  if ($baseUri === $this->currentUri) { | 
| 184 | 184 | $menuItem->setCurrent(true); | 
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | public function createQuery($context = 'list') | 
| 13 | 13 |      { | 
| 14 | 14 | $query = parent::createQuery($context); | 
| 15 | - $query->addOrderBy($query->getRootAlias().'.locale', 'ASC'); | |
| 15 | + $query->addOrderBy($query->getRootAlias() . '.locale', 'ASC'); | |
| 16 | 16 | |
| 17 | 17 | return $query; | 
| 18 | 18 | } | 
| @@ -20,7 +20,7 @@ discard block | ||
| 20 | 20 | protected function configureRoutes(RouteCollection $collection) | 
| 21 | 21 |      { | 
| 22 | 22 | $collection->clearExcept(['list']); | 
| 23 | -        $collection->add('item', $this->getRouterIdParameter().'/item'); | |
| 23 | +        $collection->add('item', $this->getRouterIdParameter() . '/item'); | |
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | 26 | protected function configureFormFields(FormMapper $formMapper) | 
| @@ -20,8 +20,8 @@ | ||
| 20 | 20 | $match = false; | 
| 21 | 21 |          if (strpos($value, '/') === 0) { | 
| 22 | 22 | $context = $this->router->getContext(); | 
| 23 | - $baseUrl = $context->getScheme().'://'.$context->getHost().$context->getBaseUrl(); | |
| 24 | - $value = $baseUrl.$value; | |
| 23 | + $baseUrl = $context->getScheme() . '://' . $context->getHost() . $context->getBaseUrl(); | |
| 24 | + $value = $baseUrl . $value; | |
| 25 | 25 | } | 
| 26 | 26 | |
| 27 | 27 | $handle = curl_init($value); | 
| @@ -26,7 +26,7 @@ | ||
| 26 | 26 | |
| 27 | 27 |          if ($env === 'dev' && strpos($link, 'http') === false) { | 
| 28 | 28 | $dev = ($link[0] === '/') ? 'app_dev.php' : 'app_dev.php/'; | 
| 29 | - $link = $dev.$link; | |
| 29 | + $link = $dev . $link; | |
| 30 | 30 | } | 
| 31 | 31 | |
| 32 | 32 | return $link; | 
| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 | |
| 26 | 26 | protected function configureRoutes(RouteCollection $collection) | 
| 27 | 27 |      { | 
| 28 | -        $collection->add('move', $this->getRouterIdParameter().'/move/{position}'); | |
| 28 | +        $collection->add('move', $this->getRouterIdParameter() . '/move/{position}'); | |
| 29 | 29 | } | 
| 30 | 30 | |
| 31 | 31 | public function getPersistentParameters() | 
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 |      { | 
| 44 | 44 |          $id = $this->getRequest()->query->getInt('menu'); | 
| 45 | 45 | $query = parent::createQuery($context); | 
| 46 | - $query->join($query->getRootAlias().'.menu', 'm') | |
| 46 | + $query->join($query->getRootAlias() . '.menu', 'm') | |
| 47 | 47 |              ->where('m.id = :id') | 
| 48 | 48 | ->setParameters([ | 
| 49 | 49 | 'id' => $id, | 
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | 'label' => 'Menu', | 
| 64 | 64 | 'required' => true, | 
| 65 | 65 | 'property' => 'name', | 
| 66 | -                    'query_builder' => function (EntityRepository $entityRepository) use ($id) { | |
| 66 | +                    'query_builder' => function(EntityRepository $entityRepository) use ($id) { | |
| 67 | 67 |                          $query = $entityRepository->createQuerybuilder('m'); | 
| 68 | 68 |                          if ($id == null) { | 
| 69 | 69 | return $query; | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | 'label' => 'Menu', | 
| 82 | 82 | 'required' => true, | 
| 83 | 83 | 'property' => 'name', | 
| 84 | -                'query_builder' => function (EntityRepository $entityRepository) use ($id) { | |
| 84 | +                'query_builder' => function(EntityRepository $entityRepository) use ($id) { | |
| 85 | 85 |                      $query = $entityRepository->createQuerybuilder('m'); | 
| 86 | 86 |                      if ($id == null) { | 
| 87 | 87 | return $query; |