Completed
Pull Request — master (#1810)
by Lam
371:27 queued 364:11
created
src/Eccube/Util/Str.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return $value;
160 160
         }
161 161
 
162
-        return rtrim(mb_substr($value, 0, $length, 'UTF-8')) . $end;
162
+        return rtrim(mb_substr($value, 0, $length, 'UTF-8')).$end;
163 163
     }
164 164
 
165 165
 
@@ -186,18 +186,18 @@  discard block
 block discarded – undo
186 186
         }
187 187
         if ($diff->m == 1 || $diff->days > 0) {
188 188
             if ($diff->days <= 31) {
189
-                return $diff->days . '日前';
189
+                return $diff->days.'日前';
190 190
             }
191 191
             // return $date->format("Y/m/d H:i");
192 192
             return $date->format("Y/m/d");
193 193
         }
194 194
         if ($diff->h > 0) {
195
-            return $diff->h . "時間前";
195
+            return $diff->h."時間前";
196 196
         }
197 197
         if ($diff->i > 0) {
198
-            return $diff->i . "分前";
198
+            return $diff->i."分前";
199 199
         }
200
-        return $diff->s . "秒前";
200
+        return $diff->s."秒前";
201 201
     }
202 202
 
203 203
     /**
Please login to merge, or discard this patch.
src/silex-doctrine-migrations/MigrationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $app['db.migrations.table_name'] = null;
25 25
         $app['db.migrations.name'] = null;
26 26
 
27
-        $app['dispatcher']->addListener(ConsoleEvents::INIT, function (ConsoleEvent $event) use ($app) {
27
+        $app['dispatcher']->addListener(ConsoleEvents::INIT, function(ConsoleEvent $event) use ($app) {
28 28
             $application = $event->getApplication();
29 29
 
30 30
             $helpers = array('dialog' => new DialogHelper());
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/BlockController.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
                 // ファイル生成・更新
114 114
                 $tplDir = $app['config']['block_realdir'];
115 115
 
116
-                $filePath = $tplDir . '/' . $Block->getFileName() . '.twig';
116
+                $filePath = $tplDir.'/'.$Block->getFileName().'.twig';
117 117
 
118 118
                 $fs = new Filesystem();
119 119
                 $fs->dumpFile($filePath, $form->get('block_html')->getData());
120 120
                 // 更新でファイル名を変更した場合、以前のファイルを削除
121 121
                 if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
122
-                    $oldFilePath = $tplDir . '/' . $previous_filename . '.twig';
122
+                    $oldFilePath = $tplDir.'/'.$previous_filename.'.twig';
123 123
                     if ($fs->exists($oldFilePath)) {
124 124
                         $fs->remove($oldFilePath);
125 125
                     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る
172 172
         if ($Block->getDeletableFlg() > 0) {
173 173
             $tplDir = $app['config']['block_realdir'];
174
-            $file = $tplDir . '/' . $Block->getFileName() . '.twig';
174
+            $file = $tplDir.'/'.$Block->getFileName().'.twig';
175 175
             $fs = new Filesystem();
176 176
             if ($fs->exists($file)) {
177 177
                 $fs->remove($file);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderType.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@
 block discarded – undo
36 36
 {
37 37
     protected $app;
38 38
 
39
+    /**
40
+     * @param \Silex\Application $app
41
+     */
39 42
     public function __construct($app)
40 43
     {
41 44
         $this->app = $app;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  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
             if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
240 240
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             }
275 275
 
276 276
         });
277
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
277
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
278 278
             $form = $event->getForm();
279 279
             $orderDetails = $form['OrderDetails']->getData();
280 280
             if (empty($orderDetails) || count($orderDetails) < 1) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderDetailType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 )));
92 92
 
93 93
         $app = $this->app;
94
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
94
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
95 95
             // モーダルからのPOST時に、金額等をセットする.
96 96
             if ('modal' === $app['request']->get('modal')) {
97 97
                 $data = $event->getData();
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/PageMaxType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
      */
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
41
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
42 42
             $options = $event->getForm()->getConfig()->getOptions();
43 43
             if (!$event->getData()) {
44 44
                 $data = current(array_keys($options['choice_list']->getValues()));
45 45
                 $event->setData($data);
46 46
             }
47 47
         });
48
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
48
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
49 49
             $options = $event->getForm()->getConfig()->getOptions();
50 50
             $values = $options['choice_list']->getValues();
51 51
             if (!in_array($event->getData(), $values)) {
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
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
      */
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
41
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
42 42
             $options = $event->getForm()->getConfig()->getOptions();
43 43
             if (!$event->getData()) {
44 44
                 $data = current(array_keys($options['choice_list']->getValues()));
45 45
                 $event->setData($data);
46 46
             }
47 47
         });
48
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
48
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
49 49
             $options = $event->getForm()->getConfig()->getOptions();
50 50
             $values = $options['choice_list']->getValues();
51 51
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/MasterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $builder->add('category_id', 'entity', array(
43 43
             'class' => 'Eccube\Entity\Category',
44 44
             'property' => 'NameWithLevel',
45
-            'query_builder' => function (EntityRepository $er) {
45
+            'query_builder' => function(EntityRepository $er) {
46 46
                 return $er
47 47
                     ->createQueryBuilder('c')
48 48
                     ->orderBy('c.rank', 'DESC');
Please login to merge, or discard this patch.
src/Eccube/Repository/BlockRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@
 block discarded – undo
257 257
         }
258 258
 
259 259
         foreach ($readPaths as $readPath) {
260
-            $filePath = $readPath . '/' . $fileName . '.twig';
260
+            $filePath = $readPath.'/'.$fileName.'.twig';
261 261
             $fs = new Filesystem();
262 262
             if ($fs->exists($filePath)) {
263 263
                 return array(
Please login to merge, or discard this patch.