Failed Conditions
Push — master ( 1e5239...9c9d2b )
by chihiro
39:16
created
src/Eccube/Service/PluginService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
             if (!empty($config_cache)) {
127 127
                 $meta = $config_cache;
128 128
             } else {
129
-                $meta = $this->readYml($dir . '/config.yml');
129
+                $meta = $this->readYml($dir.'/config.yml');
130 130
             }
131 131
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
132 132
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
Please login to merge, or discard this patch.
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@  discard block
 block discarded – undo
37 37
     const EVENT_YML = 'event.yml';
38 38
     private $app;
39 39
 
40
+    /**
41
+     * @param \Silex\Application $app
42
+     */
40 43
     public function __construct($app)
41 44
     {
42 45
         $this->app = $app;
@@ -102,6 +105,9 @@  discard block
 block discarded – undo
102 105
         }
103 106
     }
104 107
 
108
+    /**
109
+     * @param string $dir
110
+     */
105 111
     public function unpackPluginArchive($archive, $dir)
106 112
     {
107 113
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -120,6 +126,9 @@  discard block
 block discarded – undo
120 126
         }
121 127
     }
122 128
 
129
+    /**
130
+     * @param string $dir
131
+     */
123 132
     public function checkPluginArchiveContent($dir, array $config_cache = array())
124 133
     {
125 134
         try {
@@ -161,6 +170,9 @@  discard block
 block discarded – undo
161 170
         }
162 171
     }
163 172
 
173
+    /**
174
+     * @param string $yml
175
+     */
164 176
     public function readYml($yml)
165 177
     {
166 178
         if (file_exists($yml)) {
@@ -178,6 +190,9 @@  discard block
 block discarded – undo
178 190
         // ディレクトリ名などに使われれるので厳しめ
179 191
     }
180 192
 
193
+    /**
194
+     * @param string $path
195
+     */
181 196
     public function deleteFile($path)
182 197
     {
183 198
         $f = new Filesystem();
@@ -197,6 +212,9 @@  discard block
 block discarded – undo
197 212
         return $this->app['config']['plugin_realdir'].'/'.$name;
198 213
     }
199 214
 
215
+    /**
216
+     * @param string $d
217
+     */
200 218
     public function createPluginDir($d)
201 219
     {
202 220
         $b = @mkdir($d);
@@ -256,6 +274,9 @@  discard block
 block discarded – undo
256 274
         return $p;
257 275
     }
258 276
 
277
+    /**
278
+     * @param string $method
279
+     */
259 280
     public function callPluginManagerMethod($meta, $method)
260 281
     {
261 282
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderDetailType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 )));
111 111
 
112 112
         $app = $this->app;
113
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
113
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
114 114
             // モーダルからのPOST時に、金額等をセットする.
115 115
             if ('modal' === $app['request']->get('modal')) {
116 116
                 $data = $event->getData();
@@ -127,17 +127,13 @@  discard block
 block discarded – undo
127 127
                     $data['product_name'] = $Product->getName();
128 128
                     $data['product_code'] = $ProductClass->getCode();
129 129
                     $data['class_name1'] = $ProductClass->hasClassCategory1() ?
130
-                        $ProductClass->getClassCategory1()->getClassName() :
131
-                        null;
130
+                        $ProductClass->getClassCategory1()->getClassName() : null;
132 131
                     $data['class_name2'] = $ProductClass->hasClassCategory2() ?
133
-                        $ProductClass->getClassCategory2()->getClassName() :
134
-                        null;
132
+                        $ProductClass->getClassCategory2()->getClassName() : null;
135 133
                     $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
136
-                        $ProductClass->getClassCategory1()->getName() :
137
-                        null;
134
+                        $ProductClass->getClassCategory1()->getName() : null;
138 135
                     $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
139
-                        $ProductClass->getClassCategory2()->getName() :
140
-                        null;
136
+                        $ProductClass->getClassCategory2()->getName() : null;
141 137
                     $data['tax_rule'] = $TaxRule->getCalcRule()->getId();
142 138
                     $data['price'] = $ProductClass->getPrice02();
143 139
                     $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShipmentItemType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 )));
94 94
 
95 95
         $app = $this->app;
96
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
96
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
97 97
             // モーダルからのPOST時に、金額等をセットする.
98 98
             if ('modal' === $app['request']->get('modal')) {
99 99
                 $data = $event->getData();
@@ -108,17 +108,13 @@  discard block
 block discarded – undo
108 108
                     $data['product_name'] = $Product->getName();
109 109
                     $data['product_code'] = $ProductClass->getCode();
110 110
                     $data['class_name1'] = $ProductClass->hasClassCategory1() ?
111
-                        $ProductClass->getClassCategory1()->getClassName() :
112
-                        null;
111
+                        $ProductClass->getClassCategory1()->getClassName() : null;
113 112
                     $data['class_name2'] = $ProductClass->hasClassCategory2() ?
114
-                        $ProductClass->getClassCategory2()->getClassName() :
115
-                        null;
113
+                        $ProductClass->getClassCategory2()->getClassName() : null;
116 114
                     $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
117
-                        $ProductClass->getClassCategory1()->getName() :
118
-                        null;
115
+                        $ProductClass->getClassCategory1()->getName() : null;
119 116
                     $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
120
-                        $ProductClass->getClassCategory2()->getName() :
121
-                        null;
117
+                        $ProductClass->getClassCategory2()->getName() : null;
122 118
                     $data['price'] = $ProductClass->getPrice02();
123 119
                     $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
124 120
                     $event->setData($data);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderType.php 1 patch
Spacing   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
234 234
                     '\Eccube\Entity\Customer'
235 235
                 )));
236 236
 
237
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) {
237
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) {
238 238
 
239 239
             $data = $event->getData();
240 240
             $orderDetails = &$data['OrderDetails'];
241 241
 
242 242
             // 数量0フィルター
243
-            $quantityFilter = function ($v) {
243
+            $quantityFilter = function($v) {
244 244
                 return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity'])));
245 245
             };
246 246
 
@@ -249,10 +249,9 @@  discard block
 block discarded – undo
249 249
                 $shippings = &$data['Shippings'];
250 250
 
251 251
                 // 数量を抽出
252
-                $getQuantity = function ($v) {
252
+                $getQuantity = function($v) {
253 253
                     return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ?
254
-                        trim($v['quantity']) :
255
-                        0;
254
+                        trim($v['quantity']) : 0;
256 255
                 };
257 256
 
258 257
                 foreach ($shippings as &$shipping) {
@@ -268,7 +267,7 @@  discard block
 block discarded – undo
268 267
                         $orderDetail['quantity'] = 0;
269 268
 
270 269
                         // 受注詳細と同じ商品規格のみ抽出
271
-                        $productClassFilter = function ($v) use ($orderDetail) {
270
+                        $productClassFilter = function($v) use ($orderDetail) {
272 271
                             return $orderDetail['ProductClass'] === $v['ProductClass'];
273 272
                         };
274 273
 
@@ -277,10 +276,9 @@  discard block
 block discarded – undo
277 276
                             if (!empty($shipping['ShipmentItems'])) {
278 277
 
279 278
                                 // 同じ商品規格の受注詳細の価格を適用
280
-                                $applyPrice = function (&$v) use ($orderDetail) {
279
+                                $applyPrice = function(&$v) use ($orderDetail) {
281 280
                                     $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ?
282
-                                        $orderDetail['price'] :
283
-                                        $v['price'];
281
+                                        $orderDetail['price'] : $v['price'];
284 282
                                 };
285 283
                                 array_walk($shipping['ShipmentItems'], $applyPrice);
286 284
 
@@ -300,7 +298,7 @@  discard block
 block discarded – undo
300 298
 
301 299
             $event->setData($data);
302 300
         });
303
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
301
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
304 302
             $form = $event->getForm();
305 303
             $orderDetails = $form['OrderDetails']->getData();
306 304
             if (empty($orderDetails) || count($orderDetails) < 1) {
Please login to merge, or discard this patch.
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;
@@ -166,8 +166,7 @@  discard block
 block discarded – undo
166 166
     putenv('MAIL_PASS='.(getenv('MAIL_PASS') ? getenv('MAIL_PASS') : null));
167 167
     putenv('ADMIN_ROUTE='.(getenv('ADMIN_ROUTE') ? getenv('ADMIN_ROUTE') : 'admin'));
168 168
     putenv('ROOT_URLPATH='.(getenv('ROOT_URLPATH') ? getenv('ROOT_URLPATH') : null));
169
-    putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') :
170
-                          substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32)));
169
+    putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') : substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32)));
171 170
 }
172 171
 
173 172
 function getExampleVariables()
@@ -366,15 +365,15 @@  discard block
 block discarded – undo
366 365
     foreach ($finder as $content) {
367 366
         $permission = $content->getPerms();
368 367
         // see also http://www.php.net/fileperms
369
-        if (!($permission & 0x0010) || !($permission & 0x0002)) {
368
+        if (!($permission&0x0010) || !($permission&0x0002)) {
370 369
             $realPath = $content->getRealPath();
371 370
             if ($verbose) {
372 371
                 out(sprintf('%s %s to ', $realPath, substr(sprintf('%o', $permission), -4)), 'info', false);
373 372
             }
374
-            $permission = !($permission & 0x0020) ? $permission += 040 : $permission; // g+r
375
-            $permission = !($permission & 0x0010) ? $permission += 020 : $permission; // g+w
376
-            $permission = !($permission & 0x0004) ? $permission += 04 : $permission;  // o+r
377
-            $permission = !($permission & 0x0002) ? $permission += 02 : $permission;  // o+w
373
+            $permission = !($permission&0x0020) ? $permission += 040 : $permission; // g+r
374
+            $permission = !($permission&0x0010) ? $permission += 020 : $permission; // g+w
375
+            $permission = !($permission&0x0004) ? $permission += 04 : $permission; // o+r
376
+            $permission = !($permission&0x0002) ? $permission += 02 : $permission; // o+w
378 377
             $result = chmod($realPath, $permission);
379 378
             if ($verbose) {
380 379
                 if ($result) {
@@ -405,13 +404,13 @@  discard block
 block discarded – undo
405 404
 
406 405
 function getConfig()
407 406
 {
408
-    $config = array (
407
+    $config = array(
409 408
         'auth_magic' => getenv('AUTH_MAGIC'),
410 409
         'password_hash_algos' => 'sha256',
411 410
         'shop_name' => getenv('SHOP_NAME'),
412 411
         'force_ssl' => NULL,
413 412
         'admin_allow_host' =>
414
-        array (
413
+        array(
415 414
         ),
416 415
         'cookie_lifetime' => 0,
417 416
         'locale' => 'ja',
@@ -423,9 +422,9 @@  discard block
 block discarded – undo
423 422
 
424 423
 function getDatabaseConfig($database_driver)
425 424
 {
426
-    $database = array (
425
+    $database = array(
427 426
         'database' =>
428
-        array (
427
+        array(
429 428
             'driver' => $database_driver,
430 429
         )
431 430
     );
@@ -452,9 +451,9 @@  discard block
 block discarded – undo
452 451
 
453 452
 function getMailConfig()
454 453
 {
455
-    $mail = array (
454
+    $mail = array(
456 455
         'mail' =>
457
-        array (
456
+        array(
458 457
             'transport' => getenv('MAIL_BACKEND'),
459 458
             'host' => getenv('MAIL_HOST'),
460 459
             'port' => getenv('MAIL_PORT'),
Please login to merge, or discard this patch.
src/Eccube/Controller/Install/InstallController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -329,6 +329,9 @@
 block discarded – undo
329 329
         flush();
330 330
     }
331 331
 
332
+    /**
333
+     * @param InstallApplication $app
334
+     */
332 335
     private function checkModules($app)
333 336
     {
334 337
         foreach ($this->required_modules as $module) {
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function __construct()
58 58
     {
59
-        $this->config_path = __DIR__ . '/../../../../app/config/eccube';
60
-        $this->dist_path = __DIR__ . '/../../Resource/config';
61
-        $this->cache_path = __DIR__ . '/../../../../app/cache';
59
+        $this->config_path = __DIR__.'/../../../../app/config/eccube';
60
+        $this->dist_path = __DIR__.'/../../Resource/config';
61
+        $this->cache_path = __DIR__.'/../../../../app/cache';
62 62
     }
63 63
 
64 64
     private function isValid(Request $request, Form $form)
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         return $app['twig']->render('step1.twig', array(
110 110
                 'form' => $form->createView(),
111
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
111
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
112 112
         ));
113 113
     }
114 114
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         return $app['twig']->render('step2.twig', array(
133 133
                 'protectedDirs' => $protectedDirs,
134
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
134
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
135 135
         ));
136 136
     }
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         if (empty($sessionData['shop_name'])) {
147 147
 
148
-            $config_file = $this->config_path . '/config.yml';
148
+            $config_file = $this->config_path.'/config.yml';
149 149
             $fs = new Filesystem();
150 150
 
151 151
             if ($fs->exists($config_file)) {
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
                 }
160 160
 
161 161
                 // セキュリティの設定
162
-                $config_file = $this->config_path . '/path.yml';
162
+                $config_file = $this->config_path.'/path.yml';
163 163
                 $config = Yaml::parse(file_get_contents($config_file));
164 164
                 $sessionData['admin_dir'] = $config['admin_route'];
165 165
 
166
-                $config_file = $this->config_path . '/config.yml';
166
+                $config_file = $this->config_path.'/config.yml';
167 167
                 $config = Yaml::parse(file_get_contents($config_file));
168 168
 
169 169
                 $allowHost = $config['admin_allow_host'];
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
174 174
 
175 175
                 // メール設定
176
-                $config_file = $this->config_path . '/mail.yml';
176
+                $config_file = $this->config_path.'/mail.yml';
177 177
                 $config = Yaml::parse(file_get_contents($config_file));
178 178
                 $mail = $config['mail'];
179 179
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
         return $app['twig']->render('step3.twig', array(
198 198
                 'form' => $form->createView(),
199
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
199
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
200 200
         ));
201 201
     }
202 202
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         if (empty($sessionData['database'])) {
213 213
 
214
-            $config_file = $this->config_path . '/database.yml';
214
+            $config_file = $this->config_path.'/database.yml';
215 215
             $fs = new Filesystem();
216 216
 
217 217
             if ($fs->exists($config_file)) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
         return $app['twig']->render('step4.twig', array(
241 241
                 'form' => $form->createView(),
242
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
242
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
243 243
         ));
244 244
     }
245 245
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 $host = $request->getSchemeAndHttpHost();
286 286
                 $basePath = $request->getBasePath();
287 287
                 $params = array(
288
-                    'http_url' => $host . $basePath,
288
+                    'http_url' => $host.$basePath,
289 289
                     'shop_name' => $sessionData['shop_name'],
290 290
                 );
291 291
 
@@ -300,24 +300,24 @@  discard block
 block discarded – undo
300 300
 
301 301
         return $app['twig']->render('step5.twig', array(
302 302
                 'form' => $form->createView(),
303
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
303
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
304 304
         ));
305 305
     }
306 306
 
307 307
     //    インストール完了
308 308
     public function complete(InstallApplication $app, Request $request)
309 309
     {
310
-        $config_file = $this->config_path . '/path.yml';
310
+        $config_file = $this->config_path.'/path.yml';
311 311
         $config = Yaml::parse(file_get_contents($config_file));
312 312
 
313 313
         $host = $request->getSchemeAndHttpHost();
314 314
         $basePath = $request->getBasePath();
315 315
 
316
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
316
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
317 317
 
318 318
         return $app['twig']->render('complete.twig', array(
319 319
                 'admin_url' => $adminUrl,
320
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
320
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
321 321
         ));
322 322
     }
323 323
 
@@ -333,12 +333,12 @@  discard block
 block discarded – undo
333 333
     {
334 334
         foreach ($this->required_modules as $module) {
335 335
             if (!extension_loaded($module)) {
336
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
336
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
337 337
             }
338 338
         }
339 339
 
340 340
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
341
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
341
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
342 342
         }
343 343
 
344 344
         foreach ($this->recommended_module as $module) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             if (!function_exists('apache_get_modules')) {
367 367
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
368 368
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
369
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
369
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
370 370
             }
371 371
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
372 372
             // iis
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
     private function setPDO()
379 379
     {
380
-        $config_file = $this->config_path . '/database.yml';
380
+        $config_file = $this->config_path.'/database.yml';
381 381
         $config = Yaml::parse(file_get_contents($config_file));
382 382
 
383 383
         try {
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
      */
412 412
     private function getEntityManager()
413 413
     {
414
-        $config_file = $this->config_path . '/database.yml';
414
+        $config_file = $this->config_path.'/database.yml';
415 415
         $database = Yaml::parse(file_get_contents($config_file));
416 416
 
417 417
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -419,15 +419,15 @@  discard block
 block discarded – undo
419 419
         ));
420 420
 
421 421
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
422
-            'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
422
+            'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
423 423
             'orm.em.options' => array(
424 424
                 'mappings' => array(
425 425
                     array(
426 426
                         'type' => 'yml',
427 427
                         'namespace' => 'Eccube\Entity',
428 428
                         'path' => array(
429
-                            __DIR__ . '/../../Resource/doctrine',
430
-                            __DIR__ . '/../../Resource/doctrine/master',
429
+                            __DIR__.'/../../Resource/doctrine',
430
+                            __DIR__.'/../../Resource/doctrine/master',
431 431
                         ),
432 432
                     ),
433 433
                 ),
@@ -454,11 +454,11 @@  discard block
 block discarded – undo
454 454
     {
455 455
         $this->resetNatTimer();
456 456
 
457
-        $config_file = $this->config_path . '/database.yml';
457
+        $config_file = $this->config_path.'/database.yml';
458 458
         $database = Yaml::parse(file_get_contents($config_file));
459 459
         $config['database'] = $database['database'];
460 460
 
461
-        $config_file = $this->config_path . '/config.yml';
461
+        $config_file = $this->config_path.'/config.yml';
462 462
         $baseConfig = Yaml::parse(file_get_contents($config_file));
463 463
         $config['config'] = $baseConfig;
464 464
 
@@ -514,11 +514,11 @@  discard block
 block discarded – undo
514 514
     {
515 515
         $this->resetNatTimer();
516 516
 
517
-        $config_file = $this->config_path . '/database.yml';
517
+        $config_file = $this->config_path.'/database.yml';
518 518
         $database = Yaml::parse(file_get_contents($config_file));
519 519
         $config['database'] = $database['database'];
520 520
 
521
-        $config_file = $this->config_path . '/config.yml';
521
+        $config_file = $this->config_path.'/config.yml';
522 522
         $baseConfig = Yaml::parse(file_get_contents($config_file));
523 523
         $config['config'] = $baseConfig;
524 524
 
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
         $config = new Configuration($app['db']);
582 582
         $config->setMigrationsNamespace('DoctrineMigrations');
583 583
 
584
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
584
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
585 585
         $config->setMigrationsDirectory($migrationDir);
586 586
         $config->registerMigrationsFromDirectory($migrationDir);
587 587
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     private function getProtectedDirs()
614 614
     {
615 615
         $protectedDirs = array();
616
-        $base = __DIR__ . '/../../../..';
616
+        $base = __DIR__.'/../../../..';
617 617
         $dirs = array(
618 618
             '/html',
619 619
             '/app',
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
         );
627 627
 
628 628
         foreach ($dirs as $dir) {
629
-            if (!is_writable($base . $dir)) {
629
+            if (!is_writable($base.$dir)) {
630 630
                 $protectedDirs[] = $dir;
631 631
             }
632 632
         }
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
     private function createConfigYamlFile($data, $auth = true)
638 638
     {
639 639
         $fs = new Filesystem();
640
-        $config_file = $this->config_path . '/config.yml';
640
+        $config_file = $this->config_path.'/config.yml';
641 641
 
642 642
         if ($fs->exists($config_file)) {
643 643
             $config = Yaml::parse(file_get_contents($config_file));
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 
667 667
         $fs = new Filesystem();
668 668
         $content = str_replace(
669
-            $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist')
669
+            $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist')
670 670
         );
671 671
         $fs->dumpFile($config_file, $content);
672 672
 
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 
681 681
     private function addInstallStatus()
682 682
     {
683
-        $config_file = $this->config_path . '/config.yml';
683
+        $config_file = $this->config_path.'/config.yml';
684 684
         $config = Yaml::parse(file_get_contents($config_file));
685 685
         $config['eccube_install'] = 1;
686 686
         $yml = Yaml::dump($config);
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
     private function createDatabaseYamlFile($data)
693 693
     {
694 694
         $fs = new Filesystem();
695
-        $config_file = $this->config_path . '/database.yml';
695
+        $config_file = $this->config_path.'/database.yml';
696 696
         if ($fs->exists($config_file)) {
697 697
             $fs->remove($config_file);
698 698
         }
@@ -725,14 +725,14 @@  discard block
 block discarded – undo
725 725
 
726 726
             $fs = new Filesystem();
727 727
             $content = str_replace(
728
-                $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist')
728
+                $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist')
729 729
             );
730 730
         } else {
731 731
             $content = Yaml::dump(
732 732
                     array(
733 733
                         'database' => array(
734 734
                             'driver' => 'pdo_sqlite',
735
-                            'path' => realpath($this->config_path . '/eccube.db')
735
+                            'path' => realpath($this->config_path.'/eccube.db')
736 736
                         )
737 737
                     )
738 738
             );
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
     private function createMailYamlFile($data)
746 746
     {
747 747
         $fs = new Filesystem();
748
-        $config_file = $this->config_path . '/mail.yml';
748
+        $config_file = $this->config_path.'/mail.yml';
749 749
         if ($fs->exists($config_file)) {
750 750
             $fs->remove($config_file);
751 751
         }
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 
761 761
         $fs = new Filesystem();
762 762
         $content = str_replace(
763
-            $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist')
763
+            $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist')
764 764
         );
765 765
         $fs->dumpFile($config_file, $content);
766 766
 
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
     private function createPathYamlFile($data, Request $request)
771 771
     {
772 772
         $fs = new Filesystem();
773
-        $config_file = $this->config_path . '/path.yml';
773
+        $config_file = $this->config_path.'/path.yml';
774 774
         if ($fs->exists($config_file)) {
775 775
             $fs->remove($config_file);
776 776
         }
@@ -778,16 +778,16 @@  discard block
 block discarded – undo
778 778
         $ADMIN_ROUTE = $data['admin_dir'];
779 779
         $TEMPLATE_CODE = 'default';
780 780
         $USER_DATA_ROUTE = 'user_data';
781
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
781
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
782 782
         $ROOT_URLPATH = $request->getBasePath();
783
-        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH;
783
+        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH;
784 784
 
785 785
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}');
786 786
         $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH);
787 787
 
788 788
         $fs = new Filesystem();
789 789
         $content = str_replace(
790
-            $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist')
790
+            $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist')
791 791
         );
792 792
         $fs->dumpFile($config_file, $content);
793 793
 
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
 
797 797
     private function sendAppData($params)
798 798
     {
799
-        $config_file = $this->config_path . '/database.yml';
799
+        $config_file = $this->config_path.'/database.yml';
800 800
         $db_config = Yaml::parse(file_get_contents($config_file));
801 801
 
802 802
         $this->setPDO();
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
         }
809 809
 
810 810
         if ($db_config['database']['driver'] === 'pdo_mysql') {
811
-            $db_ver = 'MySQL:' . $version;
811
+            $db_ver = 'MySQL:'.$version;
812 812
         } else {
813 813
             $db_ver = $version;
814 814
         }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 
827 827
         $header = array(
828 828
             'Content-Type: application/x-www-form-urlencoded',
829
-            'Content-Length: ' . strlen($data),
829
+            'Content-Length: '.strlen($data),
830 830
         );
831 831
         $context = stream_context_create(
832 832
             array(
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
     public function migration(InstallApplication $app, Request $request)
854 854
     {
855 855
         return $app['twig']->render('migration.twig', array(
856
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
856
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
857 857
         ));
858 858
     }
859 859
 
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
             return $app['twig']->render('migration_plugin.twig', array(
883 883
                     'Plugins' => $Plugins,
884 884
                     'version' => Constant::VERSION,
885
-                    'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
885
+                    'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
886 886
             ));
887 887
         }
888 888
     }
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
         \Eccube\Util\Cache::clear($config_app, true);
906 906
 
907 907
         return $app['twig']->render('migration_end.twig', array(
908
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
908
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
909 909
         ));
910 910
     }
911 911
 }
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/ProductListMaxType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@
 block discarded – undo
37 37
      */
38 38
     public function buildForm(FormBuilderInterface $builder, array $options)
39 39
     {
40
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
40
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
41 41
             $options = $event->getForm()->getConfig()->getOptions();
42 42
             if (!$event->getData()) {
43 43
                 $data = current(array_keys($options['choice_list']->getValues()));
44 44
                 $event->setData($data);
45 45
             }
46 46
         });
47
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
47
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
48 48
             $options = $event->getForm()->getConfig()->getOptions();
49 49
             $values = $options['choice_list']->getValues();
50 50
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/ProductListOrderByType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@
 block discarded – undo
37 37
      */
38 38
     public function buildForm(FormBuilderInterface $builder, array $options)
39 39
     {
40
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
40
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
41 41
             $options = $event->getForm()->getConfig()->getOptions();
42 42
             if (!$event->getData()) {
43 43
                 $data = current(array_keys($options['choice_list']->getValues()));
44 44
                 $event->setData($data);
45 45
             }
46 46
         });
47
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
47
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
48 48
             $options = $event->getForm()->getConfig()->getOptions();
49 49
             $values = $options['choice_list']->getValues();
50 50
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step4Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 'label' => 'パスワード',
93 93
                 'required' => false,
94 94
             ))
95
-            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
95
+            ->addEventListener(FormEvents::POST_SUBMIT, function($event) {
96 96
                 $form = $event->getForm();
97 97
                 $data = $form->getData();
98 98
                 try {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                     $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
118 118
                     $conn->connect();
119 119
                 } catch (\Exception $e) {
120
-                    $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage()));
120
+                    $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage()));
121 121
                 }
122 122
             });
123 123
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function validate($data, ExecutionContext $context, $param = null)
134 134
     {
135 135
         $parameters = $this->app['request']->get('install_step4');
136
-        if ($parameters['database'] != 'pdo_sqlite'){
136
+        if ($parameters['database'] != 'pdo_sqlite') {
137 137
             $context->validateValue($data, array(
138 138
                 new Assert\NotBlank()
139 139
             ));
Please login to merge, or discard this patch.