Test Failed
Push — release/5.x ( ef9d9c...57cc92 )
by
unknown
01:37
created
src/Zicht/Bundle/FrameworkExtraBundle/Command/ListUserImagesCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
         $fields = [];
46 46
 
47 47
         foreach ($userFields as $fieldName) {
48
-            $fields[$fieldName] = 'p.' . trim($fieldName);
48
+            $fields[$fieldName] = 'p.'.trim($fieldName);
49 49
         }
50 50
 
51 51
         if ('' !== $input->getOption('concat')) {
52
-            $fields['custom'] = $input->getOption('concat') . ' as custom';
52
+            $fields['custom'] = $input->getOption('concat').' as custom';
53 53
         }
54 54
 
55 55
         $dql = sprintf('SELECT p.id, %s FROM %s p', implode(', ', $fields), $input->getArgument('entity'));
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             foreach (array_keys($fields) as $field) {
67 67
                 if (preg_match_all('/\<img.*src=\"\/media(.*?)\".*\>/', $record[$field], $matches)) {
68 68
                     foreach ($matches[1] as $image) {
69
-                        $imagePath = './web/media' . $image;
69
+                        $imagePath = './web/media'.$image;
70 70
                         if (file_exists($imagePath)) {
71 71
                             $fileSize = filesize($imagePath);
72 72
                             $arr = [
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
                             $list[$fileSize][] = $arr;
83 83
                         } else {
84
-                            $output->writeln('File not found ' . $image);
84
+                            $output->writeln('File not found '.$image);
85 85
                         }
86 86
                     }
87 87
                 }
@@ -110,6 +110,6 @@  discard block
 block discarded – undo
110 110
         $sz = 'BKMGTP';
111 111
         $factor = (int)floor((strlen($bytes) - 1) / 3);
112 112
 
113
-        return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
113
+        return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)).@$sz[$factor];
114 114
     }
115 115
 }
Please login to merge, or discard this patch.
FrameworkExtraBundle/DependencyInjection/ZichtFrameworkExtraExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Fixture/Builder.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Form/ParentChoiceType.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Doctrine/DoctrineQueryPager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Twig/Meta/AnnotateTokenParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Twig/Meta/AnnotateNode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
40 40
             $compiler->subcompile($prio);
41 41
         }
42 42
 
43
-        $compiler->write(');' . "\n");
43
+        $compiler->write(');'."\n");
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Twig/UglifyGlobal.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Zicht/Bundle/FrameworkExtraBundle/Twig/ControlStructures/WithNode.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.