Completed
Pull Request — experimental/3.1 (#2435)
by chihiro
84:29 queued 21:04
created
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.
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.
Doc Comments   +5 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
     {
@@ -58,6 +59,9 @@  discard block
 block discarded – undo
58 59
         $this->addWarning('admin.delete.warning', 'admin');
59 60
     }
60 61
 
62
+    /**
63
+     * @param string $targetPath
64
+     */
61 65
     public function setLoginTargetPath($targetPath, $namespace = null)
62 66
     {
63 67
         if (is_null($namespace)) {
@@ -109,7 +113,7 @@  discard block
 block discarded – undo
109 113
      * @param string $path フォワード先のパス
110 114
      * @param array $requestParameters
111 115
      * @param Response $response
112
-     * @return Application
116
+     * @return ApplicationTrait
113 117
      */
114 118
     public function forwardChain($path, array $requestParameters = [], Response &$response = null)
115 119
     {
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   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -61,31 +61,31 @@  discard block
 block discarded – undo
61 61
     public function register(Container $app)
62 62
     {
63 63
         // Service
64
-        $app['eccube.service.system'] = function () use ($app) {
64
+        $app['eccube.service.system'] = function() use ($app) {
65 65
             return new \Eccube\Service\SystemService($app);
66 66
         };
67
-        $app['view'] = function () use ($app) {
67
+        $app['view'] = function() use ($app) {
68 68
             return $app['twig'];
69 69
         };
70
-        $app['eccube.service.cart'] = function () use ($app) {
70
+        $app['eccube.service.cart'] = function() use ($app) {
71 71
             return new \Eccube\Service\CartService($app['session'], $app['orm.em']);
72 72
         };
73
-        $app['eccube.service.order'] = function () use ($app) {
73
+        $app['eccube.service.order'] = function() use ($app) {
74 74
             return new \Eccube\Service\OrderService($app);
75 75
         };
76
-        $app['eccube.service.tax_rule'] = function () use ($app) {
76
+        $app['eccube.service.tax_rule'] = function() use ($app) {
77 77
             return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']);
78 78
         };
79
-        $app['eccube.service.plugin'] = function () use ($app) {
79
+        $app['eccube.service.plugin'] = function() use ($app) {
80 80
             return new \Eccube\Service\PluginService($app);
81 81
         };
82
-        $app['eccube.service.mail'] = function () use ($app) {
82
+        $app['eccube.service.mail'] = function() use ($app) {
83 83
             return new \Eccube\Service\MailService($app);
84 84
         };
85
-        $app['eccube.calculate.context'] = function () use ($app) {
85
+        $app['eccube.calculate.context'] = function() use ($app) {
86 86
                 return new \Eccube\Service\Calculator\CalculateContext();
87 87
         };
88
-        $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) {
88
+        $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) {
89 89
                 $Service = new \Eccube\Service\CalculateService($Order, $Customer);
90 90
                 $Context = $app['eccube.calculate.context'];
91 91
                 $app['eccube.calculate.strategies']->setOrder($Order);
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
                 return $Service;
96 96
         });
97 97
 
98
-        $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) {
98
+        $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) {
99 99
                 $Service = new $clazz;
100 100
                 $Service->setApplication($app);
101 101
                 return $Service;
102 102
         });
103 103
 
104
-        $app['eccube.calculate.strategies'] = function () use ($app) {
104
+        $app['eccube.calculate.strategies'] = function() use ($app) {
105 105
             $Collection = new \Eccube\Service\Calculator\CalculateStrategyCollection();
106 106
             $Collection->setApplication($app);
107 107
             //$Collection->setOrder($Order);
@@ -114,47 +114,47 @@  discard block
 block discarded – undo
114 114
             $Collection->add($app['eccube.calculate.strategy.calculate_total']);
115 115
             return $Collection;
116 116
         };
117
-        $app['eccube.calculate.strategy.shipping'] = function () use ($app) {
117
+        $app['eccube.calculate.strategy.shipping'] = function() use ($app) {
118 118
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy();
119 119
                 $Strategy->setApplication($app);
120 120
                 return $Strategy;
121 121
         };
122
-        $app['eccube.calculate.strategy.charge'] = function () use ($app) {
122
+        $app['eccube.calculate.strategy.charge'] = function() use ($app) {
123 123
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ChargeStrategy();
124 124
                 $Strategy->setApplication($app);
125 125
                 return $Strategy;
126 126
         };
127 127
 
128
-        $app['eccube.calculate.strategy.tax'] = function () use ($app) {
128
+        $app['eccube.calculate.strategy.tax'] = function() use ($app) {
129 129
                 $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy();
130 130
                 $Strategy->setApplication($app);
131 131
                 return $Strategy;
132 132
         };
133 133
 
134
-        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function () use ($app) {
134
+        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function() use ($app) {
135 135
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateDeliveryFeeStrategy();
136 136
             $Strategy->setApplication($app);
137 137
             return $Strategy;
138 138
         };
139
-        $app['eccube.calculate.strategy.calculate_charge'] = function () use ($app) {
139
+        $app['eccube.calculate.strategy.calculate_charge'] = function() use ($app) {
140 140
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateChargeStrategy();
141 141
             $Strategy->setApplication($app);
142 142
             return $Strategy;
143 143
         };
144
-        $app['eccube.calculate.strategy.calculate_total'] = function () use ($app) {
144
+        $app['eccube.calculate.strategy.calculate_total'] = function() use ($app) {
145 145
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateTotalStrategy();
146 146
             $Strategy->setApplication($app);
147 147
             return $Strategy;
148 148
         };
149 149
 
150
-        $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) {
150
+        $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) {
151 151
                 $PaymentMethod = new $clazz;
152 152
                 $PaymentMethod->setApplication($app);
153 153
                 $PaymentMethod->setFormType($form);
154 154
                 return $PaymentMethod;
155 155
         });
156 156
 
157
-        $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) {
157
+        $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) {
158 158
                 $PaymentMethod = new $clazz;
159 159
                 $PaymentMethod->setApplication($app);
160 160
                 $PaymentMethod->setFormType($form);
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
                 return $PaymentMethod;
163 163
         });
164 164
 
165
-        $app['eccube.helper.order'] = function ($app) {
165
+        $app['eccube.helper.order'] = function($app) {
166 166
             return new OrderHelper($app);
167 167
         };
168 168
 
169
-        $app['eccube.service.csv.export'] = function () use ($app) {
169
+        $app['eccube.service.csv.export'] = function() use ($app) {
170 170
             $csvService = new \Eccube\Service\CsvExportService();
171 171
             $csvService->setEntityManager($app['orm.em']);
172 172
             $csvService->setConfig($app['config']);
@@ -178,206 +178,206 @@  discard block
 block discarded – undo
178 178
 
179 179
             return $csvService;
180 180
         };
181
-        $app['eccube.service.shopping'] = function () use ($app) {
181
+        $app['eccube.service.shopping'] = function() use ($app) {
182 182
             return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']);
183 183
         };
184 184
 
185 185
         // Repository
186
-        $app['eccube.repository.master.authority'] = function () use ($app) {
186
+        $app['eccube.repository.master.authority'] = function() use ($app) {
187 187
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority');
188 188
         };
189
-        $app['eccube.repository.master.tag'] = function () use ($app) {
189
+        $app['eccube.repository.master.tag'] = function() use ($app) {
190 190
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag');
191 191
         };
192
-        $app['eccube.repository.master.pref'] = function () use ($app) {
192
+        $app['eccube.repository.master.pref'] = function() use ($app) {
193 193
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref');
194 194
         };
195
-        $app['eccube.repository.master.sex'] = function () use ($app) {
195
+        $app['eccube.repository.master.sex'] = function() use ($app) {
196 196
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex');
197 197
         };
198
-        $app['eccube.repository.master.disp'] = function () use ($app) {
198
+        $app['eccube.repository.master.disp'] = function() use ($app) {
199 199
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp');
200 200
         };
201
-        $app['eccube.repository.master.product_type'] = function () use ($app) {
201
+        $app['eccube.repository.master.product_type'] = function() use ($app) {
202 202
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType');
203 203
         };
204
-        $app['eccube.repository.master.page_max'] = function () use ($app) {
204
+        $app['eccube.repository.master.page_max'] = function() use ($app) {
205 205
             return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax');
206 206
         };
207
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
207
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
208 208
         };
209
-        $app['eccube.repository.master.product_list_max'] = function () use ($app) {
209
+        $app['eccube.repository.master.product_list_max'] = function() use ($app) {
210 210
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax');
211 211
         };
212
-        $app['eccube.repository.master.product_list_order_by'] = function () use ($app) {
212
+        $app['eccube.repository.master.product_list_order_by'] = function() use ($app) {
213 213
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy');
214 214
         };
215
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
215
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
216 216
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
217 217
         };
218
-        $app['eccube.repository.master.device_type'] = function () use ($app) {
218
+        $app['eccube.repository.master.device_type'] = function() use ($app) {
219 219
             return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType');
220 220
         };
221
-        $app['eccube.repository.master.csv_type'] = function () use ($app) {
221
+        $app['eccube.repository.master.csv_type'] = function() use ($app) {
222 222
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType');
223 223
         };
224
-        $app['eccube.repository.master.order_item_type'] = function () use ($app) {
224
+        $app['eccube.repository.master.order_item_type'] = function() use ($app) {
225 225
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderItemType');
226 226
         };
227 227
 
228
-        $app['eccube.repository.delivery'] = function () use ($app) {
228
+        $app['eccube.repository.delivery'] = function() use ($app) {
229 229
             return $app['orm.em']->getRepository('Eccube\Entity\Delivery');
230 230
         };
231
-        $app['eccube.repository.delivery_date'] = function () use ($app) {
231
+        $app['eccube.repository.delivery_date'] = function() use ($app) {
232 232
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate');
233 233
         };
234
-        $app['eccube.repository.delivery_fee'] = function () use ($app) {
234
+        $app['eccube.repository.delivery_fee'] = function() use ($app) {
235 235
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee');
236 236
         };
237
-        $app['eccube.repository.delivery_time'] = function () use ($app) {
237
+        $app['eccube.repository.delivery_time'] = function() use ($app) {
238 238
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime');
239 239
         };
240
-        $app['eccube.repository.payment'] = function () use ($app) {
240
+        $app['eccube.repository.payment'] = function() use ($app) {
241 241
             return $app['orm.em']->getRepository('Eccube\Entity\Payment');
242 242
         };
243
-        $app['eccube.repository.payment_option'] = function () use ($app) {
243
+        $app['eccube.repository.payment_option'] = function() use ($app) {
244 244
             return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption');
245 245
         };
246
-        $app['eccube.repository.category'] = function () use ($app) {
246
+        $app['eccube.repository.category'] = function() use ($app) {
247 247
             $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category');
248 248
             $CategoryRepository->setApplication($app);
249 249
 
250 250
             return $CategoryRepository;
251 251
         };
252
-        $app['eccube.repository.customer'] = function () use ($app) {
252
+        $app['eccube.repository.customer'] = function() use ($app) {
253 253
             $customerRepository = $app['orm.em']->getRepository('Eccube\Entity\Customer');
254 254
             $customerRepository->setApplication($app);
255 255
             return $customerRepository;
256 256
         };
257
-        $app['eccube.repository.news'] = function () use ($app) {
257
+        $app['eccube.repository.news'] = function() use ($app) {
258 258
             return $app['orm.em']->getRepository('Eccube\Entity\News');
259 259
         };
260
-        $app['eccube.repository.mail_history'] = function () use ($app) {
260
+        $app['eccube.repository.mail_history'] = function() use ($app) {
261 261
             return $app['orm.em']->getRepository('Eccube\Entity\MailHistory');
262 262
         };
263
-        $app['eccube.repository.member'] = function () use ($app) {
263
+        $app['eccube.repository.member'] = function() use ($app) {
264 264
             $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member');
265 265
             $memberRepository->setEncoderFactorty($app['security.encoder_factory']);
266 266
             return $memberRepository;
267 267
         };
268
-        $app['eccube.repository.order'] = function () use ($app) {
268
+        $app['eccube.repository.order'] = function() use ($app) {
269 269
             return $app['orm.em']->getRepository('Eccube\Entity\Order');
270 270
         };
271
-        $app['eccube.repository.product'] = function () use ($app) {
271
+        $app['eccube.repository.product'] = function() use ($app) {
272 272
             $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product');
273 273
             $productRepository->setApplication($app);
274 274
 
275 275
             return $productRepository;
276 276
         };
277
-        $app['eccube.repository.product_image'] = function () use ($app) {
277
+        $app['eccube.repository.product_image'] = function() use ($app) {
278 278
             return $app['orm.em']->getRepository('Eccube\Entity\ProductImage');
279 279
         };
280
-        $app['eccube.repository.product_class'] = function () use ($app) {
280
+        $app['eccube.repository.product_class'] = function() use ($app) {
281 281
             return $app['orm.em']->getRepository('Eccube\Entity\ProductClass');
282 282
         };
283
-        $app['eccube.repository.product_stock'] = function () use ($app) {
283
+        $app['eccube.repository.product_stock'] = function() use ($app) {
284 284
             return $app['orm.em']->getRepository('Eccube\Entity\ProductStock');
285 285
         };
286
-        $app['eccube.repository.product_tag'] = function () use ($app) {
286
+        $app['eccube.repository.product_tag'] = function() use ($app) {
287 287
             return $app['orm.em']->getRepository('Eccube\Entity\ProductTag');
288 288
         };
289
-        $app['eccube.repository.class_name'] = function () use ($app) {
289
+        $app['eccube.repository.class_name'] = function() use ($app) {
290 290
             return $app['orm.em']->getRepository('Eccube\Entity\ClassName');
291 291
         };
292
-        $app['eccube.repository.class_category'] = function () use ($app) {
292
+        $app['eccube.repository.class_category'] = function() use ($app) {
293 293
             return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory');
294 294
         };
295
-        $app['eccube.repository.customer_favorite_product'] = function () use ($app) {
295
+        $app['eccube.repository.customer_favorite_product'] = function() use ($app) {
296 296
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct');
297 297
         };
298
-        $app['eccube.repository.base_info'] = function () use ($app) {
298
+        $app['eccube.repository.base_info'] = function() use ($app) {
299 299
             $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo');
300 300
             $BaseInfoRepository->setApplication($app);
301 301
 
302 302
             return $BaseInfoRepository;
303 303
         };
304
-        $app['eccube.repository.tax_rule'] = function () use ($app) {
304
+        $app['eccube.repository.tax_rule'] = function() use ($app) {
305 305
             $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule');
306 306
             $taxRuleRepository->setApplication($app);
307 307
 
308 308
             return $taxRuleRepository;
309 309
         };
310
-        $app['eccube.repository.page_layout'] = function () use ($app) {
310
+        $app['eccube.repository.page_layout'] = function() use ($app) {
311 311
             $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout');
312 312
             $pageLayoutRepository->setApplication($app);
313 313
 
314 314
             return $pageLayoutRepository;
315 315
         };
316
-        $app['eccube.repository.block'] = function () use ($app) {
316
+        $app['eccube.repository.block'] = function() use ($app) {
317 317
             $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block');
318 318
             $blockRepository->setApplication($app);
319 319
 
320 320
             return $blockRepository;
321 321
         };
322
-        $app['eccube.repository.order'] = function () use ($app) {
322
+        $app['eccube.repository.order'] = function() use ($app) {
323 323
             $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order');
324 324
             $orderRepository->setApplication($app);
325 325
 
326 326
             return $orderRepository;
327 327
         };
328
-        $app['eccube.repository.customer_address'] = function () use ($app) {
328
+        $app['eccube.repository.customer_address'] = function() use ($app) {
329 329
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress');
330 330
         };
331
-        $app['eccube.repository.shipping'] = function () use ($app) {
331
+        $app['eccube.repository.shipping'] = function() use ($app) {
332 332
             return $app['orm.em']->getRepository('Eccube\Entity\Shipping');
333 333
         };
334
-        $app['eccube.repository.shipment_item'] = function () use ($app) {
334
+        $app['eccube.repository.shipment_item'] = function() use ($app) {
335 335
             return $app['orm.em']->getRepository('Eccube\Entity\ShipmentItem');
336 336
         };
337
-        $app['eccube.repository.customer_status'] = function () use ($app) {
337
+        $app['eccube.repository.customer_status'] = function() use ($app) {
338 338
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus');
339 339
         };
340
-        $app['eccube.repository.order_status'] = function () use ($app) {
340
+        $app['eccube.repository.order_status'] = function() use ($app) {
341 341
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
342 342
         };
343
-        $app['eccube.repository.mail_template'] = function () use ($app) {
343
+        $app['eccube.repository.mail_template'] = function() use ($app) {
344 344
             return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate');
345 345
         };
346
-        $app['eccube.repository.csv'] = function () use ($app) {
346
+        $app['eccube.repository.csv'] = function() use ($app) {
347 347
             return $app['orm.em']->getRepository('Eccube\Entity\Csv');
348 348
         };
349
-        $app['eccube.repository.template'] = function () use ($app) {
349
+        $app['eccube.repository.template'] = function() use ($app) {
350 350
             return $app['orm.em']->getRepository('Eccube\Entity\Template');
351 351
         };
352
-        $app['eccube.repository.authority_role'] = function () use ($app) {
352
+        $app['eccube.repository.authority_role'] = function() use ($app) {
353 353
             return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole');
354 354
         };
355 355
 
356
-        $app['paginator'] = $app->protect(function () {
356
+        $app['paginator'] = $app->protect(function() {
357 357
             $paginator = new \Knp\Component\Pager\Paginator();
358 358
             $paginator->subscribe(new \Eccube\EventListener\PaginatorListener());
359 359
 
360 360
             return $paginator;
361 361
         });
362 362
 
363
-        $app['eccube.repository.help'] = function () use ($app) {
363
+        $app['eccube.repository.help'] = function() use ($app) {
364 364
             return $app['orm.em']->getRepository('Eccube\Entity\Help');
365 365
         };
366
-        $app['eccube.repository.plugin'] = function () use ($app) {
366
+        $app['eccube.repository.plugin'] = function() use ($app) {
367 367
             return $app['orm.em']->getRepository('Eccube\Entity\Plugin');
368 368
         };
369
-        $app['eccube.repository.plugin_event_handler'] = function () use ($app) {
369
+        $app['eccube.repository.plugin_event_handler'] = function() use ($app) {
370 370
             return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler');
371 371
         };
372
-        $app['eccube.repository.layout'] = function () use ($app) {
372
+        $app['eccube.repository.layout'] = function() use ($app) {
373 373
             return $app['orm.em']->getRepository('Eccube\Entity\Layout');
374 374
         };
375 375
 
376
-        $app['request_scope'] = function () {
376
+        $app['request_scope'] = function() {
377 377
             return new ParameterBag();
378 378
         };
379 379
         // TODO 使用するか検討
380
-        $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) {
380
+        $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) {
381 381
             $compiler
382 382
             ->addDebugInfo($node)
383 383
             ->write("echo 'Helloooooo ' . ")
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
         });
389 389
         // TODO 使用するか検討
390
-        $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) {
390
+        $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) {
391 391
             $compiler
392 392
             ->addDebugInfo($node)
393 393
             ->write("echo 'jirooooooo ' . ")
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         });
399 399
 
400 400
         // TODO 使用するか検討
401
-        $app['eccube.twig.generic_node_names'] = function () use ($app) {
401
+        $app['eccube.twig.generic_node_names'] = function() use ($app) {
402 402
             return [
403 403
                 'hello',
404 404
                 'jiro',
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         };
408 408
 
409 409
         // TODO 使用するか検討
410
-        $app['twig_parsers'] = function () use ($app) {
410
+        $app['twig_parsers'] = function() use ($app) {
411 411
             $GenericTokenParsers = [];
412 412
             foreach ($app['eccube.twig.generic_node_names'] as $tagName) {
413 413
                 $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName);
@@ -416,20 +416,20 @@  discard block
 block discarded – undo
416 416
         };
417 417
 
418 418
         // TODO ServiceProvider から追加できるよう Collection にする
419
-        $app['eccube.twig.block.templates'] = function () {
419
+        $app['eccube.twig.block.templates'] = function() {
420 420
             return [
421 421
                 'render_block.twig',
422 422
             ];
423 423
         };
424 424
 
425 425
         // Form\Type
426
-        $app->extend('form.type.extensions', function ($extensions) use ($app) {
426
+        $app->extend('form.type.extensions', function($extensions) use ($app) {
427 427
             $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension();
428 428
             $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension();
429 429
             $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']);
430 430
             return $extensions;
431 431
         });
432
-        $app->extend('form.types', function ($types) use ($app) {
432
+        $app->extend('form.types', function($types) use ($app) {
433 433
             $types[] = new \Eccube\Form\Type\NameType($app['config']);
434 434
             $types[] = new \Eccube\Form\Type\KanaType($app['config']);
435 435
             $types[] = new \Eccube\Form\Type\TelType($app['config']);
@@ -533,17 +533,17 @@  discard block
 block discarded – undo
533 533
             return $types;
534 534
         });
535 535
         $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener());
536
-        $app['eccube.queries'] = function () {
536
+        $app['eccube.queries'] = function() {
537 537
             return new \Eccube\Doctrine\Query\Queries();
538 538
         };
539 539
         // TODO QueryCustomizerの追加方法は要検討
540 540
         $app['eccube.queries']->addCustomizer(new \Acme\Entity\AdminProductListCustomizer());
541 541
 
542
-        $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null) {
542
+        $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null) {
543 543
             return new PurchaseContext($origin);
544 544
         });
545 545
 
546
-        $app['eccube.purchase.flow.cart.item_processors'] = function ($app) {
546
+        $app['eccube.purchase.flow.cart.item_processors'] = function($app) {
547 547
             $processors = new ArrayCollection();
548 548
             $processors->add(new DeletedProductValidator());
549 549
             $processors->add(new DisplayStatusValidator());
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
             return $processors;
554 554
         };
555 555
 
556
-        $app['eccube.purchase.flow.cart.holder_processors'] = function ($app) {
556
+        $app['eccube.purchase.flow.cart.holder_processors'] = function($app) {
557 557
             $processors = new ArrayCollection();
558 558
             $processors->add(new PaymentProcessor($app));
559 559
             $processors->add(new PaymentTotalLimitValidator($app['config']['max_total_fee']));
@@ -564,14 +564,14 @@  discard block
 block discarded – undo
564 564
         };
565 565
 
566 566
         // example
567
-        $app->extend('eccube.purchase.flow.cart.item_processors', function ($processors, $app) {
567
+        $app->extend('eccube.purchase.flow.cart.item_processors', function($processors, $app) {
568 568
 
569 569
             $processors->add(new StockValidator());
570 570
 
571 571
             return $processors;
572 572
         });
573 573
 
574
-        $app['eccube.purchase.flow.cart'] = function ($app) {
574
+        $app['eccube.purchase.flow.cart'] = function($app) {
575 575
             $flow = new PurchaseFlow();
576 576
             $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']);
577 577
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']);
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
             return $flow;
580 580
         };
581 581
 
582
-        $app['eccube.purchase.flow.shopping'] = function () use ($app) {
582
+        $app['eccube.purchase.flow.shopping'] = function() use ($app) {
583 583
             $flow = new PurchaseFlow();
584 584
             $flow->addItemProcessor(new StockValidator());
585 585
             $flow->addItemProcessor(new DisplayStatusValidator());
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
             return $flow;
590 590
         };
591 591
 
592
-        $app['eccube.purchase.flow.order'] = function () use ($app) {
592
+        $app['eccube.purchase.flow.order'] = function() use ($app) {
593 593
             $flow = new PurchaseFlow();
594 594
             $flow->addItemProcessor(new StockValidator());
595 595
             $flow->addItemHolderProcessor(new PaymentTotalLimitValidator($app['config']['max_total_fee']));
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.
src/Eccube/ServiceProvider/InstallServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
      */
43 43
     public function register(Container $app)
44 44
     {
45
-        $app->extend('form.type.extensions', function ($extensions) use ($app) {
45
+        $app->extend('form.type.extensions', function($extensions) use ($app) {
46 46
             $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension();
47 47
 
48 48
             return $extensions;
49 49
         });
50 50
 
51
-        $app->extend('form.types', function ($types) use ($app) {
51
+        $app->extend('form.types', function($types) use ($app) {
52 52
             $types[] = new \Eccube\Form\Type\Install\Step1Type($app);
53 53
             $types[] = new \Eccube\Form\Type\Install\Step3Type($app);
54 54
             $types[] = new \Eccube\Form\Type\Install\Step4Type($app);
Please login to merge, or discard this patch.