Completed
Push — master ( bbc096...38d354 )
by Craig
06:03 queued 21s
created
src/system/AdminModule/Controller/AdminInterfaceController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
                     $ldir = dirname(__FILE__);
183 183
                     $p = strpos($ldir, DIRECTORY_SEPARATOR . 'system'); // we are in system/AdminModule
184 184
                     $b = substr($ldir, 0, $p);
185
-                    $filePath = $b.'/'.$appDir.'/.htaccess';
185
+                    $filePath = $b . '/' . $appDir . '/.htaccess';
186 186
                 } else {
187
-                    $filePath = $appDir.'/.htaccess';
187
+                    $filePath = $appDir . '/.htaccess';
188 188
                 }
189 189
                 $app_htaccess = file_exists($filePath);
190 190
             }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         return $this->render('@ZikulaAdminModule/AdminInterface/securityAnalyzer.html.twig', [
200 200
             'security' => [
201 201
                 'config_php' => is_writable('config/config.php'),
202
-                'magic_quotes_gpc' => (bool) get_magic_quotes_gpc(), // should be off anyway...
202
+                'magic_quotes_gpc' => (bool)get_magic_quotes_gpc(), // should be off anyway...
203 203
                 'app_htaccess' => $app_htaccess,
204 204
                 'updatecheck' => $variableApi->getSystemVar('updatecheck'),
205 205
                 'scactive' => $hasSecurityCenter,
Please login to merge, or discard this patch.
src/system/UsersModule/Twig/Extension/ProfileExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
             // truncate the user name to $maxLength chars
144 144
             $length = strlen($userDisplayName);
145 145
             $truncEnd = ($maxLength > $length) ? $length : $maxLength;
146
-            $show  = htmlspecialchars(substr($userDisplayName, 0, $truncEnd), ENT_QUOTES);
146
+            $show = htmlspecialchars(substr($userDisplayName, 0, $truncEnd), ENT_QUOTES);
147 147
         } else {
148 148
             $show = htmlspecialchars($userDisplayName, ENT_QUOTES);
149 149
         }
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
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $this->kernel = $kernel;
34 34
 
35 35
         $this->setName('Zikula');
36
-        $this->setVersion(ZikulaKernel::VERSION.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : ''));
36
+        $this->setVersion(ZikulaKernel::VERSION . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
37 37
     }
38 38
 
39 39
     protected function registerCommands()
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/CoreExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
     {
226 226
         $string = preg_replace_callback(
227 227
             '/(.)@(.)/s',
228
-            function ($m) {
229
-                return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" .sprintf("%03d", ord($m[2])) . ";";
228
+            function($m) {
229
+                return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" . sprintf("%03d", ord($m[2])) . ";";
230 230
             },
231 231
             $string
232 232
         );
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
         }
274 274
 
275 275
         // ensure proper variable types
276
-        $value = (string) $value;
277
-        $type = (string) $type;
278
-        $weight = (int) $weight;
276
+        $value = (string)$value;
277
+        $type = (string)$type;
278
+        $weight = (int)$weight;
279 279
 
280 280
         if ('stylesheet' == $type) {
281 281
             $this->container->get('zikula_core.common.theme.assets_css')->add([$value => $weight]);
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreInstallerBundle/Util/ZikulaRequirements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function runSymfonyChecks($parameters = [])
25 25
     {
26 26
         try {
27
-            $path = realpath(__DIR__.'/../../../../../var/SymfonyRequirements.php');
27
+            $path = realpath(__DIR__ . '/../../../../../var/SymfonyRequirements.php');
28 28
             require $path;
29 29
             $symfonyRequirements = new \SymfonyRequirements();
30 30
             $this->addZikulaPathRequirements($symfonyRequirements, $parameters);
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         if ($requirement->isFulfilled()) {
45 45
             return;
46 46
         }
47
-        $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.'   ').PHP_EOL;
48
-        $errorMessage .= '   > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.'   > ').PHP_EOL;
47
+        $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL . '   ') . PHP_EOL;
48
+        $errorMessage .= '   > ' . wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL . '   > ') . PHP_EOL;
49 49
 
50 50
         return $errorMessage;
51 51
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $symfonyRequirements->addRequirement(
67 67
             is_writable($src . '/' . $parameters['datadir']),
68 68
             $parameters['datadir'] . '/ directory must be writable',
69
-            'Change the permissions of "<strong>' . $parameters['datadir']. '</strong>" directory so that the web server can write into it.'
69
+            'Change the permissions of "<strong>' . $parameters['datadir'] . '</strong>" directory so that the web server can write into it.'
70 70
         );
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
src/system/BlocksModule/Twig/Extension/BlocksExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     /**
48 48
      * Returns a list of functions to add to the existing list.
49 49
      *
50
-     * @return array An array of functions
50
+     * @return \Twig_SimpleFunction[] An array of functions
51 51
      */
52 52
     public function getFunctions()
53 53
     {
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Entity/Repository/ExtensionRepository.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -53,6 +53,9 @@  discard block
 block discarded – undo
53 53
         return $paginator;
54 54
     }
55 55
 
56
+    /**
57
+     * @param string $indexBy
58
+     */
56 59
     public function getIndexedArrayCollection($indexBy)
57 60
     {
58 61
         $qb = $this->createQueryBuilder('e')->indexBy('e', 'e.' . $indexBy);
@@ -78,6 +81,9 @@  discard block
 block discarded – undo
78 81
         $this->_em->flush($entity);
79 82
     }
80 83
 
84
+    /**
85
+     * @param ExtensionEntity $entity
86
+     */
81 87
     public function removeAndFlush($entity)
82 88
     {
83 89
         $this->_em->remove($entity);
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Handler/Route/Base/AbstractEditHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -378,7 +378,7 @@
 block discarded – undo
378 378
     /**
379 379
      * Get list of allowed redirect codes.
380 380
      *
381
-     * @return array list of possible redirect codes
381
+     * @return string[] list of possible redirect codes
382 382
      */
383 383
     protected function getRedirectCodes()
384 384
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         try {
222 222
             // execute the workflow action
223 223
             $success = $this->workflowHelper->executeAction($entity, $action);
224
-        } catch(\Exception $e) {
224
+        } catch (\Exception $e) {
225 225
             $flashBag->add('error', $this->__f('Sorry, but an error occured during the %action% action. Please apply the changes again!', ['%action%' => $action]) . ' ' . $e->getMessage());
226 226
             $logArgs = ['app' => 'ZikulaRoutesModule', 'user' => $this->currentUserApi->get('uname'), 'entity' => 'route', 'id' => $entity->createCompositeIdentifier(), 'errorMessage' => $e->getMessage()];
227 227
             $this->logger->error('{app}: User {user} tried to edit the {entity} with id {id}, but failed. Error details: {errorMessage}.', $logArgs);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                 return $this->router->generate($routePrefix . 'view');
276 276
             case 'userOwnView':
277 277
             case 'adminOwnView':
278
-                return $this->router->generate($routePrefix . 'view', [ 'own' => 1 ]);
278
+                return $this->router->generate($routePrefix . 'view', ['own' => 1]);
279 279
             case 'userDisplay':
280 280
             case 'adminDisplay':
281 281
                 if ($args['commandName'] != 'delete' && !($this->templateParameters['mode'] == 'create' && $args['commandName'] == 'cancel')) {
Please login to merge, or discard this patch.
src/system/SettingsModule/SettingsModuleInstaller.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
         return $this->container->get('zikula_extensions_module.api.variable')->set(VariableApi::CONFIG, $name, $value);
178 178
     }
179 179
 
180
+    /**
181
+     * @param string $name
182
+     */
180 183
     private function getSystemVar($name)
181 184
     {
182 185
         return $this->container->get('zikula_extensions_module.api.variable')->getSystemVar($name);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,9 +142,9 @@
 block discarded – undo
142 142
                 $newStargArgs = str_replace(',', '&', $this->getSystemVar('startargs')); // replace comma with `&`
143 143
                 $this->setSystemVar('startargs', $newStargArgs);
144 144
             case '2.9.11':
145
-                $this->setSystemVar('shorturls', (bool) $this->getSystemVar('shorturls'));
146
-                $this->setSystemVar('shorturlsstripentrypoint', (bool) $this->getSystemVar('shorturlsstripentrypoint'));
147
-                $this->setSystemVar('useCompression', (bool) $this->getSystemVar('useCompression'));
145
+                $this->setSystemVar('shorturls', (bool)$this->getSystemVar('shorturls'));
146
+                $this->setSystemVar('shorturlsstripentrypoint', (bool)$this->getSystemVar('shorturlsstripentrypoint'));
147
+                $this->setSystemVar('useCompression', (bool)$this->getSystemVar('useCompression'));
148 148
             case '2.9.12': // ship with Core-1.4.4
149 149
                 // reconfigure TZ settings
150 150
                 $this->setGuestTimeZone();
Please login to merge, or discard this patch.