Failed Conditions
Push — 3.0.9-dev ( 720aa2...3dd81f )
by k-yamamura
60:00 queued 32:44
created
src/Eccube/Service/CsvImportService.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace Eccube\Service;
25 25
 
26
-use Eccube\Application;
27
-
28 26
 
29 27
 /**
30 28
  * Copyright (C) 2012-2014 David de Boer <[email protected]>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 
118 118
         $this->file = $file;
119 119
         $this->file->setFlags(
120
-            \SplFileObject::READ_CSV |
121
-            \SplFileObject::SKIP_EMPTY |
122
-            \SplFileObject::READ_AHEAD |
120
+            \SplFileObject::READ_CSV|
121
+            \SplFileObject::SKIP_EMPTY|
122
+            \SplFileObject::READ_AHEAD|
123 123
             \SplFileObject::DROP_NEW_LINE
124 124
         );
125 125
         $this->file->setCsvControl(
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             if ($count > 1) {
359 359
                 $incrementedHeaders[] = $header;
360 360
                 for ($i = 1; $i < $count; $i++) {
361
-                    $incrementedHeaders[] = $header . $i;
361
+                    $incrementedHeaders[] = $header.$i;
362 362
                 }
363 363
             } else {
364 364
                 $incrementedHeaders[] = $header;
Please login to merge, or discard this patch.
src/Eccube/Service/PluginService.php 2 patches
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@  discard block
 block discarded – undo
36 36
     const EVENT_YML = 'event.yml';
37 37
     private $app;
38 38
 
39
+    /**
40
+     * @param \Silex\Application $app
41
+     */
39 42
     public function __construct($app)
40 43
     {
41 44
         $this->app = $app;
@@ -98,6 +101,9 @@  discard block
 block discarded – undo
98 101
         }
99 102
     }
100 103
 
104
+    /**
105
+     * @param string $dir
106
+     */
101 107
     public function unpackPluginArchive($archive, $dir)
102 108
     {
103 109
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -116,6 +122,9 @@  discard block
 block discarded – undo
116 122
         }
117 123
     }
118 124
 
125
+    /**
126
+     * @param string $dir
127
+     */
119 128
     public function checkPluginArchiveContent($dir)
120 129
     {
121 130
         $meta = $this->readYml($dir.'/config.yml');
@@ -138,6 +147,9 @@  discard block
 block discarded – undo
138 147
         }
139 148
     }
140 149
 
150
+    /**
151
+     * @param string $yml
152
+     */
141 153
     public function readYml($yml)
142 154
     {
143 155
         return Yaml::Parse($yml);
@@ -151,6 +163,9 @@  discard block
 block discarded – undo
151 163
         // ディレクトリ名などに使われれるので厳しめ
152 164
     }
153 165
 
166
+    /**
167
+     * @param string $path
168
+     */
154 169
     public function deleteFile($path)
155 170
     {
156 171
         $f = new Filesystem();
@@ -170,6 +185,9 @@  discard block
 block discarded – undo
170 185
         return $this->app['config']['plugin_realdir'].'/'.$name;
171 186
     }
172 187
 
188
+    /**
189
+     * @param string $d
190
+     */
173 191
     public function createPluginDir($d)
174 192
     {
175 193
         $b = mkdir($d);
@@ -229,6 +247,9 @@  discard block
 block discarded – undo
229 247
         return $p;
230 248
     }
231 249
 
250
+    /**
251
+     * @param string $method
252
+     */
232 253
     public function callPluginManagerMethod($meta, $method)
233 254
     {
234 255
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     public function checkPluginArchiveContent($dir)
120 120
     {
121 121
         try {
122
-            $meta = $this->readYml($dir . '/config.yml');
122
+            $meta = $this->readYml($dir.'/config.yml');
123 123
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
124 124
             $this->app['monolog']->warning($e->getMessage());
125 125
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
Please login to merge, or discard this patch.
src/Eccube/Service/ShoppingService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
      * 仮受注情報作成
138 138
      *
139 139
      * @param $Customer
140
-     * @param $preOrderId
140
+     * @param string $preOrderId
141 141
      * @return mixed
142 142
      * @throws \Doctrine\ORM\NoResultException
143 143
      * @throws \Doctrine\ORM\NonUniqueResultException
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             ->setFax03($Customer->getFax03())
271 271
             ->setZip01($Customer->getZip01())
272 272
             ->setZip02($Customer->getZip02())
273
-            ->setZipCode($Customer->getZip01() . $Customer->getZip02())
273
+            ->setZipCode($Customer->getZip01().$Customer->getZip02())
274 274
             ->setPref($Customer->getPref())
275 275
             ->setAddr01($Customer->getAddr01())
276 276
             ->setAddr02($Customer->getAddr02())
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                 ->setFax03($CustomerAddress->getFax03())
410 410
                 ->setZip01($CustomerAddress->getZip01())
411 411
                 ->setZip02($CustomerAddress->getZip02())
412
-                ->setZipCode($CustomerAddress->getZip01() . $CustomerAddress->getZip02())
412
+                ->setZipCode($CustomerAddress->getZip01().$CustomerAddress->getZip02())
413 413
                 ->setPref($CustomerAddress->getPref())
414 414
                 ->setAddr01($CustomerAddress->getAddr01())
415 415
                 ->setAddr02($CustomerAddress->getAddr02());
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 ->setFax03($Customer->getFax03())
429 429
                 ->setZip01($Customer->getZip01())
430 430
                 ->setZip02($Customer->getZip02())
431
-                ->setZipCode($Customer->getZip01() . $Customer->getZip02())
431
+                ->setZipCode($Customer->getZip01().$Customer->getZip02())
432 432
                 ->setPref($Customer->getPref())
433 433
                 ->setAddr01($Customer->getAddr01())
434 434
                 ->setAddr02($Customer->getAddr02());
@@ -913,10 +913,10 @@  discard block
 block discarded – undo
913 913
 
914 914
         // 配送日数が設定されている
915 915
         if ($deliveryDateFlag) {
916
-            $period = new \DatePeriod (
917
-                new \DateTime($minDate . ' day'),
916
+            $period = new \DatePeriod(
917
+                new \DateTime($minDate.' day'),
918 918
                 new \DateInterval('P1D'),
919
-                new \DateTime($minDate + $this->app['config']['deliv_date_end_max'] . ' day')
919
+                new \DateTime($minDate + $this->app['config']['deliv_date_end_max'].' day')
920 920
             );
921 921
 
922 922
             foreach ($period as $day) {
Please login to merge, or discard this patch.
html/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 require __DIR__.'/../autoload.php';
26 26
 
27 27
 ini_set('display_errors', 'Off');
28
-error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
28
+error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT);
29 29
 
30 30
 $app = new Eccube\Application();
31 31
 
Please login to merge, or discard this patch.
html/index_dev.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
 // load config dev
60 60
 $conf = $app['config'];
61
-$app['config'] = $app->share(function () use ($conf) {
61
+$app['config'] = $app->share(function() use ($conf) {
62 62
     $confarray = array();
63 63
     $config_dev_file = __DIR__.'/../app/config/eccube/config_dev.yml';
64 64
     if (file_exists($config_dev_file)) {
Please login to merge, or discard this patch.
html/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
     apc_clear_cache();
27 27
 }
28 28
 
29
-require __DIR__ . '/../autoload.php';
29
+require __DIR__.'/../autoload.php';
30 30
 
31 31
 $app = new Eccube\InstallApplication();
32 32
 $app['debug'] = true;
33
-$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
33
+$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
34 34
     if (!$request->getSession()->isStarted()) {
35 35
         $request->getSession()->start();
36 36
     }
Please login to merge, or discard this patch.
src/Eccube/Controller/AbstractController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     protected function getBoundForm(Application $app, $type)
39 39
     {
40 40
         $form = $app['form.factory']
41
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
41
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
42 42
             ->getForm();
43 43
         $form->handleRequest($app['request']);
44 44
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -52,11 +52,17 @@
 block discarded – undo
52 52
         return $form;
53 53
     }
54 54
 
55
+    /**
56
+     * @param Application $app
57
+     */
55 58
     protected function getSecurity($app)
56 59
     {
57 60
         return $app['security.token_storage'];
58 61
     }
59 62
 
63
+    /**
64
+     * @param Application $app
65
+     */
60 66
     protected function isTokenValid($app)
61 67
     {
62 68
         $csrf = $app['form.csrf_provider'];
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/BlockController.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,19 +88,19 @@  discard block
 block discarded – undo
88 88
                 // ファイル生成・更新
89 89
                 $tplDir = $app['config']['block_realdir'];
90 90
 
91
-                $filePath = $tplDir . '/' . $Block->getFileName() . '.twig';
91
+                $filePath = $tplDir.'/'.$Block->getFileName().'.twig';
92 92
 
93 93
                 $fs = new Filesystem();
94 94
                 $fs->dumpFile($filePath, $form->get('block_html')->getData());
95 95
                 // 更新でファイル名を変更した場合、以前のファイルを削除
96 96
                 if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
97
-                    $oldFilePath = $tplDir . $previous_filename;
97
+                    $oldFilePath = $tplDir.$previous_filename;
98 98
                     if ($fs->exists($oldFilePath)) {
99 99
                         $fs->remove($oldFilePath);
100 100
                     }
101 101
                 }
102 102
 
103
-                \Eccube\Util\Cache::clear($app,false);
103
+                \Eccube\Util\Cache::clear($app, false);
104 104
 
105 105
                 $app->addSuccess('admin.register.complete', 'admin');
106 106
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る
138 138
         if ($Block->getDeletableFlg() > 0) {
139 139
             $tplDir = $app['config']['block_realdir'];
140
-            $file = $tplDir . '/' . $Block->getFileName() . '.twig';
140
+            $file = $tplDir.'/'.$Block->getFileName().'.twig';
141 141
             $fs = new Filesystem();
142 142
             if ($fs->exists($file)) {
143 143
                 $fs->remove($file);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $app['orm.em']->flush();
147 147
 
148 148
             $app->addSuccess('admin.delete.complete', 'admin');
149
-            \Eccube\Util\Cache::clear($app,false);
149
+            \Eccube\Util\Cache::clear($app, false);
150 150
         }
151 151
 
152 152
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use Eccube\Entity\Master\DeviceType;
29 29
 use Eccube\Util\Str;
30 30
 use Symfony\Component\Filesystem\Filesystem;
31
-use Symfony\Component\Finder\Finder;
32 31
 use Symfony\Component\Form\FormError;
33 32
 use Symfony\Component\HttpFoundation\Request;
34 33
 use Symfony\Component\HttpFoundation\Response;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/LayoutController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
                 $max = count($Blocks);
90 90
                 for ($i = 0; $i < $max; $i++) {
91 91
                     // block_id が取得できない場合は INSERT しない
92
-                    if (!isset($data['id_' . $i])) {
92
+                    if (!isset($data['id_'.$i])) {
93 93
                         continue;
94 94
                     }
95 95
                     // 未使用は INSERT しない
96
-                    if ($data['target_id_' . $i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) {
96
+                    if ($data['target_id_'.$i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) {
97 97
                         continue;
98 98
                     }
99 99
                     // 他のページに anywhere が存在する場合は INSERT しない
100
-                    $anywhere = (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) ? 1 : 0;
101
-                    if (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) {
100
+                    $anywhere = (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) ? 1 : 0;
101
+                    if (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) {
102 102
                         $Other = $app['orm.em']->getRepository('Eccube\Entity\BlockPosition')
103 103
                             ->findBy(array(
104 104
                                 'anywhere' => 1,
105
-                                'block_id' => $data['id_' . $i],
105
+                                'block_id' => $data['id_'.$i],
106 106
                             ));
107 107
                         if (count($Other) > 0) {
108 108
                             continue;
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
                     $BlockPosition = new \Eccube\Entity\BlockPosition();
113 113
                     $Block = $app['orm.em']->getRepository('Eccube\Entity\Block')
114 114
                         ->findOneBy(array(
115
-                            'id' => $data['id_' . $i],
115
+                            'id' => $data['id_'.$i],
116 116
                             'DeviceType' => $DeviceType,
117 117
                         ));
118 118
                     $BlockPosition
119 119
                         ->setPageId($id)
120
-                        ->setBlockId($data['id_' . $i])
121
-                        ->setBlockRow($data['top_' . $i])
122
-                        ->setTargetId($data['target_id_' . $i])
120
+                        ->setBlockId($data['id_'.$i])
121
+                        ->setBlockRow($data['top_'.$i])
122
+                        ->setTargetId($data['target_id_'.$i])
123 123
                         ->setBlock($Block)
124 124
                         ->setPageLayout($TargetPageLayout)
125 125
                         ->setAnywhere($anywhere);
Please login to merge, or discard this patch.