@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function load(array $configs, ContainerBuilder $container) |
111 | 111 | { |
112 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
112 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
113 | 113 | $loader->load('services.xml'); |
114 | 114 | |
115 | 115 | $loader->load('doctrine.xml'); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | if (!empty($config['uglify'])) { |
122 | 122 | if (!isset($config['uglify_debug'])) { |
123 | - $config['uglify_debug']= $container->getParameter('kernel.debug'); |
|
123 | + $config['uglify_debug'] = $container->getParameter('kernel.debug'); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | $this->addUglifyConfiguration($config['uglify'], $config['uglify_debug'], $container); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | if (!empty($config['requirejs'])) { |
130 | 130 | if (!isset($config['requirejs_debug'])) { |
131 | - $config['requirejs_debug']= $container->getParameter('kernel.debug'); |
|
131 | + $config['requirejs_debug'] = $container->getParameter('kernel.debug'); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $this->addRequirejsConfiguration($config['requirejs'], $config['requirejs_debug'], $container); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function always($do) |
47 | 47 | { |
48 | - $this->alwaysDo[]= $do; |
|
48 | + $this->alwaysDo[] = $do; |
|
49 | 49 | return $this; |
50 | 50 | } |
51 | 51 | |
@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | $this->push($entityInstance); |
78 | 78 | } else { |
79 | 79 | throw new \BadMethodCallException( |
80 | - "No class found for {$entity} in [" . join(", ", $this->namespaces) . "]" |
|
80 | + "No class found for {$entity} in [".join(", ", $this->namespaces)."]" |
|
81 | 81 | . ( |
82 | 82 | $this->current() |
83 | - ? ", nor is it a method in " . get_class($this->current()) |
|
83 | + ? ", nor is it a method in ".get_class($this->current()) |
|
84 | 84 | : "" |
85 | 85 | ) |
86 | 86 | ); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | private function resolve($entity) |
101 | 101 | { |
102 | 102 | foreach ($this->namespaces as $namespace) { |
103 | - $className = $namespace . '\\' . ucfirst($entity); |
|
103 | + $className = $namespace.'\\'.ucfirst($entity); |
|
104 | 104 | if (class_exists($className)) { |
105 | 105 | return $className; |
106 | 106 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | protected function current() |
118 | 118 | { |
119 | 119 | if (count($this->stack)) { |
120 | - return $this->stack[count($this->stack) -1]; |
|
120 | + return $this->stack[count($this->stack) - 1]; |
|
121 | 121 | } |
122 | 122 | return null; |
123 | 123 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | protected function push($entity) |
132 | 132 | { |
133 | - $this->stack[]= $entity; |
|
133 | + $this->stack[] = $entity; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | if (is_null($setter)) { |
159 | 159 | foreach (array('set', 'add') as $methodPrefix) { |
160 | - $methodName = $methodPrefix . $entityLocalName; |
|
160 | + $methodName = $methodPrefix.$entityLocalName; |
|
161 | 161 | |
162 | 162 | if (method_exists($parent, $methodName)) { |
163 | 163 | $setter = $methodName; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | foreach (array_reverse($parentClassNames) as $lParentClassName) { |
175 | 175 | $lParentClass = Str::classname($lParentClassName); |
176 | - $parentSetter = 'set' . $lParentClass; |
|
176 | + $parentSetter = 'set'.$lParentClass; |
|
177 | 177 | if ($lParentClassName == get_class($current)) { |
178 | 178 | $parentSetter = 'setParent'; |
179 | 179 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if ($c == 0) { |
209 | 209 | throw new \UnexpectedValueException("The stack is empty. You should probably peek() before the last end() call."); |
210 | 210 | } |
211 | - $ret = $this->stack[$c -1]; |
|
211 | + $ret = $this->stack[$c - 1]; |
|
212 | 212 | return $ret; |
213 | 213 | } |
214 | 214 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ->setRequired(array('class')) |
47 | 47 | ->setDefaults( |
48 | 48 | array( |
49 | - 'data_class' => function (Options $o) { |
|
49 | + 'data_class' => function(Options $o) { |
|
50 | 50 | return $o->get('class'); |
51 | 51 | }, |
52 | 52 | 'required' => false |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $doctrine = $this->doctrine; |
67 | 67 | |
68 | 68 | // TODO implement a subscriber for this |
69 | - $createParentChoice = function ($parentId) use ($ff, $doctrine, $options) { |
|
69 | + $createParentChoice = function($parentId) use ($ff, $doctrine, $options) { |
|
70 | 70 | $repo = $doctrine->getRepository($options['class']); |
71 | 71 | $choices = array(); |
72 | 72 | if (!$parentId) { |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | $choices[''] = ''; |
75 | 75 | } else { |
76 | 76 | $parent = $repo->find($parentId); |
77 | - $choices[$parentId] = '(' . $parent . ')'; |
|
77 | + $choices[$parentId] = '('.$parent.')'; |
|
78 | 78 | $list = $repo->getChildren($parent, true); |
79 | 79 | } |
80 | 80 | foreach ($list as $item) { |
81 | - $choices[$item->getId()]= (string)$item; |
|
81 | + $choices[$item->getId()] = (string)$item; |
|
82 | 82 | } |
83 | 83 | return $ff->createNamed( |
84 | 84 | 'parent', |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | $builder->addEventListener( |
92 | 92 | FormEvents::PRE_SUBMIT, |
93 | - function ($e) use ($ff, $doctrine, $createParentChoice, $options) { |
|
93 | + function($e) use ($ff, $doctrine, $createParentChoice, $options) { |
|
94 | 94 | $data = $e->getData(); |
95 | 95 | $form = $e->getForm(); |
96 | 96 | $parentId = $data['parent']; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $builder->addEventListener( |
109 | 109 | FormEvents::POST_SET_DATA, |
110 | - function (FormEvent $e) use ($ff, $doctrine, $createParentChoice) { |
|
110 | + function(FormEvent $e) use ($ff, $doctrine, $createParentChoice) { |
|
111 | 111 | $parentId = null; |
112 | 112 | if (null !== $e->getData()) { |
113 | 113 | $selectedItem = $e->getData(); |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | { |
128 | 128 | parent::finishView($view, $form, $options); |
129 | 129 | $parent = $form->getData(); |
130 | - $view->vars['parents']= array(); |
|
130 | + $view->vars['parents'] = array(); |
|
131 | 131 | |
132 | 132 | if ($parent) { |
133 | 133 | if ($parent->getId()) { |
134 | - $view->vars['parents'][]= $parent; |
|
134 | + $view->vars['parents'][] = $parent; |
|
135 | 135 | } |
136 | 136 | while ($parent = $parent->getParent()) { |
137 | 137 | // Circular reference break |
@@ -70,7 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | if (!isset($this->countQuery)) { |
72 | 72 | $c = clone $this->qb; |
73 | - $this->countQuery = $c->select('COUNT(' . $this->alias . ') ' . $this->countAlias)->getQuery(); |
|
73 | + $this->countQuery = $c->select('COUNT('.$this->alias.') '.$this->countAlias)->getQuery(); |
|
74 | 74 | } |
75 | 75 | return $this->countQuery->getSingleScalarResult(); |
76 | 76 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | $first = $this->parser->getExpressionParser()->parseExpression(); |
30 | 30 | |
31 | 31 | if ($stream->test(Twig_Token::BLOCK_END_TYPE)) { |
32 | - $info['expr']= $first; |
|
32 | + $info['expr'] = $first; |
|
33 | 33 | } else { |
34 | - $info['name']= $first; |
|
35 | - $info['expr']= $this->parser->getExpressionParser()->parseExpression(); |
|
34 | + $info['name'] = $first; |
|
35 | + $info['expr'] = $this->parser->getExpressionParser()->parseExpression(); |
|
36 | 36 | if (!$stream->test(Twig_Token::BLOCK_END_TYPE)) { |
37 | - $info['prio']= $this->parser->getExpressionParser()->parseExpression(); |
|
37 | + $info['prio'] = $this->parser->getExpressionParser()->parseExpression(); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | public function compile(Twig_Compiler $compiler) |
24 | 24 | { |
25 | 25 | $has_prio = $this->hasNode('prio'); |
26 | - $prio = ($has_prio) ? $this->getNode('prio') : 0 ; |
|
26 | + $prio = ($has_prio) ? $this->getNode('prio') : 0; |
|
27 | 27 | $compiler->addDebugInfo($this); |
28 | 28 | $compiler->write('$this->env->getExtension(\'zicht_framework_extra\')->getAnnotationRegistry()'); |
29 | 29 | |
@@ -40,6 +40,6 @@ discard block |
||
40 | 40 | $compiler->subcompile($prio); |
41 | 41 | } |
42 | 42 | |
43 | - $compiler->write(');' . "\n"); |
|
43 | + $compiler->write(');'."\n"); |
|
44 | 44 | } |
45 | 45 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function getSourceFile($file) |
46 | 46 | { |
47 | - return ltrim($this->config['src_dir'] . '/' . $file, '/'); |
|
47 | + return ltrim($this->config['src_dir'].'/'.$file, '/'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function getTargetFile($file) |
58 | 58 | { |
59 | - return ltrim($this->config['target_dir'] . '/' . $file, '/'); |
|
59 | + return ltrim($this->config['target_dir'].'/'.$file, '/'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function offsetSet($offset, $value) |
90 | 90 | { |
91 | - throw new \RuntimeException(__CLASS__ . ' is read-only'); |
|
91 | + throw new \RuntimeException(__CLASS__.' is read-only'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function offsetUnset($offset) |
98 | 98 | { |
99 | - throw new \RuntimeException(__CLASS__ . ' is read-only'); |
|
99 | + throw new \RuntimeException(__CLASS__.' is read-only'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -57,19 +57,19 @@ discard block |
||
57 | 57 | { |
58 | 58 | $compiler |
59 | 59 | ->addDebugInfo($this) |
60 | - ->write('if(!isset($withStack)) {' . "\n") |
|
60 | + ->write('if(!isset($withStack)) {'."\n") |
|
61 | 61 | ->indent() |
62 | - ->write('$withStack = array();' . "\n") |
|
62 | + ->write('$withStack = array();'."\n") |
|
63 | 63 | ->outdent() |
64 | - ->write('}' . "\n") |
|
64 | + ->write('}'."\n") |
|
65 | 65 | ->write("\n") |
66 | - ->write('array_push($withStack, $context);' . "\n"); |
|
66 | + ->write('array_push($withStack, $context);'."\n"); |
|
67 | 67 | |
68 | - $compiler->write('$values = array_merge(' . "\n")->indent(); |
|
68 | + $compiler->write('$values = array_merge('."\n")->indent(); |
|
69 | 69 | $i = 0; |
70 | 70 | foreach ($this->getAttribute('items') as $argument) { |
71 | - if ($i ++ > 0) { |
|
72 | - $compiler->raw(',' . "\n"); |
|
71 | + if ($i++ > 0) { |
|
72 | + $compiler->raw(','."\n"); |
|
73 | 73 | } |
74 | 74 | $this->compileArgument($compiler, $argument); |
75 | 75 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | if ($this->hasOption('merged')) { |
91 | - $compiler->write('$values += $context;' . "\n"); |
|
91 | + $compiler->write('$values += $context;'."\n"); |
|
92 | 92 | } else { |
93 | 93 | $compiler->write('$values += array(\'_parent\' => $context);'); |
94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (!$this->hasOption('always')) { |
101 | 101 | $compiler->write('}'); |
102 | 102 | } |
103 | - $compiler->write('$context = array_pop($withStack);' . "\n"); |
|
103 | + $compiler->write('$context = array_pop($withStack);'."\n"); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 |
@@ -27,25 +27,25 @@ |
||
27 | 27 | { |
28 | 28 | $compiler |
29 | 29 | ->addDebugInfo($this) |
30 | - ->write('$restoreStrict = $this->env->isStrictVariables();' . PHP_EOL) |
|
30 | + ->write('$restoreStrict = $this->env->isStrictVariables();'.PHP_EOL) |
|
31 | 31 | ->write('$setStrict = (bool)') |
32 | 32 | ->subcompile($this->nodes['expr']) |
33 | 33 | ->write(';'); |
34 | 34 | |
35 | 35 | $compiler |
36 | - ->write('if ($setStrict) { ' . PHP_EOL) |
|
37 | - ->write(' $this->env->enableStrictVariables();' . PHP_EOL) |
|
38 | - ->write('} else {' . PHP_EOL) |
|
39 | - ->write(' $this->env->disableStrictVariables();' . PHP_EOL) |
|
36 | + ->write('if ($setStrict) { '.PHP_EOL) |
|
37 | + ->write(' $this->env->enableStrictVariables();'.PHP_EOL) |
|
38 | + ->write('} else {'.PHP_EOL) |
|
39 | + ->write(' $this->env->disableStrictVariables();'.PHP_EOL) |
|
40 | 40 | ->write('}'); |
41 | 41 | |
42 | 42 | $compiler->subcompile($this->nodes['body']); |
43 | 43 | |
44 | 44 | $compiler |
45 | - ->write('if ($restoreStrict) { ' . PHP_EOL) |
|
46 | - ->write(' $this->env->enableStrictVariables();' . PHP_EOL) |
|
47 | - ->write('} else {' . PHP_EOL) |
|
48 | - ->write(' $this->env->disableStrictVariables();' . PHP_EOL) |
|
45 | + ->write('if ($restoreStrict) { '.PHP_EOL) |
|
46 | + ->write(' $this->env->enableStrictVariables();'.PHP_EOL) |
|
47 | + ->write('} else {'.PHP_EOL) |
|
48 | + ->write(' $this->env->disableStrictVariables();'.PHP_EOL) |
|
49 | 49 | ->write('}'); |
50 | 50 | } |
51 | 51 | } |