Completed
Pull Request — experimental/3.1 (#2168)
by Kentaro
48:37
created
src/Eccube/Controller/Admin/Setting/System/SecurityController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
             if (count($allowHost) > 0) {
103 103
                 $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost)));
104 104
             }
105
-            $form->get('force_ssl')->setData((bool)$app['config']['force_ssl']);
105
+            $form->get('force_ssl')->setData((bool) $app['config']['force_ssl']);
106 106
         }
107 107
 
108 108
         return $app->render('Setting/System/security.twig', array(
Please login to merge, or discard this patch.
src/Eccube/Resource/doctrine/migration/Version20160413151321.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
         // path.ymlの更新
23 23
         $app = Application::getInstance();
24
-        $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml';
24
+        $file = $app['config']['root_dir'].'/app/config/eccube/path.yml';
25 25
         $config = Yaml::parse(file_get_contents($file));
26 26
 
27 27
         if (!array_key_exists('public_path', $config)) {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/CacheController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
                 }
59 59
                 if ($dir == 'doctrine') {
60 60
                     // doctrineが指定された場合は, cache driver経由で削除.
61
-                    $config =  $app['orm.em']->getConfiguration();
61
+                    $config = $app['orm.em']->getConfiguration();
62 62
                     $this->deleteDoctrineCache($config->getMetadataCacheImpl());
63 63
                     $this->deleteDoctrineCache($config->getQueryCacheImpl());
64 64
                     $this->deleteDoctrineCache($config->getResultCacheImpl());
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/AdminController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
     {
66 66
         // install.phpのチェック.
67 67
         if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) {
68
-            $file = $app['config']['root_dir'] . '/html/install.php';
68
+            $file = $app['config']['root_dir'].'/html/install.php';
69 69
             if (file_exists($file)) {
70 70
                 $message = $app->trans('admin.install.warning', array('installphpPath' => 'html/install.php'));
71 71
                 $app->addWarning($message, 'admin');
72 72
             }
73
-            $fileOnRoot = $app['config']['root_dir'] . '/install.php';
73
+            $fileOnRoot = $app['config']['root_dir'].'/install.php';
74 74
             if (file_exists($fileOnRoot)) {
75 75
                 $message = $app->trans('admin.install.warning', array('installphpPath' => 'install.php'));
76 76
                 $app->addWarning($message, 'admin');
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                     t1.status
312 312
                 ORDER BY
313 313
                     t1.status';
314
-        $rsm = new ResultSetMapping();;
314
+        $rsm = new ResultSetMapping(); ;
315 315
         $rsm->addScalarResult('status', 'status');
316 316
         $rsm->addScalarResult('count', 'count');
317 317
         $query = $em->createNativeQuery($sql, $rsm);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/MasterdataController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
                 $entityName = str_replace('-', '\\', $data['masterdata_name']);
129 129
                 $entity = new $entityName();
130 130
                 $rank = 0;
131
-                $ids = array_map(function ($v) {return $v['id'];}, $data['data']);
131
+                $ids = array_map(function($v) {return $v['id']; }, $data['data']);
132 132
                 foreach ($data['data'] as $key => $value) {
133 133
                     if ($value['id'] !== null && $value['name'] !== null) {
134 134
                         $entity->setId($value['id']);
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Query/Extract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         if ($driver == 'pdo_sqlite') {
109 109
             return sprintf("CAST(STRFTIME('%s', %s) AS INTEGER)", $this->formats[$this->field], $this->source->dispatch($sqlWalker));
110 110
         } else {
111
-            return sprintf('EXTRACT(%s FROM %s %s)', $this->field, (string)$this->type, $this->source->dispatch($sqlWalker));
111
+            return sprintf('EXTRACT(%s FROM %s %s)', $this->field, (string) $this->type, $this->source->dispatch($sqlWalker));
112 112
         }
113 113
     }
114 114
 }
115 115
\ No newline at end of file
Please login to merge, or discard this patch.
src/Eccube/Repository/Master/OrderStatusRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         foreach ($criteria as $col => $val) {
55 55
             $qb->andWhere($qb->expr()->notIn('o.'.$col, ':'.$col))
56
-                ->setParameter($col, (array)$val);
56
+                ->setParameter($col, (array) $val);
57 57
         }
58 58
 
59 59
         if (is_array($orderBy)) {
Please login to merge, or discard this patch.
src/Eccube/Service/PluginService.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
             if (!empty($config_cache)) {
125 125
                 $meta = $config_cache;
126 126
             } else {
127
-                $meta = $this->readYml($dir . '/config.yml');
127
+                $meta = $this->readYml($dir.'/config.yml');
128 128
             }
129 129
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
130 130
             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
@@ -38,6 +38,9 @@  discard block
 block discarded – undo
38 38
     const EVENT_YML = 'event.yml';
39 39
     private $app;
40 40
 
41
+    /**
42
+     * @param \Pimple\Container $app
43
+     */
41 44
     public function __construct($app)
42 45
     {
43 46
         $this->app = $app;
@@ -103,6 +106,9 @@  discard block
 block discarded – undo
103 106
         }
104 107
     }
105 108
 
109
+    /**
110
+     * @param string $dir
111
+     */
106 112
     public function unpackPluginArchive($archive, $dir)
107 113
     {
108 114
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -121,6 +127,9 @@  discard block
 block discarded – undo
121 127
         }
122 128
     }
123 129
 
130
+    /**
131
+     * @param string $dir
132
+     */
124 133
     public function checkPluginArchiveContent($dir, array $config_cache = array())
125 134
     {
126 135
         try {
@@ -162,6 +171,9 @@  discard block
 block discarded – undo
162 171
         }
163 172
     }
164 173
 
174
+    /**
175
+     * @param string $yml
176
+     */
165 177
     public function readYml($yml)
166 178
     {
167 179
         if (file_exists($yml)) {
@@ -179,6 +191,9 @@  discard block
 block discarded – undo
179 191
         // ディレクトリ名などに使われれるので厳しめ
180 192
     }
181 193
 
194
+    /**
195
+     * @param string $path
196
+     */
182 197
     public function deleteFile($path)
183 198
     {
184 199
         $f = new Filesystem();
@@ -198,6 +213,9 @@  discard block
 block discarded – undo
198 213
         return $this->app['config']['plugin_realdir'].'/'.$name;
199 214
     }
200 215
 
216
+    /**
217
+     * @param string $d
218
+     */
201 219
     public function createPluginDir($d)
202 220
     {
203 221
         $b = @mkdir($d);
@@ -257,6 +275,9 @@  discard block
 block discarded – undo
257 275
         return $p;
258 276
     }
259 277
 
278
+    /**
279
+     * @param string $method
280
+     */
260 281
     public function callPluginManagerMethod($meta, $method)
261 282
     {
262 283
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@
 block discarded – undo
26 26
 
27 27
 use Eccube\Common\Constant;
28 28
 use Eccube\Exception\PluginException;
29
-use Eccube\Plugin\ConfigManager;
30 29
 use Eccube\Plugin\ConfigManager as PluginConfigManager;
31 30
 use Eccube\Util\Cache;
32 31
 use Eccube\Util\Str;
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;
@@ -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.