@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function insert($item, $priority) |
26 | 26 | { |
27 | - $this->items[]= array($priority, $item); |
|
27 | + $this->items[] = array($priority, $item); |
|
28 | 28 | |
29 | 29 | $this->sort(); |
30 | 30 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | usort( |
41 | 41 | $this->items, |
42 | - function ($a, $b) { |
|
42 | + function($a, $b) { |
|
43 | 43 | return $a[0] > $b[0] ? 1 : $a[0] === $b[0] ? 0 : -1; |
44 | 44 | } |
45 | 45 | ); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | return new \ArrayIterator( |
54 | 54 | array_map( |
55 | - function ($item) { |
|
55 | + function($item) { |
|
56 | 56 | return $item[1]; |
57 | 57 | }, |
58 | 58 | $this->items |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $allMessages = $this->getTranslationsForLocale($locale); |
97 | 97 | |
98 | 98 | if (!array_key_exists($domain, $allMessages)) { |
99 | - throw new \Exception('Domain ' . $domain . ' not found in the translations for locale ' . $locale); |
|
99 | + throw new \Exception('Domain '.$domain.' not found in the translations for locale '.$locale); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return $allMessages[$domain]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ->addOption( |
37 | 37 | 'group', |
38 | 38 | 'g', |
39 | - InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
|
39 | + InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, |
|
40 | 40 | "Optional validation group(s)" |
41 | 41 | ); |
42 | 42 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $violations = $this->getContainer()->get('validator')->validate($entity, $groups ? $groups : null); |
57 | 57 | |
58 | 58 | if (count($violations)) { |
59 | - $output->writeln(get_class($entity) . "::" . $entity->getId()); |
|
59 | + $output->writeln(get_class($entity)."::".$entity->getId()); |
|
60 | 60 | foreach ($violations as $error) { |
61 | 61 | $output->writeln(" -> {$error}"); |
62 | 62 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ->getMetadataFactory() |
80 | 80 | ->getAllMetadata(); |
81 | 81 | |
82 | - $isAcceptable = function ($meta) { |
|
82 | + $isAcceptable = function($meta) { |
|
83 | 83 | return !$meta->isMappedSuperclass && empty($meta->subClasses); |
84 | 84 | }; |
85 | 85 |
@@ -163,13 +163,13 @@ |
||
163 | 163 | $mutex = new Mutex($mutexFile, false); |
164 | 164 | $isLockAcquired = false; |
165 | 165 | $mutex->run( |
166 | - function () use ($self, $input, $output, &$result) { |
|
166 | + function() use ($self, $input, $output, &$result) { |
|
167 | 167 | return $self->doParentRun($input, $output); |
168 | 168 | }, |
169 | 169 | $isLockAcquired |
170 | 170 | ); |
171 | 171 | if (!$isLockAcquired && $this->logger) { |
172 | - $this->logger->addWarning("Mutex failed in " . get_class($this) . ", job was not run"); |
|
172 | + $this->logger->addWarning("Mutex failed in ".get_class($this).", job was not run"); |
|
173 | 173 | } |
174 | 174 | } else { |
175 | 175 | $result = $this->doParentRun($input, $output); |
@@ -37,8 +37,8 @@ |
||
37 | 37 | ->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Do a dry run, i.e. only report the problems without doing any changes') |
38 | 38 | ->addArgument('entity', InputArgument::REQUIRED, 'The entity to be repaired, must be of nested tree set. E.g. ZichtMenuBundle:MenuItem') |
39 | 39 | ->setHelp( |
40 | - 'This command will try to repair broken nested set.' . PHP_EOL . |
|
41 | - 'Pass --dry-run to see if the nested set is broken (use --verbose to see which items are broken)' . PHP_EOL |
|
40 | + 'This command will try to repair broken nested set.'.PHP_EOL. |
|
41 | + 'Pass --dry-run to see if the nested set is broken (use --verbose to see which items are broken)'.PHP_EOL |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 |
@@ -45,11 +45,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -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); |
@@ -280,7 +280,7 @@ |
||
280 | 280 | $viewVars['messages'] = []; |
281 | 281 | if ($request->hasPreviousSession() && ($messages = $this->container->get('session')->getFlashBag()->get($formId))) { |
282 | 282 | foreach ($messages as $value) { |
283 | - $viewVars['messages'][] = $prefix . $value; |
|
283 | + $viewVars['messages'][] = $prefix.$value; |
|
284 | 284 | } |
285 | 285 | } |
286 | 286 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $this->setAnnotation($annotation['key'], $new_annotation); |
47 | 47 | } |
48 | 48 | } else { |
49 | - $this->annotations[]= $new_annotation; |
|
49 | + $this->annotations[] = $new_annotation; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 |