| @@ -52,9 +52,9 @@ discard block | ||
| 52 | 52 |              ->method('getContentItems') | 
| 53 | 53 | ->will( | 
| 54 | 54 | $this->returnCallback( | 
| 55 | -                    function () use (&$recorded, $pageUnderTest, $region) { | |
| 55 | +                    function() use (&$recorded, $pageUnderTest, $region) { | |
| 56 | 56 | $args = func_get_args(); | 
| 57 | - $recorded[]= $args; | |
| 57 | + $recorded[] = $args; | |
| 58 | 58 | $ret = call_user_func_array(array($pageUnderTest, 'getContentItems'), $args); | 
| 59 | 59 | return $ret; | 
| 60 | 60 | } | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 |              ->method('getTemplateName') | 
| 66 | 66 | ->will( | 
| 67 | 67 | $this->returnCallback( | 
| 68 | -                    function () use ($pageUnderTest) { | |
| 68 | +                    function() use ($pageUnderTest) { | |
| 69 | 69 | return $pageUnderTest->getTemplateName(); | 
| 70 | 70 | } | 
| 71 | 71 | ) | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | |
| 78 | 78 | $called = array(); | 
| 79 | 79 |          foreach ($recorded as $calls) { | 
| 80 | - $called[]= $calls[0]; | |
| 80 | + $called[] = $calls[0]; | |
| 81 | 81 | } | 
| 82 | 82 | $this->assertContains($region, $called); | 
| 83 | 83 | } | 
| @@ -100,13 +100,13 @@ discard block | ||
| 100 | 100 | |
| 101 | 101 | /** @var ContentItemMatrix $matrix */ | 
| 102 | 102 |              if (!$matrix) { | 
| 103 | - $ret[]= array($name, $pageClassName); | |
| 103 | + $ret[] = array($name, $pageClassName); | |
| 104 | 104 | continue; | 
| 105 | 105 | } | 
| 106 | 106 | |
| 107 | 107 |              foreach ($matrix->getTypes() as $contentItemClassName) { | 
| 108 | 108 |                  foreach ($matrix->getRegions($contentItemClassName) as $region) { | 
| 109 | - $ret[]= array($name, $pageClassName, $region, $contentItemClassName); | |
| 109 | + $ret[] = array($name, $pageClassName, $region, $contentItemClassName); | |
| 110 | 110 | } | 
| 111 | 111 | } | 
| 112 | 112 | } | 
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 |          if (null !== $idx) { | 
| 39 | 39 | array_splice($beforeOptimizationPasses, $idx, 0, array($generatorPass)); | 
| 40 | 40 |          } else { | 
| 41 | - $beforeOptimizationPasses[]= $generatorPass; | |
| 41 | + $beforeOptimizationPasses[] = $generatorPass; | |
| 42 | 42 | } | 
| 43 | 43 | $container->getCompilerPassConfig()->setBeforeOptimizationPasses($beforeOptimizationPasses); | 
| 44 | 44 | } | 
| @@ -89,7 +89,7 @@ | ||
| 89 | 89 | implode( | 
| 90 | 90 | '", "', | 
| 91 | 91 | array_map( | 
| 92 | -                                            function ($name) use ($matrix) { | |
| 92 | +                                            function($name) use ($matrix) { | |
| 93 | 93 | return $this->getShortName($name, $matrix->getNamespacePrefix()); | 
| 94 | 94 | }, | 
| 95 | 95 | $matrix->getTypes($contentitem->getRegion()) | 
| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | $shortType = Str::infix(lcfirst(Str::classname(Str::rstrip($this->getType(), 'ContentItem'))), $infix); | 
| 25 | 25 | |
| 26 | 26 |          if ($template = $this->getTemplateName()) { | 
| 27 | - $shortType .= $infix . $template; | |
| 27 | + $shortType .= $infix.$template; | |
| 28 | 28 | } | 
| 29 | 29 | |
| 30 | 30 | return $shortType; | 
| @@ -80,11 +80,11 @@ | ||
| 80 | 80 |              ->andWhere('p.title LIKE :pattern') | 
| 81 | 81 | ->setMaxResults(30) | 
| 82 | 82 | ->getQuery() | 
| 83 | -            ->execute(array('pattern' => '%' . $pattern . '%')); | |
| 83 | +            ->execute(array('pattern' => '%'.$pattern.'%')); | |
| 84 | 84 | |
| 85 | 85 | $suggestions = array(); | 
| 86 | 86 |          foreach ($pages as $page) { | 
| 87 | - $suggestions[]= array( | |
| 87 | + $suggestions[] = array( | |
| 88 | 88 | 'value' => $this->url($page), | 
| 89 | 89 | 'label' => $this->getLabel($page) | 
| 90 | 90 | ); | 
| @@ -81,9 +81,9 @@ | ||
| 81 | 81 | return $this->getBundleName($parentClass); | 
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | -            throw new \RuntimeException("Could not determine bundle name for " . $className); | |
| 84 | +            throw new \RuntimeException("Could not determine bundle name for ".$className); | |
| 85 | 85 | } | 
| 86 | - $bundle = $vendor . $bundleName; | |
| 86 | + $bundle = $vendor.$bundleName; | |
| 87 | 87 | return $bundle; | 
| 88 | 88 | } | 
| 89 | 89 | |
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 |          if (array_key_exists($region, $this->matrix)) { | 
| 115 | 115 | array_walk( | 
| 116 | 116 | $this->matrix[$region], | 
| 117 | -                function ($value, $idx, $matrix) use ($type, $region) { | |
| 117 | +                function($value, $idx, $matrix) use ($type, $region) { | |
| 118 | 118 |                      $class = explode('\\', $value); | 
| 119 | 119 | $className = array_pop($class); | 
| 120 | 120 |                      if ($className === $type) { | 
| @@ -137,11 +137,11 @@ discard block | ||
| 137 | 137 | */ | 
| 138 | 138 | public function type($type) | 
| 139 | 139 |      { | 
| 140 | - $className = $this->namespacePrefix . $type; | |
| 140 | + $className = $this->namespacePrefix.$type; | |
| 141 | 141 |          if (!class_exists($className)) { | 
| 142 | 142 |              throw new \InvalidArgumentException("Class {$className} is non-existent or could not be loaded"); | 
| 143 | 143 | } | 
| 144 | - $this->matrix[$this->currentRegion][]= $className; | |
| 144 | + $this->matrix[$this->currentRegion][] = $className; | |
| 145 | 145 | return $this; | 
| 146 | 146 | } | 
| 147 | 147 | |
| @@ -154,7 +154,7 @@ discard block | ||
| 154 | 154 | */ | 
| 155 | 155 | public function ns($namespace) | 
| 156 | 156 |      { | 
| 157 | -        if ('\\' !== $namespace{strlen($namespace) -1}) { | |
| 157 | +        if ('\\' !== $namespace{strlen($namespace) - 1}) { | |
| 158 | 158 | $namespace .= '\\'; | 
| 159 | 159 | } | 
| 160 | 160 | $this->namespacePrefix = $namespace; | 
| @@ -196,7 +196,7 @@ discard block | ||
| 196 | 196 | $ret = array(); | 
| 197 | 197 |          foreach ($this->matrix as $region => $types) { | 
| 198 | 198 |              if (in_array($type, $types)) { | 
| 199 | - $ret[]= $region; | |
| 199 | + $ret[] = $region; | |
| 200 | 200 | } | 
| 201 | 201 | } | 
| 202 | 202 | return $ret; | 
| @@ -67,7 +67,7 @@ | ||
| 67 | 67 |                      $admin->generateObjectUrl('edit', $e->getPage()), | 
| 68 | 68 | sprintf( | 
| 69 | 69 | 'Beheer pagina "%s"', | 
| 70 | - strlen($title) > 20 ? substr($title, 0, 20) . '...' : $title | |
| 70 | + strlen($title) > 20 ? substr($title, 0, 20).'...' : $title | |
| 71 | 71 | ) | 
| 72 | 72 | ) | 
| 73 | 73 | ); | 
| @@ -43,10 +43,10 @@ | ||
| 43 | 43 | /** @var $em \Doctrine\ORM\EntityManager */ | 
| 44 | 44 | $em = $this->doctrine->getManager(); | 
| 45 | 45 | |
| 46 | -        $choiceCallback = function (Options $options) use ($em) { | |
| 46 | +        $choiceCallback = function(Options $options) use ($em) { | |
| 47 | 47 | $ret = array(); | 
| 48 | 48 |              foreach ($em->getClassMetadata($options['entity'])->discriminatorMap as $className) { | 
| 49 | -                $placeholder = 'content_item.type.' . strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); | |
| 49 | +                $placeholder = 'content_item.type.'.strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); | |
| 50 | 50 | $ret[$className] = $placeholder; | 
| 51 | 51 | } | 
| 52 | 52 |              if (is_callable($options['choice_filter'])) { |