Failed Conditions
Push — 3.0 ( 1e5239 )
by Kiyotaka
38:11
created
eccube_install.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 out('EC-CUBE3 installer use database driver of ', null, false);
32 32
 
33 33
 $database_driver = 'pdo_sqlite';
34
-switch($argv[1]) {
34
+switch ($argv[1]) {
35 35
     case 'mysql':
36 36
         $database_driver = 'pdo_mysql';
37 37
         break;
@@ -157,8 +157,7 @@  discard block
 block discarded – undo
157 157
     putenv('MAIL_PASS='.(getenv('MAIL_PASS') ? getenv('MAIL_PASS') : null));
158 158
     putenv('ADMIN_ROUTE='.(getenv('ADMIN_ROUTE') ? getenv('ADMIN_ROUTE') : 'admin'));
159 159
     putenv('ROOT_URLPATH='.(getenv('ROOT_URLPATH') ? getenv('ROOT_URLPATH') : null));
160
-    putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') :
161
-                          substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32)));
160
+    putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') : substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32)));
162 161
 }
163 162
 
164 163
 function getExampleVariables()
@@ -357,15 +356,15 @@  discard block
 block discarded – undo
357 356
     foreach ($finder as $content) {
358 357
         $permission = $content->getPerms();
359 358
         // see also http://www.php.net/fileperms
360
-        if (!($permission & 0x0010) || !($permission & 0x0002)) {
359
+        if (!($permission&0x0010) || !($permission&0x0002)) {
361 360
             $realPath = $content->getRealPath();
362 361
             if ($verbose) {
363 362
                 out(sprintf('%s %s to ', $realPath, substr(sprintf('%o', $permission), -4)), 'info', false);
364 363
             }
365
-            $permission = !($permission & 0x0020) ? $permission += 040 : $permission; // g+r
366
-            $permission = !($permission & 0x0010) ? $permission += 020 : $permission; // g+w
367
-            $permission = !($permission & 0x0004) ? $permission += 04 : $permission;  // o+r
368
-            $permission = !($permission & 0x0002) ? $permission += 02 : $permission;  // o+w
364
+            $permission = !($permission&0x0020) ? $permission += 040 : $permission; // g+r
365
+            $permission = !($permission&0x0010) ? $permission += 020 : $permission; // g+w
366
+            $permission = !($permission&0x0004) ? $permission += 04 : $permission; // o+r
367
+            $permission = !($permission&0x0002) ? $permission += 02 : $permission; // o+w
369 368
             $result = chmod($realPath, $permission);
370 369
             if ($verbose) {
371 370
                 if ($result) {
@@ -396,13 +395,13 @@  discard block
 block discarded – undo
396 395
 
397 396
 function getConfig()
398 397
 {
399
-    $config = array (
398
+    $config = array(
400 399
         'auth_magic' => getenv('AUTH_MAGIC'),
401 400
         'password_hash_algos' => 'sha256',
402 401
         'shop_name' => getenv('SHOP_NAME'),
403 402
         'force_ssl' => NULL,
404 403
         'admin_allow_host' =>
405
-        array (
404
+        array(
406 405
         ),
407 406
         'cookie_lifetime' => 0,
408 407
         'locale' => 'ja',
@@ -414,9 +413,9 @@  discard block
 block discarded – undo
414 413
 
415 414
 function getDatabaseConfig($database_driver)
416 415
 {
417
-    $database = array (
416
+    $database = array(
418 417
         'database' =>
419
-        array (
418
+        array(
420 419
             'driver' => $database_driver,
421 420
         )
422 421
     );
@@ -443,9 +442,9 @@  discard block
 block discarded – undo
443 442
 
444 443
 function getMailConfig()
445 444
 {
446
-    $mail = array (
445
+    $mail = array(
447 446
         'mail' =>
448
-        array (
447
+        array(
449 448
             'transport' => getenv('MAIL_BACKEND'),
450 449
             'host' => getenv('MAIL_HOST'),
451 450
             'port' => getenv('MAIL_PORT'),
Please login to merge, or discard this patch.
src/Eccube/Log/Monolog/Helper/LogHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
         $webProcessor = new EccubeWebProcessor();
101 101
         $uidProcessor = new UidProcessor(8);
102 102
 
103
-        $FingerCrossedHandler->pushProcessor(function ($record) use ($app, $uidProcessor, $webProcessor) {
103
+        $FingerCrossedHandler->pushProcessor(function($record) use ($app, $uidProcessor, $webProcessor) {
104 104
             // ログフォーマットに出力する値を独自に設定
105 105
 
106 106
             $record['level_name'] = sprintf("%-5s", $record['level_name']);
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/LogServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
         $app->register(new \Silex\Provider\MonologServiceProvider());
22 22
 
23 23
         // Log
24
-        $app['eccube.logger'] = $app->share(function ($app) {
24
+        $app['eccube.logger'] = $app->share(function($app) {
25 25
             return new Logger($app);
26 26
         });
27 27
 
28 28
         // ヘルパー作成
29
-        $app['eccube.monolog.helper'] = $app->share(function ($app) {
29
+        $app['eccube.monolog.helper'] = $app->share(function($app) {
30 30
             return new LogHelper($app);
31 31
         });
32 32
 
33 33
         // ログクラス作成ファクトリー
34
-        $app['eccube.monolog.factory'] = $app->protect(function (array $channelValues) use ($app) {
34
+        $app['eccube.monolog.factory'] = $app->protect(function(array $channelValues) use ($app) {
35 35
 
36 36
             $log = new $app['monolog.logger.class']($channelValues['name']);
37 37
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         // monologの設定は除外
47 47
         unset($channels['monolog']);
48 48
         foreach ($channels as $channel => $channelValues) {
49
-            $app['monolog.logger.'.$channel] = $app->share(function ($app) use ($channelValues) {
49
+            $app['monolog.logger.'.$channel] = $app->share(function($app) use ($channelValues) {
50 50
                 return $app['eccube.monolog.factory']($channelValues);
51 51
             });
52 52
         }
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
         // MonologServiceProviderで定義されているmonolog.handlerの置換
55 55
         $channelValues = $app['config']['log']['channel']['monolog'];
56 56
         $app['monolog.name'] = $channelValues['name'];
57
-        $app['monolog.handler'] = $app->share(function ($app) use ($channelValues) {
57
+        $app['monolog.handler'] = $app->share(function($app) use ($channelValues) {
58 58
             return $app['eccube.monolog.helper']->getHandler($channelValues);
59 59
         });
60 60
 
61
-        $app['eccube.monolog.listener'] = $app->share(function () use ($app) {
61
+        $app['eccube.monolog.listener'] = $app->share(function() use ($app) {
62 62
             return new LogListener($app['eccube.logger']);
63 63
         });
64 64
 
65
-        $app['listener.requestdump'] = $app->share(function ($app) {
65
+        $app['listener.requestdump'] = $app->share(function($app) {
66 66
             return new \Eccube\EventListener\RequestDumpListener($app);
67 67
         });
68 68
     }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Order/EditController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
                 $session->set('eccube.admin.order.customer.search', $searchData);
334 334
                 $session->set('eccube.admin.order.customer.search.page_no', $page_no);
335 335
             } else {
336
-                $searchData = (array)$session->get('eccube.admin.order.customer.search');
336
+                $searchData = (array) $session->get('eccube.admin.order.customer.search');
337 337
                 if (is_null($page_no)) {
338 338
                     $page_no = intval($session->get('eccube.admin.order.customer.search.page_no'));
339 339
                 } else {
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                 $session->set('eccube.admin.order.product.search', $searchData);
490 490
                 $session->set('eccube.admin.order.product.search.page_no', $page_no);
491 491
             } else {
492
-                $searchData = (array)$session->get('eccube.admin.order.product.search');
492
+                $searchData = (array) $session->get('eccube.admin.order.product.search');
493 493
                 if (is_null($page_no)) {
494 494
                     $page_no = intval($session->get('eccube.admin.order.product.search.page_no'));
495 495
                 } else {
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Tools/Pagination/WhereInWalker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $pathType = PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION;
90 90
         }
91 91
 
92
-        $pathExpression       = new PathExpression(PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName);
92
+        $pathExpression       = new PathExpression(PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName);
93 93
         $pathExpression->type = $pathType;
94 94
 
95 95
         $count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 array($pathExpression)
101 101
             );
102 102
             $expression = new InExpression($arithmeticExpression);
103
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
103
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
104 104
 
105 105
         } else {
106 106
             $expression = new NullComparisonExpression($pathExpression);
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Tools/Pagination/CountWalker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         }
70 70
 
71 71
         $pathExpression = new PathExpression(
72
-            PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias,
72
+            PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias,
73 73
             $identifierFieldName
74 74
         );
75 75
         $pathExpression->type = $pathType;
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Tools/Pagination/Paginator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         if ($this->count === null) {
122 122
             try {
123 123
                 $this->count = array_sum(array_map('current', $this->getCountQuery()->getScalarResult()));
124
-            } catch(NoResultException $e) {
124
+            } catch (NoResultException $e) {
125 125
                 $this->count = 0;
126 126
             }
127 127
         }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         /* @var $countQuery Query */
242 242
         $countQuery = $this->cloneQuery($this->query);
243 243
 
244
-        if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
244
+        if (!$countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
245 245
             $countQuery->setHint(CountWalker::HINT_DISTINCT, true);
246 246
         }
247 247
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         foreach ($parameters as $key => $parameter) {
268 268
             $parameterName = $parameter->getName();
269 269
 
270
-            if( ! (isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) {
270
+            if (!(isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) {
271 271
                 unset($parameters[$key]);
272 272
             }
273 273
         }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         );
94 94
 
95 95
         $pathExpression = new PathExpression(
96
-            PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION,
96
+            PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION,
97 97
             $rootAlias,
98 98
             $identifier
99 99
         );
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 
105 105
         if (isset($AST->orderByClause)) {
106 106
             foreach ($AST->orderByClause->orderByItems as $item) {
107
-                if ( ! $item->expression instanceof PathExpression) {
107
+                if (!$item->expression instanceof PathExpression) {
108 108
                     continue;
109 109
                 }
110 110
                 
111 111
                 $AST->selectClause->selectExpressions[] = new SelectExpression(
112 112
                     $this->createSelectExpressionItem($item->expression),
113
-                    '_dctrn_ord' . $this->_aliasCounter++
113
+                    '_dctrn_ord'.$this->_aliasCounter++
114 114
                 );
115 115
             }
116 116
         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     && isset($queryComponents[$expression->identificationVariable])) {
146 146
                     $queryComponent = $queryComponents[$expression->identificationVariable];
147 147
                     if (isset($queryComponent['parent'])
148
-                        && $queryComponent['relation']['type'] & ClassMetadataInfo::TO_MANY) {
148
+                        && $queryComponent['relation']['type']&ClassMetadataInfo::TO_MANY) {
149 149
                         throw new \RuntimeException("Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.");
150 150
                     }
151 151
                 }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Tools/Pagination/RowNumberOverFunction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
      */
45 45
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
46 46
     {
47
-        return 'ROW_NUMBER() OVER(' . trim($sqlWalker->walkOrderByClause(
47
+        return 'ROW_NUMBER() OVER('.trim($sqlWalker->walkOrderByClause(
48 48
             $this->orderByClause
49
-        )) . ')';
49
+        )).')';
50 50
     }
51 51
 
52 52
     /**
Please login to merge, or discard this patch.