@@ -106,7 +106,7 @@ |
||
106 | 106 | )); |
107 | 107 | $addCartForm = $builder->getForm(); |
108 | 108 | |
109 | - if ($request->getMethod() === 'POST' && (string)$Product->getId() === $request->get('product_id')) { |
|
109 | + if ($request->getMethod() === 'POST' && (string) $Product->getId() === $request->get('product_id')) { |
|
110 | 110 | $addCartForm->handleRequest($request); |
111 | 111 | |
112 | 112 | if ($addCartForm->isValid()) { |
@@ -20,32 +20,32 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function addSuccess($message, $namespace = 'front') |
22 | 22 | { |
23 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message); |
|
23 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | public function addError($message, $namespace = 'front') |
27 | 27 | { |
28 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message); |
|
28 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function addDanger($message, $namespace = 'front') |
32 | 32 | { |
33 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message); |
|
33 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function addWarning($message, $namespace = 'front') |
37 | 37 | { |
38 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message); |
|
38 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | public function addInfo($message, $namespace = 'front') |
42 | 42 | { |
43 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message); |
|
43 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function addRequestError($message, $namespace = 'front') |
47 | 47 | { |
48 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message); |
|
48 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function clearMessage() |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (is_null($namespace)) { |
65 | 65 | $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath); |
66 | 66 | } else { |
67 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath); |
|
67 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -234,14 +234,14 @@ discard block |
||
234 | 234 | $eventName = $view; |
235 | 235 | if ($this->isAdminRequest()) { |
236 | 236 | // 管理画面の場合、event名に「Admin/」を付ける |
237 | - $eventName = 'Admin/' . $view; |
|
237 | + $eventName = 'Admin/'.$view; |
|
238 | 238 | } |
239 | - $this['monolog']->debug('Template Event Name : ' . $eventName); |
|
239 | + $this['monolog']->debug('Template Event Name : '.$eventName); |
|
240 | 240 | |
241 | 241 | $this['eccube.event.dispatcher']->dispatch($eventName, $event); |
242 | 242 | |
243 | 243 | if ($response instanceof StreamedResponse) { |
244 | - $response->setCallback(function () use ($twig, $view, $parameters) { |
|
244 | + $response->setCallback(function() use ($twig, $view, $parameters) { |
|
245 | 245 | $twig->display($view, $parameters); |
246 | 246 | }); |
247 | 247 | } else { |
@@ -88,7 +88,7 @@ |
||
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()) |
@@ -138,7 +138,7 @@ |
||
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( |
@@ -106,7 +106,7 @@ |
||
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 |
@@ -529,6 +529,9 @@ discard block |
||
529 | 529 | /** |
530 | 530 | * 登録、更新時のエラー画面表示 |
531 | 531 | * |
532 | + * @param Application $app |
|
533 | + * @param boolean $not_product_class |
|
534 | + * @param \Symfony\Component\Form\FormInterface $classForm |
|
532 | 535 | */ |
533 | 536 | protected function render($app, $Product, $ProductClass, $not_product_class, $classForm, $error = null) |
534 | 537 | { |
@@ -580,6 +583,7 @@ discard block |
||
580 | 583 | |
581 | 584 | /** |
582 | 585 | * 規格1と規格2を組み合わせた商品規格を作成 |
586 | + * @param Application $app |
|
583 | 587 | */ |
584 | 588 | private function createProductClasses($app, Product $Product, ClassName $ClassName1 = null, ClassName $ClassName2 = null) |
585 | 589 | { |
@@ -667,6 +671,7 @@ discard block |
||
667 | 671 | * |
668 | 672 | * @param $productClassDest コピー先となる商品規格 |
669 | 673 | * @param $productClassOrig コピー元となる商品規格 |
674 | + * @param Application $app |
|
670 | 675 | */ |
671 | 676 | private function setDefualtProductClass($app, $productClassDest, $productClassOrig) { |
672 | 677 | $productClassDest->setDeliveryDate($productClassOrig->getDeliveryDate()); |
@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | // ファイル生成・更新 |
114 | 114 | $tplDir = $app['config']['block_realdir']; |
115 | 115 | |
116 | - $filePath = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
116 | + $filePath = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
117 | 117 | |
118 | 118 | $fs = new Filesystem(); |
119 | 119 | $fs->dumpFile($filePath, $form->get('block_html')->getData()); |
120 | 120 | // 更新でファイル名を変更した場合、以前のファイルを削除 |
121 | 121 | if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) { |
122 | - $oldFilePath = $tplDir . '/' . $previous_filename . '.twig'; |
|
122 | + $oldFilePath = $tplDir.'/'.$previous_filename.'.twig'; |
|
123 | 123 | if ($fs->exists($oldFilePath)) { |
124 | 124 | $fs->remove($oldFilePath); |
125 | 125 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る |
172 | 172 | if ($Block->getDeletableFlg() > 0) { |
173 | 173 | $tplDir = $app['config']['block_realdir']; |
174 | - $file = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
174 | + $file = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
175 | 175 | $fs = new Filesystem(); |
176 | 176 | if ($fs->exists($file)) { |
177 | 177 | $fs->remove($file); |
@@ -102,7 +102,7 @@ |
||
102 | 102 | if (count($allowHost) > 0) { |
103 | 103 | $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost))); |
104 | 104 | } |
105 | - $form->get('force_ssl')->setData((bool)$app['config']['force_ssl']); |
|
105 | + $form->get('force_ssl')->setData((bool) $app['config']['force_ssl']); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return $app->render('Setting/System/security.twig', array( |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | // path.ymlの更新 |
23 | 23 | $app = Application::getInstance(); |
24 | - $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml'; |
|
24 | + $file = $app['config']['root_dir'].'/app/config/eccube/path.yml'; |
|
25 | 25 | $config = Yaml::parse(file_get_contents($file)); |
26 | 26 | |
27 | 27 | if (!array_key_exists('public_path', $config)) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | public function register(Application $app) |
68 | 68 | { |
69 | - $app['var_dumper.cloner'] = $app->share(function ($app) { |
|
69 | + $app['var_dumper.cloner'] = $app->share(function($app) { |
|
70 | 70 | $cloner = new VarCloner(); |
71 | 71 | |
72 | 72 | if (isset($app['debug.max_items'])) { |
@@ -80,23 +80,23 @@ discard block |
||
80 | 80 | return $cloner; |
81 | 81 | }); |
82 | 82 | |
83 | - $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function ($templates) { |
|
83 | + $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function($templates) { |
|
84 | 84 | return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig'))); |
85 | 85 | })); |
86 | 86 | |
87 | - $app['data_collector.dump'] = $app->share(function ($app) { |
|
87 | + $app['data_collector.dump'] = $app->share(function($app) { |
|
88 | 88 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format']); |
89 | 89 | }); |
90 | 90 | |
91 | - $app['data_collectors'] = $app->share($app->extend('data_collectors', function ($collectors, $app) { |
|
92 | - $collectors['dump'] = $app->share(function ($app) { |
|
91 | + $app['data_collectors'] = $app->share($app->extend('data_collectors', function($collectors, $app) { |
|
92 | + $collectors['dump'] = $app->share(function($app) { |
|
93 | 93 | return $app['data_collector.dump']; |
94 | 94 | }); |
95 | 95 | |
96 | 96 | return $collectors; |
97 | 97 | })); |
98 | 98 | |
99 | - $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) { |
|
99 | + $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { |
|
100 | 100 | if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { |
101 | 101 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); |
102 | 102 | } |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | return $twig; |
105 | 105 | })); |
106 | 106 | |
107 | - $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) { |
|
107 | + $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function($loader, $app) { |
|
108 | 108 | $loader->addPath($app['debug.templates_path'], 'Debug'); |
109 | 109 | |
110 | 110 | return $loader; |
111 | 111 | })); |
112 | 112 | |
113 | - $app['debug.templates_path'] = function () { |
|
113 | + $app['debug.templates_path'] = function() { |
|
114 | 114 | $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); |
115 | 115 | |
116 | 116 | return dirname(dirname($r->getFileName())).'/Resources/views'; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | // This code is here to lazy load the dump stack. This default |
123 | 123 | // configuration for CLI mode is overridden in HTTP mode on |
124 | 124 | // 'kernel.request' event |
125 | - VarDumper::setHandler(function ($var) use ($app) { |
|
125 | + VarDumper::setHandler(function($var) use ($app) { |
|
126 | 126 | $dumper = new CliDumper(); |
127 | 127 | $dumper->dump($app['var_dumper.cloner']->cloneVar($var)); |
128 | 128 | }); |
@@ -307,7 +307,6 @@ |
||
307 | 307 | * 対象プラグインの README を返却します。 |
308 | 308 | * |
309 | 309 | * @param Application $app |
310 | - * @param unknown $code |
|
311 | 310 | */ |
312 | 311 | public function readme(Application $app, Request $request, $id) |
313 | 312 | { |
@@ -36,8 +36,6 @@ |
||
36 | 36 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
37 | 37 | use Symfony\Component\Routing\Exception\RouteNotFoundException; |
38 | 38 | use Symfony\Component\Validator\Constraints as Assert; |
39 | -use Symfony\Component\Form\FormError; |
|
40 | -use Monolog\Logger; |
|
41 | 39 | |
42 | 40 | class PluginController extends AbstractController |
43 | 41 | { |