Completed
Branch 1.4 (78c96b)
by Axel
22:13
created
Zikula/Bundle/CoreBundle/Tests/Twig/TokenParser/SwitchTokenParserTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
     {
30 30
         $this->tokenParser = new SwitchTokenParser();
31 31
         $this->twigParser = $this->getMockBuilder('Twig_Parser')
32
-                                 ->disableOriginalConstructor()
33
-                                 ->getMock();
32
+                                    ->disableOriginalConstructor()
33
+                                    ->getMock();
34 34
         $this->tokenParser->setParser($this->twigParser);
35 35
     }
36 36
 
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/CoreExtension.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
     {
246 246
         $string = preg_replace_callback(
247 247
             '/(.)@(.)/s',
248
-            function ($m) {
249
-                return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" .sprintf("%03d", ord($m[2])) . ";";
248
+            function($m) {
249
+                return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" . sprintf("%03d", ord($m[2])) . ";";
250 250
             },
251 251
             $string
252 252
         );
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                 // truncate the user name to $maxLength chars
346 346
                 $length = strlen($userDisplayName);
347 347
                 $truncEnd = ($maxLength > $length) ? $length : $maxLength;
348
-                $show  = \DataUtil::formatForDisplay(substr($userDisplayName, 0, $truncEnd));
348
+                $show = \DataUtil::formatForDisplay(substr($userDisplayName, 0, $truncEnd));
349 349
             } else {
350 350
                 $show = \DataUtil::formatForDisplay($userDisplayName);
351 351
             }
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
         }
419 419
 
420 420
         // ensure proper variable types
421
-        $value = (string) $value;
422
-        $type = (string) $type;
423
-        $weight = (int) $weight;
421
+        $value = (string)$value;
422
+        $type = (string)$type;
423
+        $weight = (int)$weight;
424 424
 
425 425
         // @todo remove this code block at Core-2.0 because all themes are twig based
426 426
         $themeBundle = $this->container->get('zikula_core.common.theme_engine')->getTheme();
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
         $result = $this->container->get('zikula_permissions_module.api.permission')->hasPermission($component, $instance, constant($level));
520 520
 
521
-        return (bool) $result;
521
+        return (bool)$result;
522 522
     }
523 523
 
524 524
     /**
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/PagerExtension.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     case 'lang':
138 138
                         $addcurrentlang2url = \System::getVar('languageurl');
139 139
                         if ($addcurrentlang2url == 0) {
140
-                            $pager['args'][$k] =  $v;
140
+                            $pager['args'][$k] = $v;
141 141
                         }
142 142
                         break;
143 143
                     default:
@@ -159,22 +159,22 @@  discard block
 block discarded – undo
159 159
                                     }
160 160
                                 } elseif (strlen($vv)) {
161 161
                                     $tkey = $k . '[' . $kk . ']';
162
-                                    $pager['args'][$tkey] =  $vv;
162
+                                    $pager['args'][$tkey] = $vv;
163 163
                                 }
164 164
                             }
165 165
                         } else {
166 166
                             if (strlen($v)) {
167
-                                $pager['args'][$k] =  $v;
167
+                                $pager['args'][$k] = $v;
168 168
                             }
169 169
                         }
170 170
                 }
171 171
             }
172 172
         }
173 173
 
174
-        $pagerUrl = function ($pager) use ($routeName) {
174
+        $pagerUrl = function($pager) use ($routeName) {
175 175
             if (!$routeName) {
176 176
                 // only case where this should be true is if this is the homepage
177
-                $startargs   = explode(',', \System::getVar('startargs'));
177
+                $startargs = explode(',', \System::getVar('startargs'));
178 178
                 foreach ($startargs as $arg) {
179 179
                     if (!empty($arg)) {
180 180
                         $argument = explode('=', $arg);
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             // predefined abc
372 372
             if (strtolower($params['skin']) == 'hu') {
373 373
                 // Hungarian
374
-                $pager['names']  = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
374
+                $pager['names'] = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
375 375
                 //$params['names']  = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'    ,'V','W','X','Y','Z');
376 376
                 //$params['values'] = array('A,?','B','C','D','E,?','F','G','H','I,?','J','K','L','M','N','O,?,?,O','P','Q','R','S','T','U,?,?,U','V','W','X','Y','Z');
377 377
             } else {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         unset($params['names']);
386 386
         unset($params['values']);
387 387
         unset($params['route']);
388
-        $pagerUrl = function ($pager) {
388
+        $pagerUrl = function($pager) {
389 389
             return $this->container->get('router')->generate($pager['route'], $pager['args']);
390 390
         };
391 391
         $allVars = array_merge($request->request->all(), $request->query->all(), $request->attributes->get('_route_params', []));
@@ -416,38 +416,38 @@  discard block
 block discarded – undo
416 416
         }
417 417
         unset($pager['args'][$pager['posvar']]);
418 418
         // begin to fill the output
419
-        $output = '<ul class="'.$params['class'].'">'."\n";
419
+        $output = '<ul class="' . $params['class'] . '">' . "\n";
420 420
         $style = '';
421 421
         if ($params['printempty']) {
422 422
             $active = '';
423 423
             if (!empty($params['class_numon'])) {
424 424
                 if (!isset($allVars[$pager['posvar']])) {
425
-                    $style = ' class="'.$params['class_numon'].'"';
425
+                    $style = ' class="' . $params['class_numon'] . '"';
426 426
                     $active = 'class="active"';
427 427
                 } elseif (!empty($params['class_num'])) {
428
-                    $style = ' class="'.$params['class_num'].'"';
428
+                    $style = ' class="' . $params['class_num'] . '"';
429 429
                 } else {
430 430
                     $style = '';
431 431
                 }
432 432
             }
433 433
             $vars[$pager['posvar']] = '';
434
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'"> -'."\n</a></li>";
434
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '"> -' . "\n</a></li>";
435 435
         }
436 436
         $style = '';
437 437
         foreach (array_keys($pager['names']) as $i) {
438 438
             $active = '';
439 439
             if (!empty($params['class_numon'])) {
440 440
                 if (isset($allVars[$pager['posvar']]) && $allVars[$pager['posvar']] == $pager['values'][$i]) {
441
-                    $style = ' class="'.$params['class_numon'].'"';
441
+                    $style = ' class="' . $params['class_numon'] . '"';
442 442
                     $active = 'class="active"';
443 443
                 } elseif (!empty($params['class_num'])) {
444
-                    $style = ' class="'.$params['class_num'].'"';
444
+                    $style = ' class="' . $params['class_num'] . '"';
445 445
                 } else {
446 446
                     $style = '';
447 447
                 }
448 448
             }
449 449
             $pager['args'][$pager['posvar']] = $pager['values'][$i];
450
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'">'.$pager['names'][$i]."</a></li>\n";
450
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '">' . $pager['names'][$i] . "</a></li>\n";
451 451
         }
452 452
         $output .= "</ul>\n";
453 453
 
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Console/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $this->kernel = $kernel;
33 33
 
34 34
         $this->setName('Zikula');
35
-        $this->setVersion(\Zikula_Core::VERSION_NUM.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : ''));
35
+        $this->setVersion(\Zikula_Core::VERSION_NUM . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
36 36
     }
37 37
 
38 38
     protected function registerCommands()
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Command/AssetsInstallCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@
 block discarded – undo
87 87
             $output->writeln(sprintf("Installing assets using the <comment>%s</comment> option", $input->getOption('symlink') ? 'symlink' : 'hard copy'));
88 88
             foreach ($bundles as $bundle) {
89 89
                 if (is_dir($originDir = $bundle->getPath() . '/Resources/public')) {
90
-                    $bundlesDir = $targetArg . '/'.$type.'s/';
91
-                    $targetDir = $bundlesDir . preg_replace('/'.$type.'$/', '', strtolower($bundle->getName()));
90
+                    $bundlesDir = $targetArg . '/' . $type . 's/';
91
+                    $targetDir = $bundlesDir . preg_replace('/' . $type . '$/', '', strtolower($bundle->getName()));
92 92
                     $output->writeln(sprintf('Installing assets for <comment>%s</comment> into <comment>%s</comment>', $bundle->getNamespace(), $targetDir));
93 93
                     $filesystem->remove($targetDir);
94 94
                     if ($input->getOption('symlink')) {
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/EventListener/ExceptionListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
         if ($userLoggedIn && \SecurityUtil::checkPermission('ZikulaRoutesModule::', '::', ACCESS_ADMIN)) {
135 135
             try {
136 136
                 $url = $this->router->generate('zikularoutesmodule_route_reload', ['lct' => 'admin'], RouterInterface::ABSOLUTE_URL);
137
-                $link = '<a href="' . $url . '" title="' . __('Re-load the routes') . '">' .  __('re-loading the routes') . '</a>';
137
+                $link = '<a href="' . $url . '" title="' . __('Re-load the routes') . '">' . __('re-loading the routes') . '</a>';
138 138
                 $event->getRequest()->getSession()->getFlashBag()->add('error', __f('You might try %s for the extension in question.', $link));
139 139
             } catch (RouteNotFoundException $e) {
140 140
             }
Please login to merge, or discard this patch.
lib/Zikula/Bundle/CoreBundle/EventListener/StripFrontControllerListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         }
65 65
         $requestUri = $event->getRequest()->getRequestUri();
66 66
         $frontController = $this->variableApi->getSystemVar('entrypoint', 'index.php');
67
-        $stripEntryPoint = (bool) $this->variableApi->getSystemVar('shorturlsstripentrypoint', false);
67
+        $stripEntryPoint = (bool)$this->variableApi->getSystemVar('shorturlsstripentrypoint', false);
68 68
         $containsFrontController = (strpos($requestUri, "$frontController") !== false);
69 69
 
70 70
         if ($containsFrontController && $stripEntryPoint) {
Please login to merge, or discard this patch.
lib/Zikula/Bundle/CoreBundle/EventListener/Doctrine1ConnectorListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 $dbh = null;
113 113
                 if ($connectionInfo['dbdriver'] == 'derby' || $connectionInfo['dbdriver'] == 'splice') {
114 114
                     $class = 'Doctrine_Connection_' . ucwords($connectionInfo['dbdriver']) . '_Pdo';
115
-                    $dbh   = new $class ("odbc:$connectionInfo[dbname]", $connectionInfo['user'], $connectionInfo['password']);
115
+                    $dbh   = new $class("odbc:$connectionInfo[dbname]", $connectionInfo['user'], $connectionInfo['password']);
116 116
                 } elseif ($connectionInfo['dbdriver'] == 'jdbcbridge') {
117 117
                     $dbh = new Doctrine_Adapter_Jdbcbridge($connectionInfo, $connectionInfo['user'], $connectionInfo['password']);
118 118
                 } else {
Please login to merge, or discard this patch.
src/lib/Zikula/Composer/CopyRequirementsFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
     public static function copy(Event $event)
28 28
     {
29 29
         $fs = new Filesystem();
30
-        $fs->copy(__DIR__.'/../../../vendor/sensio/distribution-bundle/Resources/skeleton/app/SymfonyRequirements.php', __DIR__.'/../../../app/SymfonyRequirements.php');
30
+        $fs->copy(__DIR__ . '/../../../vendor/sensio/distribution-bundle/Resources/skeleton/app/SymfonyRequirements.php', __DIR__ . '/../../../app/SymfonyRequirements.php');
31 31
     }
32 32
 }
Please login to merge, or discard this patch.