Failed Conditions
Pull Request — experimental/3.1 (#2526)
by Kentaro
40:11 queued 13:18
created
src/Eccube/Form/Type/Admin/AuthorityRoleType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 'label' => '拒否URL',
60 60
                 'required' => false,
61 61
             ))
62
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
62
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
63 63
                 $form = $event->getForm();
64 64
 
65 65
                 $Authority = $form['Authority']->getData();
Please login to merge, or discard this patch.
src/Eccube/Security/Voter/AuthorityVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     public function __construct(Application $app)
38 38
     {
39
-        $this->app     = $app;
39
+        $this->app = $app;
40 40
     }
41 41
 
42 42
     public function supportsAttribute($attribute)
Please login to merge, or discard this patch.
src/Eccube/Service/CsvExportService.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     {
308 308
         $config = $this->config;
309 309
 
310
-        return function ($value) use ($config) {
310
+        return function($value) use ($config) {
311 311
             return mb_convert_encoding(
312 312
                 (string) $value, $config['csv_export_encoding'], 'UTF-8'
313 313
             );
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             if ($Conditions instanceof ArrayCollection) {
432 432
                 $Conditions = new ArrayCollection(
433 433
                     array_map(
434
-                        function ($Entity) use ($em) {
434
+                        function($Entity) use ($em) {
435 435
                             return $em->getRepository(get_class($Entity))->find($Entity->getId());
436 436
                         }, $Conditions->toArray()
437 437
                     )
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -325,7 +325,6 @@  discard block
 block discarded – undo
325 325
 
326 326
     /**
327 327
      * @param $row
328
-     * @param null $callback
329 328
      */
330 329
     public function fputcsv($row)
331 330
     {
@@ -424,7 +423,6 @@  discard block
 block discarded – undo
424 423
      * XXX self::setExportQueryBuilder() をコールする前に EntityManager を取得したいので、引数で渡している
425 424
      *
426 425
      * @param array $searchData セッションから取得した検索条件の配列
427
-     * @param EntityManager $em
428 426
      */
429 427
     protected function findDeserializeObjects(array &$searchData)
430 428
     {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Customer/CustomerEditController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
                         ->setCompanyName($Customer->getCompanyName())
89 89
                         ->setZip01($Customer->getZip01())
90 90
                         ->setZip02($Customer->getZip02())
91
-                        ->setZipcode($Customer->getZip01() . $Customer->getZip02())
91
+                        ->setZipcode($Customer->getZip01().$Customer->getZip02())
92 92
                         ->setPref($Customer->getPref())
93 93
                         ->setAddr01($Customer->getAddr01())
94 94
                         ->setAddr02($Customer->getAddr02())
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@  discard block
 block discarded – undo
27 27
 use Eccube\Annotation\Inject;
28 28
 use Eccube\Annotation\Component;
29 29
 use Eccube\Application;
30
-use Eccube\Common\Constant;
31 30
 use Eccube\Controller\AbstractController;
32 31
 use Eccube\Entity\CustomerAddress;
33 32
 use Eccube\Event\EccubeEvents;
@@ -36,7 +35,6 @@  discard block
 block discarded – undo
36 35
 use Eccube\Repository\CustomerRepository;
37 36
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
38 37
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
39
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
40 38
 use Symfony\Component\EventDispatcher\EventDispatcher;
41 39
 use Symfony\Component\Form\FormFactory;
42 40
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ProductClassController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
                                 'allow_add' => true,
139 139
                                 'allow_delete' => true,
140 140
                                 'data' => $ProductClasses,
141
-                             ));
141
+                                ));
142 142
 
143 143
                         $event = new EventArgs(
144 144
                             array(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                     $class2Valied = $this->isValiedCategory($ClassName2);
107 107
 
108 108
                     // 規格が選択されていないか、選択された状態で分類が保有されていれば、画面表示
109
-                    if($class1Valied && $class2Valied){
109
+                    if ($class1Valied && $class2Valied) {
110 110
                         $hasClassCategoryFlg = true;
111 111
                     }
112 112
 
Please login to merge, or discard this patch.
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -603,6 +603,9 @@  discard block
 block discarded – undo
603 603
     /**
604 604
      * 登録、更新時のエラー画面表示
605 605
      *
606
+     * @param Application $app
607
+     * @param boolean $not_product_class
608
+     * @param \Symfony\Component\Form\FormInterface $classForm
606 609
      */
607 610
     protected function render($app, $Product, $ProductClass, $not_product_class, $classForm, $error = null)
608 611
     {
@@ -654,6 +657,7 @@  discard block
 block discarded – undo
654 657
 
655 658
     /**
656 659
      * 規格1と規格2を組み合わせた商品規格を作成
660
+     * @param Application $app
657 661
      */
658 662
     private function createProductClasses($app, Product $Product, ClassName $ClassName1 = null, ClassName $ClassName2 = null)
659 663
     {
@@ -741,6 +745,7 @@  discard block
 block discarded – undo
741 745
      *
742 746
      * @param $productClassDest ProductClass コピー先となる商品規格
743 747
      * @param $productClassOrig ProductClass コピー元となる商品規格
748
+     * @param Application $app
744 749
      */
745 750
     private function setDefaultProductClass($app, $productClassDest, $productClassOrig) {
746 751
         $productClassDest->setDeliveryDate($productClassOrig->getDeliveryDate());
Please login to merge, or discard this patch.
src/Eccube/Twig/Extension/EccubeExtension.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * Returns a list of functions to add to the existing list.
42 42
      *
43
-     * @return array An array of functions
43
+     * @return \Twig_SimpleFunction[] An array of functions
44 44
      */
45 45
     public function getFunctions()
46 46
     {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Returns a list of filters.
63 63
      *
64
-     * @return array
64
+     * @return \Twig_SimpleFilter[]
65 65
      */
66 66
     public function getFilters()
67 67
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                     if (is_callable($function)) {
69 69
                         return call_user_func_array($function, $arg_list);
70 70
                     }
71
-                    trigger_error('Called to an undefined function : php_'. $function, E_USER_WARNING);
71
+                    trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING);
72 72
 
73 73
             }, ['pre_escape' => 'html', 'is_safe' => ['html']]),
74 74
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getCsrfTokenForAnchor()
157 157
     {
158 158
         $token = $this->app['csrf.token_manager']->getToken(Constant::TOKEN_NAME)->getValue();
159
-        return 'token-for-anchor=\'' . $token . '\'';
159
+        return 'token-for-anchor=\''.$token.'\'';
160 160
     }
161 161
 
162 162
     /**
Please login to merge, or discard this patch.
src/Eccube/Service/CsvImportService.php 2 patches
Spacing   +5 added lines, -5 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(
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
             if ($count > 1) {
363 363
                 $incrementedHeaders[] = $header;
364 364
                 for ($i = 1; $i < $count; $i++) {
365
-                    $incrementedHeaders[] = $header . $i;
365
+                    $incrementedHeaders[] = $header.$i;
366 366
                 }
367 367
             } else {
368 368
                 $incrementedHeaders[] = $header;
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
     protected function convertEncodingRows($row) {
414 414
         if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) {
415 415
             foreach ($row as &$col) {
416
-                $col = mb_convert_encoding($col , 'UTF-8', 'SJIS-win');
416
+                $col = mb_convert_encoding($col, 'UTF-8', 'SJIS-win');
417 417
             }
418 418
         }
419 419
         return $row;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
 namespace Eccube\Service;
25 25
 
26 26
 use Eccube\Annotation\Service;
27
-use Eccube\Application;
28 27
 
29 28
 
30 29
 /**
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
@@ -77,6 +77,9 @@  discard block
 block discarded – undo
77 77
     const CONFIG_YML = 'config.yml';
78 78
     const EVENT_YML = 'event.yml';
79 79
 
80
+    /**
81
+     * @param string $path
82
+     */
80 83
     public function install($path, $source = 0)
81 84
     {
82 85
         $pluginBaseDir = null;
@@ -137,6 +140,9 @@  discard block
 block discarded – undo
137 140
         }
138 141
     }
139 142
 
143
+    /**
144
+     * @param string $dir
145
+     */
140 146
     public function unpackPluginArchive($archive, $dir)
141 147
     {
142 148
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -196,6 +202,9 @@  discard block
 block discarded – undo
196 202
         }
197 203
     }
198 204
 
205
+    /**
206
+     * @param string $yml
207
+     */
199 208
     public function readYml($yml)
200 209
     {
201 210
         if (file_exists($yml)) {
@@ -213,6 +222,9 @@  discard block
 block discarded – undo
213 222
         // ディレクトリ名などに使われれるので厳しめ
214 223
     }
215 224
 
225
+    /**
226
+     * @param string $path
227
+     */
216 228
     public function deleteFile($path)
217 229
     {
218 230
         $f = new Filesystem();
@@ -232,6 +244,9 @@  discard block
 block discarded – undo
232 244
         return $this->appConfig['plugin_realdir'].'/'.$name;
233 245
     }
234 246
 
247
+    /**
248
+     * @param string $d
249
+     */
235 250
     public function createPluginDir($d)
236 251
     {
237 252
         $b = @mkdir($d);
@@ -291,6 +306,9 @@  discard block
 block discarded – undo
291 306
         return $p;
292 307
     }
293 308
 
309
+    /**
310
+     * @param string $method
311
+     */
294 312
     public function callPluginManagerMethod($meta, $method)
295 313
     {
296 314
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
@@ -363,6 +381,9 @@  discard block
 block discarded – undo
363 381
         return true;
364 382
     }
365 383
 
384
+    /**
385
+     * @param string $path
386
+     */
366 387
     public function update(\Eccube\Entity\Plugin $plugin, $path)
367 388
     {
368 389
         $pluginBaseDir = null;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
 use Eccube\Application;
31 31
 use Eccube\Common\Constant;
32 32
 use Eccube\Exception\PluginException;
33
-use Eccube\Plugin\ConfigManager;
34 33
 use Eccube\Plugin\ConfigManager as PluginConfigManager;
35 34
 use Eccube\Repository\PluginEventHandlerRepository;
36 35
 use Eccube\Repository\PluginRepository;
Please login to merge, or discard this patch.