@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->setDescription("Creates aliases for all pages") |
27 | 27 | ->setName('zicht:page:alias') |
28 | 28 | ->addArgument('entity', InputArgument::OPTIONAL, 'Only do a specific entity') |
29 | - ->addOption('where', 'w', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Add a WHERE query') |
|
29 | + ->addOption('where', 'w', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Add a WHERE query') |
|
30 | 30 | ->addOption('move', '', InputOption::VALUE_NONE, 'Force regeneration (use MOVE strategy for new aliases)'); |
31 | 31 | } |
32 | 32 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | $result = $aliaser->createAlias($page); |
75 | 75 | if ($output->getVerbosity() > OutputInterface::VERBOSITY_VERBOSE) { |
76 | - $output->writeln(" -> " . ($result ? '[created]' : '[already aliased]')); |
|
76 | + $output->writeln(" -> ".($result ? '[created]' : '[already aliased]')); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | $progress->finish(); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | if ($container->hasParameter('twig.form.resources')) { |
73 | 73 | $formResources = $container->getParameter('twig.form.resources'); |
74 | - $formResources[]= 'ZichtPageBundle::form_theme.html.twig'; |
|
74 | + $formResources[] = 'ZichtPageBundle::form_theme.html.twig'; |
|
75 | 75 | $container->setParameter('twig.form.resources', $formResources); |
76 | 76 | } |
77 | 77 | } |
@@ -176,14 +176,14 @@ |
||
176 | 176 | 'edit' => 'inline', |
177 | 177 | 'inline' => 'table', |
178 | 178 | 'sortable' => 'weight', |
179 | - 'admin_code' => $this->code . '|' . $this->contentItemAdminCode |
|
179 | + 'admin_code' => $this->code.'|'.$this->contentItemAdminCode |
|
180 | 180 | ) |
181 | 181 | ) |
182 | 182 | ->end()->end(); |
183 | 183 | |
184 | 184 | $formMapper->getFormBuilder()->addEventListener( |
185 | 185 | FormEvents::SUBMIT, |
186 | - function (FormEvent $e) { |
|
186 | + function(FormEvent $e) { |
|
187 | 187 | /** @var PageInterface $pageData */ |
188 | 188 | $pageData = $e->getData(); |
189 | 189 |
@@ -80,7 +80,7 @@ |
||
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) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $from = $object->isScheduledFrom(); |
33 | 33 | $till = $object->isScheduledTill(); |
34 | 34 | |
35 | - if (!$object->isPublic() || false === self::notEmpty($from, $till)) { |
|
35 | + if (!$object->isPublic() || false === self::notEmpty($from, $till)) { |
|
36 | 36 | return $vote; |
37 | 37 | } |
38 | 38 |
@@ -102,12 +102,12 @@ |
||
102 | 102 | { |
103 | 103 | if (array_key_exists($region, $this->matrix)) { |
104 | 104 | array_walk( |
105 | - $this->matrix[ $region ], |
|
106 | - function ($value, $idx, $matrix) use ($type, $region) { |
|
105 | + $this->matrix[$region], |
|
106 | + function($value, $idx, $matrix) use ($type, $region) { |
|
107 | 107 | $class = explode('\\', $value); |
108 | 108 | $className = array_pop($class); |
109 | 109 | if ($className === $type) { |
110 | - unset($matrix[ $region ][ $idx ]); |
|
110 | + unset($matrix[$region][$idx]); |
|
111 | 111 | } |
112 | 112 | }, |
113 | 113 | $this->matrix |
@@ -24,7 +24,7 @@ discard block |
||
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; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | foreach ($reflectionFrom->getProperties() as $property) { |
46 | 46 | $property->setAccessible(true); |
47 | - $method = 'set' . ucfirst($property->getName()); |
|
47 | + $method = 'set'.ucfirst($property->getName()); |
|
48 | 48 | if ($reflectionTo->hasMethod($method)) { |
49 | 49 | $to->$method($property->getValue($from)); |
50 | 50 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | if ($options['container']) { |
60 | 60 | $page = $options['container']; |
61 | - $choiceFilter = function ($choices) use ($page) { |
|
61 | + $choiceFilter = function($choices) use ($page) { |
|
62 | 62 | $ret = array(); |
63 | 63 | if ($page instanceof ContentItemContainer && null !== $page->getContentItemMatrix()) { |
64 | 64 | $types = $page->getContentItemMatrix()->getTypes(); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | try { |
108 | 108 | if ($subject->getId() && $subject->getRegion() !== null && $typeAdmin = $this->sonata->getAdminByClass(get_class($subject))) { |
109 | 109 | $view->vars['type'] = Str::humanize($subject->getType()); |
110 | - $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode() . '|' . $typeAdmin->getCode()); |
|
110 | + $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode().'|'.$typeAdmin->getCode()); |
|
111 | 111 | $childAdmin->setRequest($genericAdmin->getRequest()); |
112 | 112 | |
113 | 113 | if ($subject && $subject->getId() && $subject->getPage() && $subject->getPage()->getId()) { |
@@ -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($className))); |
|
49 | + $placeholder = 'content_item.type.'.strtolower(str_replace(' ', '_', Str::humanize($className))); |
|
50 | 50 | $ret[$className] = $placeholder; |
51 | 51 | } |
52 | 52 | if (is_callable($options['choice_filter'])) { |