Failed Conditions
Pull Request — experimental/3.1 (#2532)
by Kentaro
34:08 queued 17:05
created
src/Eccube/Service/ShoppingService.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace Eccube\Service;
25 25
 
26
-use Doctrine\DBAL\LockMode;
27 26
 use Doctrine\ORM\EntityManager;
28 27
 use Eccube\Annotation\Inject;
29 28
 use Eccube\Annotation\Service;
Please login to merge, or discard this patch.
src/Eccube/Repository/OrderRepository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
         if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) {
110 110
             $qb
111 111
                 ->andWhere('CONCAT(o.name01, o.name02) LIKE :name')
112
-                ->setParameter('name', '%' . $searchData['name'] . '%');
112
+                ->setParameter('name', '%'.$searchData['name'].'%');
113 113
         }
114 114
 
115 115
         // kana
116 116
         if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) {
117 117
             $qb
118 118
                 ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana')
119
-                ->setParameter('kana', '%' . $searchData['kana'] . '%');
119
+                ->setParameter('kana', '%'.$searchData['kana'].'%');
120 120
         }
121 121
 
122 122
         // email
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             $qb
248 248
                 ->leftJoin('o.OrderItems', 'oi')
249 249
                 ->andWhere('oi.product_name LIKE :buy_product_name')
250
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%');
250
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
251 251
         }
252 252
 
253 253
         // Order By
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
                 ->setParameter('order_id_start', $searchData['order_id_start']);
274 274
         }
275 275
         // multi
276
-        if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
276
+        if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
277 277
             $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null;
278 278
             $qb
279
-                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' .
279
+                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '.
280 280
                            'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti')
281 281
                 ->setParameter('multi', $multi)
282
-                ->setParameter('likemulti', '%' . $searchData['multi'] . '%');
282
+                ->setParameter('likemulti', '%'.$searchData['multi'].'%');
283 283
         }
284 284
 
285 285
         // order_id_end
@@ -316,28 +316,28 @@  discard block
 block discarded – undo
316 316
         if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) {
317 317
             $qb
318 318
                 ->andWhere('CONCAT(o.name01, o.name02) LIKE :name')
319
-                ->setParameter('name', '%' . $searchData['name'] . '%');
319
+                ->setParameter('name', '%'.$searchData['name'].'%');
320 320
         }
321 321
 
322 322
         // kana
323 323
         if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) {
324 324
             $qb
325 325
                 ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana')
326
-                ->setParameter('kana', '%' . $searchData['kana'] . '%');
326
+                ->setParameter('kana', '%'.$searchData['kana'].'%');
327 327
         }
328 328
 
329 329
         // email
330 330
         if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) {
331 331
             $qb
332 332
                 ->andWhere('o.email like :email')
333
-                ->setParameter('email', '%' . $searchData['email'] . '%');
333
+                ->setParameter('email', '%'.$searchData['email'].'%');
334 334
         }
335 335
 
336 336
         // tel
337 337
         if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) {
338 338
             $qb
339 339
                 ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel')
340
-                ->setParameter('tel', '%' . $searchData['tel'] . '%');
340
+                ->setParameter('tel', '%'.$searchData['tel'].'%');
341 341
         }
342 342
 
343 343
         // sex
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
             $qb
442 442
                 ->leftJoin('o.OrderItems', 'oi')
443 443
                 ->andWhere('oi.product_name LIKE :buy_product_name')
444
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%');
444
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
445 445
         }
446 446
 
447 447
         // Order By
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 )));
257 257
 
258 258
         // 選択された支払い方法の名称をエンティティにコピーする
259
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
259
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
260 260
             $Order = $event->getData();
261 261
             $Payment = $Order->getPayment();
262 262
             if (!is_null($Payment)) {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             }
265 265
         });
266 266
         // 会員受注の場合、会員の性別/職業/誕生日をエンティティにコピーする
267
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
267
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
268 268
             $Order = $event->getData();
269 269
             $Customer = $Order->getCustomer();
270 270
             if (!is_null($Customer)) {
Please login to merge, or discard this patch.
src/Eccube/Service/PluginService.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,6 @@
 block discarded – undo
31 31
 use Eccube\Common\Constant;
32 32
 use Eccube\Entity\Plugin;
33 33
 use Eccube\Exception\PluginException;
34
-use Eccube\Plugin\ConfigManager;
35 34
 use Eccube\Plugin\ConfigManager as PluginConfigManager;
36 35
 use Eccube\Repository\PluginEventHandlerRepository;
37 36
 use Eccube\Repository\PluginRepository;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             if (!empty($config_cache)) {
175 175
                 $meta = $config_cache;
176 176
             } else {
177
-                $meta = $this->readYml($dir . '/config.yml');
177
+                $meta = $this->readYml($dir.'/config.yml');
178 178
             }
179 179
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
180 180
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
             $enabledPluginEntityDirs[] = $entityDir;
358 358
         } else {
359 359
             $index = array_search($entityDir, $enabledPluginEntityDirs);
360
-            if ($index >=0 ) {
360
+            if ($index >= 0) {
361 361
                 array_splice($enabledPluginEntityDirs, $index, 1);
362 362
             }
363 363
         }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Mapping/Driver/ReloadSafeAnnotationDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         }
73 73
 
74 74
         foreach ($this->paths as $path) {
75
-            if ( ! is_dir($path)) {
75
+            if (!is_dir($path)) {
76 76
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
77 77
             }
78 78
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
82 82
                     \RecursiveIteratorIterator::LEAVES_ONLY
83 83
                 ),
84
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
84
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
85 85
                 \RecursiveRegexIterator::GET_MATCH
86 86
             );
87 87
 
88 88
             foreach ($iterator as $file) {
89 89
                 $sourceFile = $file[0];
90 90
 
91
-                if ( ! preg_match('(^phar:)i', $sourceFile)) {
91
+                if (!preg_match('(^phar:)i', $sourceFile)) {
92 92
                     $sourceFile = realpath($sourceFile);
93 93
                 }
94 94
 
@@ -133,15 +133,15 @@  discard block
 block discarded – undo
133 133
                     $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceIndex, [';']);
134 134
                     $namespace = $tokens->generatePartialCode($tokens->getNextMeaningfulToken($namespaceIndex), $tokens->getPrevMeaningfulToken($namespaceEndIndex));
135 135
                     $className = $tokens[$classNameTokenIndex]->getContent();
136
-                    $fqcn = $namespace . '\\' . $className;
137
-                    if (class_exists($fqcn) && ! $this->isTransient($fqcn)) {
136
+                    $fqcn = $namespace.'\\'.$className;
137
+                    if (class_exists($fqcn) && !$this->isTransient($fqcn)) {
138 138
                         if (in_array($sourceFile, $this->newProxyFiles)) {
139
-                            $newClassName = $className . Str::random(12);
139
+                            $newClassName = $className.Str::random(12);
140 140
                             $tokens[$classNameTokenIndex] = new Token([T_STRING, $newClassName]);
141 141
                             $newFilePath = $this->outputDir."${newClassName}.php";
142 142
                             file_put_contents($newFilePath, $tokens->generateCode());
143 143
                             require_once $newFilePath;
144
-                            $results[] = $namespace . "\\${newClassName}";
144
+                            $results[] = $namespace."\\${newClassName}";
145 145
                         } else {
146 146
                             $results[] = $fqcn;
147 147
                         }
Please login to merge, or discard this patch.
src/Eccube/Service/SchemaService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     public function updateSchema($generatedFiles)
46 46
     {
47
-        $outputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12);
47
+        $outputDir = sys_get_temp_dir().'/proxy_'.Str::random(12);
48 48
         mkdir($outputDir);
49 49
 
50 50
         try {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShippingType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 'allow_delete' => true,
208 208
                 'prototype' => true,
209 209
             ))
210
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
210
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
211 211
                 /** @var \Eccube\Entity\Shipping $data */
212 212
                 $data = $event->getData();
213 213
                 /** @var \Symfony\Component\Form\Form $form */
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                     'placeholder' => '指定なし',
229 229
                     'required' => false,
230 230
                     'data' => $DeliveryTime,
231
-                    'query_builder' => function (EntityRepository $er) use ($Delivery) {
231
+                    'query_builder' => function(EntityRepository $er) use ($Delivery) {
232 232
                         $qb = $er->createQueryBuilder('dt');
233 233
                         if ($Delivery) {
234 234
                             $qb
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                     'mapped' => false,
241 241
                 ));
242 242
             })
243
-            ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
243
+            ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
244 244
                 $data = $event->getData();
245 245
                 $form = $event->getForm();
246 246
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                     'choice_label' => 'delivery_time',
262 262
                     'placeholder' => '指定なし',
263 263
                     'required' => false,
264
-                    'query_builder' => function (EntityRepository $er) use ($Delivery) {
264
+                    'query_builder' => function(EntityRepository $er) use ($Delivery) {
265 265
                         $qb = $er->createQueryBuilder('dt');
266 266
                         if ($Delivery) {
267 267
                             $qb
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                     'mapped' => false,
274 274
                 ));
275 275
             })
276
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
276
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
277 277
                 $form = $event->getForm();
278 278
                 $OrderItems = $form['OrderItems']->getData();
279 279
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                     $form['shipping_delivery_date']->addError(new FormError('商品が追加されていません。'));
283 283
                 }
284 284
             })
285
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
285
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
286 286
                 $form = $event->getForm();
287 287
                 $Shipping = $event->getData();
288 288
                 $Delivery = $Shipping->getDelivery();
Please login to merge, or discard this patch.