Completed
Push — experimental/3.1 ( 62371a...ff3a02 )
by Yangsin
51:06 queued 14:43
created
src/Eccube/Command/GeneratorCommand/AbstractPluginGenerator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      * @param array $metadatas
349 349
      * @param array $fsList
350 350
      * @param $pluginCode
351
-     * @param $codePath
351
+     * @param string $codePath
352 352
      */
353 353
     protected function generateMigration(array $metadatas, array &$fsList = array(), $pluginCode, $codePath)
354 354
     {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      *
374 374
      * @param $pluginCode
375 375
      * @param array $metadatas
376
-     * @return mixed|string
376
+     * @return string
377 377
      */
378 378
     protected function makeMigration($pluginCode, array $metadatas)
379 379
     {
Please login to merge, or discard this patch.
src/Eccube/Command/PluginCommand.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 use Symfony\Component\Console\Input\InputOption;
34 34
 use Symfony\Component\Console\Output\OutputInterface;
35 35
 use Symfony\Component\Console\Question\Question;
36
-use Symfony\Component\Validator\Constraints as Assert;
37 36
 
38 37
 class PluginCommand extends \Knp\Command\Command
39 38
 {
Please login to merge, or discard this patch.
src/Eccube/Application/ApplicationTrait.php 3 patches
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Eccube\Application;
4 4
 
5
-use Eccube\Event\TemplateEvent;
6
-use Monolog\Logger;
7
-use Symfony\Component\Form\FormBuilder;
8 5
 use Symfony\Component\HttpFoundation\Request;
9 6
 use Symfony\Component\HttpFoundation\Response;
10
-use Symfony\Component\HttpFoundation\StreamedResponse;
11 7
 use Symfony\Component\HttpKernel\HttpKernelInterface;
12
-use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
13
-use Symfony\Component\Security\Core\User\UserInterface;
14 8
 
15 9
 trait ApplicationTrait
16 10
 {
Please login to merge, or discard this patch.
Doc Comments   +11 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,7 @@  discard block
 block discarded – undo
16 16
 {
17 17
     /**
18 18
      * Application Shortcut Methods
19
+     * @param string $message
19 20
      */
20 21
     public function addSuccess($message, $namespace = 'front')
21 22
     {
@@ -32,6 +33,9 @@  discard block
 block discarded – undo
32 33
         $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message);
33 34
     }
34 35
 
36
+    /**
37
+     * @param string $message
38
+     */
35 39
     public function addWarning($message, $namespace = 'front')
36 40
     {
37 41
         $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message);
@@ -42,6 +46,9 @@  discard block
 block discarded – undo
42 46
         $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message);
43 47
     }
44 48
 
49
+    /**
50
+     * @param string $message
51
+     */
45 52
     public function addRequestError($message, $namespace = 'front')
46 53
     {
47 54
         $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message);
@@ -58,6 +65,9 @@  discard block
 block discarded – undo
58 65
         $this->addWarning('admin.delete.warning', 'admin');
59 66
     }
60 67
 
68
+    /**
69
+     * @param string $targetPath
70
+     */
61 71
     public function setLoginTargetPath($targetPath, $namespace = null)
62 72
     {
63 73
         if (is_null($namespace)) {
@@ -109,7 +119,7 @@  discard block
 block discarded – undo
109 119
      * @param string $path フォワード先のパス
110 120
      * @param array $requestParameters
111 121
      * @param Response $response
112
-     * @return Application
122
+     * @return ApplicationTrait
113 123
      */
114 124
     public function forwardChain($path, array $requestParameters = [], Response &$response = null)
115 125
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,32 +19,32 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function addSuccess($message, $namespace = 'front')
21 21
     {
22
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message);
22
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message);
23 23
     }
24 24
 
25 25
     public function addError($message, $namespace = 'front')
26 26
     {
27
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message);
27
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message);
28 28
     }
29 29
 
30 30
     public function addDanger($message, $namespace = 'front')
31 31
     {
32
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message);
32
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message);
33 33
     }
34 34
 
35 35
     public function addWarning($message, $namespace = 'front')
36 36
     {
37
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message);
37
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message);
38 38
     }
39 39
 
40 40
     public function addInfo($message, $namespace = 'front')
41 41
     {
42
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message);
42
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message);
43 43
     }
44 44
 
45 45
     public function addRequestError($message, $namespace = 'front')
46 46
     {
47
-        $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message);
47
+        $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message);
48 48
     }
49 49
 
50 50
     public function clearMessage()
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (is_null($namespace)) {
64 64
             $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath);
65 65
         } else {
66
-            $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath);
66
+            $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath);
67 67
         }
68 68
     }
69 69
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param Response $response
112 112
      * @return Application
113 113
      */
114
-    public function forwardChain($path, array $requestParameters = [], Response &$response = null)
114
+    public function forwardChain($path, array $requestParameters = [], Response&$response = null)
115 115
     {
116 116
         $response = $this->forward($path, $requestParameters);
117 117
         return $this;
Please login to merge, or discard this patch.
src/Eccube/Controller/AbstractController.php 2 patches
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['csrf.token_manager'];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED);
46 46
 
47 47
         $form = $app['form.factory']
48
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
48
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
49 49
             ->getForm();
50 50
         $form->handleRequest($app['request_stack']->getCurrentRequest());
51 51
 
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ChangePasswordType.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@
 block discarded – undo
37 37
 {
38 38
     private $app;
39 39
 
40
+    /**
41
+     * @param \Pimple\Container $app
42
+     */
40 43
     public function __construct($app)
41 44
     {
42 45
         $this->app = $app;
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,6 @@
 block discarded – undo
27 27
 use Symfony\Component\Form\Extension\Core\Type\PasswordType;
28 28
 use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
29 29
 use Symfony\Component\Form\FormBuilderInterface;
30
-use Symfony\Component\Form\FormError;
31
-use Symfony\Component\Form\FormEvents;
32 30
 use Symfony\Component\OptionsResolver\OptionsResolver;
33 31
 use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
34 32
 use Symfony\Component\Validator\Constraints as Assert;
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/SearchProductType.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
 use Symfony\Component\Form\Extension\Core\Type\HiddenType;
33 33
 use Symfony\Component\Form\Extension\Core\Type\TextType;
34 34
 use Symfony\Component\Form\FormBuilderInterface;
35
-use Symfony\Component\Validator\Constraints as Assert;
36 35
 
37 36
 class SearchProductType extends AbstractType
38 37
 {
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/EccubeServiceProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      * This method should only be used to configure services and parameters.
40 40
      * It should not get services.
41 41
      *
42
-     * @param BaseApplication $app An Application instance
42
+     * @param Container $app An Application instance
43 43
      */
44 44
     public function register(Container $app)
45 45
     {
Please login to merge, or discard this patch.
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -45,31 +45,31 @@  discard block
 block discarded – undo
45 45
     public function register(Container $app)
46 46
     {
47 47
         // Service
48
-        $app['eccube.service.system'] = function () use ($app) {
48
+        $app['eccube.service.system'] = function() use ($app) {
49 49
             return new \Eccube\Service\SystemService($app);
50 50
         };
51
-        $app['view'] = function () use ($app) {
51
+        $app['view'] = function() use ($app) {
52 52
             return $app['twig'];
53 53
         };
54
-        $app['eccube.service.cart'] = function () use ($app) {
54
+        $app['eccube.service.cart'] = function() use ($app) {
55 55
             return new \Eccube\Service\CartService($app);
56 56
         };
57
-        $app['eccube.service.order'] = function () use ($app) {
57
+        $app['eccube.service.order'] = function() use ($app) {
58 58
             return new \Eccube\Service\OrderService($app);
59 59
         };
60
-        $app['eccube.service.tax_rule'] = function () use ($app) {
60
+        $app['eccube.service.tax_rule'] = function() use ($app) {
61 61
             return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']);
62 62
         };
63
-        $app['eccube.service.plugin'] = function () use ($app) {
63
+        $app['eccube.service.plugin'] = function() use ($app) {
64 64
             return new \Eccube\Service\PluginService($app);
65 65
         };
66
-        $app['eccube.service.mail'] = function () use ($app) {
66
+        $app['eccube.service.mail'] = function() use ($app) {
67 67
             return new \Eccube\Service\MailService($app);
68 68
         };
69
-        $app['eccube.calculate.context'] = function () use ($app) {
69
+        $app['eccube.calculate.context'] = function() use ($app) {
70 70
                 return new \Eccube\Service\Calculator\CalculateContext();
71 71
         };
72
-        $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) {
72
+        $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) {
73 73
                 $Service = new \Eccube\Service\CalculateService($Order, $Customer);
74 74
                 $Context = $app['eccube.calculate.context'];
75 75
                 $Context->setCalculateStrategies($app['eccube.calculate.strategies']($Order));
@@ -78,40 +78,40 @@  discard block
 block discarded – undo
78 78
                 return $Service;
79 79
         });
80 80
 
81
-        $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) {
81
+        $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) {
82 82
                 $Service = new $clazz;
83 83
                 $Service->setApplication($app);
84 84
                 return $Service;
85 85
         });
86 86
 
87
-        $app['eccube.calculate.strategies'] = $app->protect(function ($Order) use ($app) {
87
+        $app['eccube.calculate.strategies'] = $app->protect(function($Order) use ($app) {
88 88
             $Strategies = new \Doctrine\Common\Collections\ArrayCollection(); // TODO 暫定的に ArrayCollection とする. 専用クラスにしたい
89 89
             // デフォルトのストラテジーをセットしておく
90 90
             $Strategies->add($app['eccube.calculate.strategy.shipping']($Order));
91 91
             $Strategies->add($app['eccube.calculate.strategy.tax']($Order));
92 92
             return $Strategies;
93 93
         });
94
-        $app['eccube.calculate.strategy.shipping'] = $app->protect(function ($Order) use ($app) {
94
+        $app['eccube.calculate.strategy.shipping'] = $app->protect(function($Order) use ($app) {
95 95
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy();
96 96
                 $Strategy->setApplication($app);
97 97
                 $Strategy->setOrder($Order);
98 98
                 return $Strategy;
99 99
         });
100
-        $app['eccube.calculate.strategy.tax'] = $app->protect(function ($Order) use ($app) {
100
+        $app['eccube.calculate.strategy.tax'] = $app->protect(function($Order) use ($app) {
101 101
                 $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy();
102 102
                 $Strategy->setApplication($app);
103 103
                 $Strategy->setOrder($Order);
104 104
                 return $Strategy;
105 105
         });
106 106
 
107
-        $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) {
107
+        $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) {
108 108
                 $PaymentMethod = new $clazz;
109 109
                 $PaymentMethod->setApplication($app);
110 110
                 $PaymentMethod->setFormType($form);
111 111
                 return $PaymentMethod;
112 112
         });
113 113
 
114
-        $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) {
114
+        $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) {
115 115
                 $PaymentMethod = new $clazz;
116 116
                 $PaymentMethod->setApplication($app);
117 117
                 $PaymentMethod->setFormType($form);
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
                 return $PaymentMethod;
120 120
         });
121 121
 
122
-        $app['eccube.helper.order'] = function ($app) {
122
+        $app['eccube.helper.order'] = function($app) {
123 123
             return new OrderHelper($app);
124 124
         };
125 125
 
126
-        $app['eccube.service.csv.export'] = function () use ($app) {
126
+        $app['eccube.service.csv.export'] = function() use ($app) {
127 127
             $csvService = new \Eccube\Service\CsvExportService();
128 128
             $csvService->setEntityManager($app['orm.em']);
129 129
             $csvService->setConfig($app['config']);
@@ -135,206 +135,206 @@  discard block
 block discarded – undo
135 135
 
136 136
             return $csvService;
137 137
         };
138
-        $app['eccube.service.shopping'] = function () use ($app) {
138
+        $app['eccube.service.shopping'] = function() use ($app) {
139 139
             return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']);
140 140
         };
141 141
 
142 142
         // Repository
143
-        $app['eccube.repository.master.authority'] = function () use ($app) {
143
+        $app['eccube.repository.master.authority'] = function() use ($app) {
144 144
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority');
145 145
         };
146
-        $app['eccube.repository.master.tag'] = function () use ($app) {
146
+        $app['eccube.repository.master.tag'] = function() use ($app) {
147 147
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag');
148 148
         };
149
-        $app['eccube.repository.master.pref'] = function () use ($app) {
149
+        $app['eccube.repository.master.pref'] = function() use ($app) {
150 150
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref');
151 151
         };
152
-        $app['eccube.repository.master.sex'] = function () use ($app) {
152
+        $app['eccube.repository.master.sex'] = function() use ($app) {
153 153
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex');
154 154
         };
155
-        $app['eccube.repository.master.disp'] = function () use ($app) {
155
+        $app['eccube.repository.master.disp'] = function() use ($app) {
156 156
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp');
157 157
         };
158
-        $app['eccube.repository.master.product_type'] = function () use ($app) {
158
+        $app['eccube.repository.master.product_type'] = function() use ($app) {
159 159
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType');
160 160
         };
161
-        $app['eccube.repository.master.page_max'] = function () use ($app) {
161
+        $app['eccube.repository.master.page_max'] = function() use ($app) {
162 162
             return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax');
163 163
         };
164
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
164
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
165 165
         };
166
-        $app['eccube.repository.master.product_list_max'] = function () use ($app) {
166
+        $app['eccube.repository.master.product_list_max'] = function() use ($app) {
167 167
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax');
168 168
         };
169
-        $app['eccube.repository.master.product_list_order_by'] = function () use ($app) {
169
+        $app['eccube.repository.master.product_list_order_by'] = function() use ($app) {
170 170
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy');
171 171
         };
172
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
172
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
173 173
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
174 174
         };
175
-        $app['eccube.repository.master.device_type'] = function () use ($app) {
175
+        $app['eccube.repository.master.device_type'] = function() use ($app) {
176 176
             return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType');
177 177
         };
178
-        $app['eccube.repository.master.csv_type'] = function () use ($app) {
178
+        $app['eccube.repository.master.csv_type'] = function() use ($app) {
179 179
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType');
180 180
         };
181
-        $app['eccube.repository.master.order_item_type'] = function () use ($app) {
181
+        $app['eccube.repository.master.order_item_type'] = function() use ($app) {
182 182
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderItemType');
183 183
         };
184 184
 
185
-        $app['eccube.repository.delivery'] = function () use ($app) {
185
+        $app['eccube.repository.delivery'] = function() use ($app) {
186 186
             return $app['orm.em']->getRepository('Eccube\Entity\Delivery');
187 187
         };
188
-        $app['eccube.repository.delivery_date'] = function () use ($app) {
188
+        $app['eccube.repository.delivery_date'] = function() use ($app) {
189 189
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate');
190 190
         };
191
-        $app['eccube.repository.delivery_fee'] = function () use ($app) {
191
+        $app['eccube.repository.delivery_fee'] = function() use ($app) {
192 192
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee');
193 193
         };
194
-        $app['eccube.repository.delivery_time'] = function () use ($app) {
194
+        $app['eccube.repository.delivery_time'] = function() use ($app) {
195 195
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime');
196 196
         };
197
-        $app['eccube.repository.payment'] = function () use ($app) {
197
+        $app['eccube.repository.payment'] = function() use ($app) {
198 198
             return $app['orm.em']->getRepository('Eccube\Entity\Payment');
199 199
         };
200
-        $app['eccube.repository.payment_option'] = function () use ($app) {
200
+        $app['eccube.repository.payment_option'] = function() use ($app) {
201 201
             return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption');
202 202
         };
203
-        $app['eccube.repository.category'] = function () use ($app) {
203
+        $app['eccube.repository.category'] = function() use ($app) {
204 204
             $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category');
205 205
             $CategoryRepository->setApplication($app);
206 206
 
207 207
             return $CategoryRepository;
208 208
         };
209
-        $app['eccube.repository.customer'] = function () use ($app) {
209
+        $app['eccube.repository.customer'] = function() use ($app) {
210 210
             $customerRepository = $app['orm.em']->getRepository('Eccube\Entity\Customer');
211 211
             $customerRepository->setApplication($app);
212 212
             return $customerRepository;
213 213
         };
214
-        $app['eccube.repository.news'] = function () use ($app) {
214
+        $app['eccube.repository.news'] = function() use ($app) {
215 215
             return $app['orm.em']->getRepository('Eccube\Entity\News');
216 216
         };
217
-        $app['eccube.repository.mail_history'] = function () use ($app) {
217
+        $app['eccube.repository.mail_history'] = function() use ($app) {
218 218
             return $app['orm.em']->getRepository('Eccube\Entity\MailHistory');
219 219
         };
220
-        $app['eccube.repository.member'] = function () use ($app) {
220
+        $app['eccube.repository.member'] = function() use ($app) {
221 221
             $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member');
222 222
             $memberRepository->setEncoderFactorty($app['security.encoder_factory']);
223 223
             return $memberRepository;
224 224
         };
225
-        $app['eccube.repository.order'] = function () use ($app) {
225
+        $app['eccube.repository.order'] = function() use ($app) {
226 226
             return $app['orm.em']->getRepository('Eccube\Entity\Order');
227 227
         };
228
-        $app['eccube.repository.product'] = function () use ($app) {
228
+        $app['eccube.repository.product'] = function() use ($app) {
229 229
             $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product');
230 230
             $productRepository->setApplication($app);
231 231
 
232 232
             return $productRepository;
233 233
         };
234
-        $app['eccube.repository.product_image'] = function () use ($app) {
234
+        $app['eccube.repository.product_image'] = function() use ($app) {
235 235
             return $app['orm.em']->getRepository('Eccube\Entity\ProductImage');
236 236
         };
237
-        $app['eccube.repository.product_class'] = function () use ($app) {
237
+        $app['eccube.repository.product_class'] = function() use ($app) {
238 238
             return $app['orm.em']->getRepository('Eccube\Entity\ProductClass');
239 239
         };
240
-        $app['eccube.repository.product_stock'] = function () use ($app) {
240
+        $app['eccube.repository.product_stock'] = function() use ($app) {
241 241
             return $app['orm.em']->getRepository('Eccube\Entity\ProductStock');
242 242
         };
243
-        $app['eccube.repository.product_tag'] = function () use ($app) {
243
+        $app['eccube.repository.product_tag'] = function() use ($app) {
244 244
             return $app['orm.em']->getRepository('Eccube\Entity\ProductTag');
245 245
         };
246
-        $app['eccube.repository.class_name'] = function () use ($app) {
246
+        $app['eccube.repository.class_name'] = function() use ($app) {
247 247
             return $app['orm.em']->getRepository('Eccube\Entity\ClassName');
248 248
         };
249
-        $app['eccube.repository.class_category'] = function () use ($app) {
249
+        $app['eccube.repository.class_category'] = function() use ($app) {
250 250
             return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory');
251 251
         };
252
-        $app['eccube.repository.customer_favorite_product'] = function () use ($app) {
252
+        $app['eccube.repository.customer_favorite_product'] = function() use ($app) {
253 253
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct');
254 254
         };
255
-        $app['eccube.repository.base_info'] = function () use ($app) {
255
+        $app['eccube.repository.base_info'] = function() use ($app) {
256 256
             $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo');
257 257
             $BaseInfoRepository->setApplication($app);
258 258
 
259 259
             return $BaseInfoRepository;
260 260
         };
261
-        $app['eccube.repository.tax_rule'] = function () use ($app) {
261
+        $app['eccube.repository.tax_rule'] = function() use ($app) {
262 262
             $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule');
263 263
             $taxRuleRepository->setApplication($app);
264 264
 
265 265
             return $taxRuleRepository;
266 266
         };
267
-        $app['eccube.repository.page_layout'] = function () use ($app) {
267
+        $app['eccube.repository.page_layout'] = function() use ($app) {
268 268
             $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout');
269 269
             $pageLayoutRepository->setApplication($app);
270 270
 
271 271
             return $pageLayoutRepository;
272 272
         };
273
-        $app['eccube.repository.block'] = function () use ($app) {
273
+        $app['eccube.repository.block'] = function() use ($app) {
274 274
             $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block');
275 275
             $blockRepository->setApplication($app);
276 276
 
277 277
             return $blockRepository;
278 278
         };
279
-        $app['eccube.repository.order'] = function () use ($app) {
279
+        $app['eccube.repository.order'] = function() use ($app) {
280 280
             $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order');
281 281
             $orderRepository->setApplication($app);
282 282
 
283 283
             return $orderRepository;
284 284
         };
285
-        $app['eccube.repository.customer_address'] = function () use ($app) {
285
+        $app['eccube.repository.customer_address'] = function() use ($app) {
286 286
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress');
287 287
         };
288
-        $app['eccube.repository.shipping'] = function () use ($app) {
288
+        $app['eccube.repository.shipping'] = function() use ($app) {
289 289
             return $app['orm.em']->getRepository('Eccube\Entity\Shipping');
290 290
         };
291
-        $app['eccube.repository.shipment_item'] = function () use ($app) {
291
+        $app['eccube.repository.shipment_item'] = function() use ($app) {
292 292
             return $app['orm.em']->getRepository('Eccube\Entity\ShipmentItem');
293 293
         };
294
-        $app['eccube.repository.customer_status'] = function () use ($app) {
294
+        $app['eccube.repository.customer_status'] = function() use ($app) {
295 295
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus');
296 296
         };
297
-        $app['eccube.repository.order_status'] = function () use ($app) {
297
+        $app['eccube.repository.order_status'] = function() use ($app) {
298 298
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
299 299
         };
300
-        $app['eccube.repository.mail_template'] = function () use ($app) {
300
+        $app['eccube.repository.mail_template'] = function() use ($app) {
301 301
             return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate');
302 302
         };
303
-        $app['eccube.repository.csv'] = function () use ($app) {
303
+        $app['eccube.repository.csv'] = function() use ($app) {
304 304
             return $app['orm.em']->getRepository('Eccube\Entity\Csv');
305 305
         };
306
-        $app['eccube.repository.template'] = function () use ($app) {
306
+        $app['eccube.repository.template'] = function() use ($app) {
307 307
             return $app['orm.em']->getRepository('Eccube\Entity\Template');
308 308
         };
309
-        $app['eccube.repository.authority_role'] = function () use ($app) {
309
+        $app['eccube.repository.authority_role'] = function() use ($app) {
310 310
             return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole');
311 311
         };
312 312
 
313
-        $app['paginator'] = $app->protect(function () {
313
+        $app['paginator'] = $app->protect(function() {
314 314
             $paginator = new \Knp\Component\Pager\Paginator();
315 315
             $paginator->subscribe(new \Eccube\EventListener\PaginatorListener());
316 316
 
317 317
             return $paginator;
318 318
         });
319 319
 
320
-        $app['eccube.repository.help'] = function () use ($app) {
320
+        $app['eccube.repository.help'] = function() use ($app) {
321 321
             return $app['orm.em']->getRepository('Eccube\Entity\Help');
322 322
         };
323
-        $app['eccube.repository.plugin'] = function () use ($app) {
323
+        $app['eccube.repository.plugin'] = function() use ($app) {
324 324
             return $app['orm.em']->getRepository('Eccube\Entity\Plugin');
325 325
         };
326
-        $app['eccube.repository.plugin_event_handler'] = function () use ($app) {
326
+        $app['eccube.repository.plugin_event_handler'] = function() use ($app) {
327 327
             return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler');
328 328
         };
329
-        $app['eccube.repository.layout'] = function () use ($app) {
329
+        $app['eccube.repository.layout'] = function() use ($app) {
330 330
             return $app['orm.em']->getRepository('Eccube\Entity\Layout');
331 331
         };
332 332
 
333
-        $app['request_scope'] = function () {
333
+        $app['request_scope'] = function() {
334 334
             return new ParameterBag();
335 335
         };
336 336
         // TODO 使用するか検討
337
-        $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) {
337
+        $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) {
338 338
             $compiler
339 339
             ->addDebugInfo($node)
340 340
             ->write("echo 'Helloooooo ' . ")
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         });
346 346
         // TODO 使用するか検討
347
-        $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) {
347
+        $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) {
348 348
             $compiler
349 349
             ->addDebugInfo($node)
350 350
             ->write("echo 'jirooooooo ' . ")
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         });
356 356
 
357 357
         // TODO 使用するか検討
358
-        $app['eccube.twig.generic_node_names'] = function () use ($app) {
358
+        $app['eccube.twig.generic_node_names'] = function() use ($app) {
359 359
             return [
360 360
                 'hello',
361 361
                 'jiro',
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         };
365 365
 
366 366
         // TODO 使用するか検討
367
-        $app['twig_parsers'] = function () use ($app) {
367
+        $app['twig_parsers'] = function() use ($app) {
368 368
             $GenericTokenParsers = [];
369 369
             foreach ($app['eccube.twig.generic_node_names'] as $tagName) {
370 370
                 $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName);
@@ -373,20 +373,20 @@  discard block
 block discarded – undo
373 373
         };
374 374
 
375 375
         // TODO ServiceProvider から追加できるよう Collection にする
376
-        $app['eccube.twig.block.templates'] = function () {
376
+        $app['eccube.twig.block.templates'] = function() {
377 377
             return [
378 378
                 'render_block.twig',
379 379
             ];
380 380
         };
381 381
 
382 382
         // Form\Type
383
-        $app->extend('form.type.extensions', function ($extensions) use ($app) {
383
+        $app->extend('form.type.extensions', function($extensions) use ($app) {
384 384
             $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension();
385 385
             $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension();
386 386
             $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']);
387 387
             return $extensions;
388 388
         });
389
-        $app->extend('form.types', function ($types) use ($app) {
389
+        $app->extend('form.types', function($types) use ($app) {
390 390
             $types[] = new \Eccube\Form\Type\NameType($app['config']);
391 391
             $types[] = new \Eccube\Form\Type\KanaType($app['config']);
392 392
             $types[] = new \Eccube\Form\Type\TelType($app['config']);
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
             return $types;
490 490
         });
491 491
         $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener());
492
-        $app['eccube.queries'] = function () {
492
+        $app['eccube.queries'] = function() {
493 493
             return new \Eccube\Doctrine\Query\Queries();
494 494
         };
495 495
         // TODO QueryCustomizerの追加方法は要検討
Please login to merge, or discard this patch.
src/Eccube/Application/TwigTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@
 block discarded – undo
40 40
         $eventName = $view;
41 41
         if ($this->isAdminRequest()) {
42 42
             // 管理画面の場合、event名に「Admin/」を付ける
43
-            $eventName = 'Admin/' . $view;
43
+            $eventName = 'Admin/'.$view;
44 44
         }
45
-        $this['monolog']->debug('Template Event Name : ' . $eventName);
45
+        $this['monolog']->debug('Template Event Name : '.$eventName);
46 46
 
47 47
         // $this['eccube.event.dispatcher']->dispatch($eventName, $event);
48 48
 
49 49
         if ($response instanceof StreamedResponse) {
50
-            $response->setCallback(function () use ($twig, $view, $parameters) {
50
+            $response->setCallback(function() use ($twig, $view, $parameters) {
51 51
                 $twig->display($view, $parameters);
52 52
             });
53 53
         } else {
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/LogServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
         $app->register(new \Silex\Provider\MonologServiceProvider());
23 23
 
24 24
         // Log
25
-        $app['eccube.logger'] = function ($app) {
25
+        $app['eccube.logger'] = function($app) {
26 26
             return new Logger($app);
27 27
         };
28 28
 
29 29
         // ヘルパー作成
30
-        $app['eccube.monolog.helper'] = function ($app) {
30
+        $app['eccube.monolog.helper'] = function($app) {
31 31
             return new LogHelper($app);
32 32
         };
33 33
 
34 34
         // ログクラス作成ファクトリー
35
-        $app['eccube.monolog.factory'] = $app->protect(function (array $channelValues) use ($app) {
35
+        $app['eccube.monolog.factory'] = $app->protect(function(array $channelValues) use ($app) {
36 36
 
37 37
             $log = new $app['monolog.logger.class']($channelValues['name']);
38 38
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         // monologの設定は除外
48 48
         unset($channels['monolog']);
49 49
         foreach ($channels as $channel => $channelValues) {
50
-            $app['monolog.logger.'.$channel] = function ($app) use ($channelValues) {
50
+            $app['monolog.logger.'.$channel] = function($app) use ($channelValues) {
51 51
                 return $app['eccube.monolog.factory']($channelValues);
52 52
             };
53 53
         }
@@ -55,15 +55,15 @@  discard block
 block discarded – undo
55 55
         // MonologServiceProviderで定義されているmonolog.handlerの置換
56 56
         $channelValues = $app['config']['log']['channel']['monolog'];
57 57
         $app['monolog.name'] = $channelValues['name'];
58
-        $app['monolog.handler'] = function ($app) use ($channelValues) {
58
+        $app['monolog.handler'] = function($app) use ($channelValues) {
59 59
             return $app['eccube.monolog.helper']->getHandler($channelValues);
60 60
         };
61 61
 
62
-        $app['eccube.monolog.listener'] = function () use ($app) {
62
+        $app['eccube.monolog.listener'] = function() use ($app) {
63 63
             return new LogListener($app['eccube.logger']);
64 64
         };
65 65
 
66
-        $app['listener.requestdump'] = function ($app) {
66
+        $app['listener.requestdump'] = function($app) {
67 67
             return new \Eccube\EventListener\RequestDumpListener($app);
68 68
         };
69 69
     }
Please login to merge, or discard this patch.