@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | new Assert\Callback(array($this, 'validate')), |
97 | 97 | ), |
98 | 98 | )) |
99 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
99 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
100 | 100 | $form = $event->getForm(); |
101 | 101 | $data = $form->getData(); |
102 | 102 | try { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
122 | 122 | $conn->connect(); |
123 | 123 | } catch (\Exception $e) { |
124 | - $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage())); |
|
124 | + $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage())); |
|
125 | 125 | } |
126 | 126 | }); |
127 | 127 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function validate($data, ExecutionContext $context, $param = null) |
138 | 138 | { |
139 | 139 | $parameters = $this->app['request']->get('install_step4'); |
140 | - if ($parameters['database'] != 'pdo_sqlite'){ |
|
140 | + if ($parameters['database'] != 'pdo_sqlite') { |
|
141 | 141 | $context->validateValue($data, array( |
142 | 142 | new Assert\NotBlank() |
143 | 143 | )); |
@@ -454,7 +454,7 @@ |
||
454 | 454 | foreach ($finder as $dir) { |
455 | 455 | if (file_exists($dir->getRealPath().'/config.yml')) { |
456 | 456 | $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml')); |
457 | - }else{ |
|
457 | + } else{ |
|
458 | 458 | $error = 'Application::initDoctrine : config.yamlがみつかりません'.$dir->getRealPath(); |
459 | 459 | $this->log($error, array(), Logger::WARNING); |
460 | 460 | continue; |
@@ -725,7 +725,7 @@ |
||
725 | 725 | * 成功 : trueを返却 |
726 | 726 | * 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() |
727 | 727 | * 備考 : app['debug']がtrueの際は処理を行わない |
728 | - * @return boolean true |
|
728 | + * @return null|boolean true |
|
729 | 729 | * |
730 | 730 | */ |
731 | 731 | protected function checkDatabaseConnection() |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | foreach ($finder as $dir) { |
455 | 455 | if (file_exists($dir->getRealPath().'/config.yml')) { |
456 | 456 | $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml')); |
457 | - }else{ |
|
457 | + } else { |
|
458 | 458 | $error = 'Application::initDoctrine : config.yamlがみつかりません'.$dir->getRealPath(); |
459 | 459 | $this->log($error, array(), Logger::WARNING); |
460 | 460 | continue; |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | //config.ymlのないディレクトリは無視する |
670 | 670 | try { |
671 | 671 | $this['eccube.service.plugin']->checkPluginArchiveContent($dir->getRealPath()); |
672 | - } catch(\Eccube\Exception\PluginException $e) { |
|
672 | + } catch (\Eccube\Exception\PluginException $e) { |
|
673 | 673 | $this['monolog']->warning($e->getMessage()); |
674 | 674 | continue; |
675 | 675 | } |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | foreach ($config['service'] as $service) { |
722 | 722 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
723 | 723 | if (!class_exists($class)) { |
724 | - $this['monolog']->warning('該当クラスが見つかりません:' . $class); |
|
724 | + $this['monolog']->warning('該当クラスが見つかりません:'.$class); |
|
725 | 725 | continue; |
726 | 726 | } |
727 | 727 | $this->register(new $class($this)); |
@@ -29,7 +29,6 @@ |
||
29 | 29 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
30 | 30 | use Symfony\Component\Finder\Finder; |
31 | 31 | use Symfony\Component\Yaml\Yaml; |
32 | -use Monolog\Logger; |
|
33 | 32 | |
34 | 33 | class FormEventSubscriber implements EventSubscriberInterface |
35 | 34 | { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $events = array(); |
39 | 39 | // YamlでParseしてがんばる |
40 | - $basePath = __DIR__ . '/../../../app/Plugin'; |
|
40 | + $basePath = __DIR__.'/../../../app/Plugin'; |
|
41 | 41 | $finder = Finder::create() |
42 | 42 | ->in($basePath) |
43 | 43 | ->directories() |
@@ -46,18 +46,18 @@ discard block |
||
46 | 46 | $app = \Eccube\Application::getInstance(); |
47 | 47 | |
48 | 48 | foreach ($finder as $dir) { |
49 | - $config = Yaml::parse(file_get_contents($dir->getRealPath() . '/config.yml')); |
|
49 | + $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml')); |
|
50 | 50 | try { |
51 | 51 | $app['eccube.service.plugin']->checkPluginArchiveContent($dir->getRealPath()); |
52 | - } catch(\Eccube\Exception\PluginException $e) { |
|
52 | + } catch (\Eccube\Exception\PluginException $e) { |
|
53 | 53 | $app['monolog']->warning($e->getMessage()); |
54 | 54 | continue; |
55 | 55 | } |
56 | - $config = $app['eccube.service.plugin']->readYml($dir->getRealPath() . '/config.yml'); |
|
56 | + $config = $app['eccube.service.plugin']->readYml($dir->getRealPath().'/config.yml'); |
|
57 | 57 | |
58 | 58 | if (isset($config['form'])) { |
59 | 59 | foreach ($config['form'] as $event => $class) { |
60 | - $events[$event][] = '\\Plugin\\' . $config['code'] . '\\' . $class; |
|
60 | + $events[$event][] = '\\Plugin\\'.$config['code'].'\\'.$class; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $events = self::getEvents(); |
82 | 82 | |
83 | 83 | if (isset($events['onPreSetData'])) { |
84 | - foreach($events['onPreSetData'] as $formEventClass) { |
|
84 | + foreach ($events['onPreSetData'] as $formEventClass) { |
|
85 | 85 | $formEvent = new $formEventClass(); |
86 | 86 | $formEvent->onPreSetData($event); |
87 | 87 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $events = self::getEvents(); |
94 | 94 | |
95 | 95 | if (isset($events['onPostSetData'])) { |
96 | - foreach($events['onPostSetData'] as $formEventClass) { |
|
96 | + foreach ($events['onPostSetData'] as $formEventClass) { |
|
97 | 97 | $formEvent = new $formEventClass(); |
98 | 98 | $formEvent->onPostSetData($event); |
99 | 99 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $events = self::getEvents(); |
106 | 106 | |
107 | 107 | if (isset($events['onPreSubmit'])) { |
108 | - foreach($events['onPreSubmit'] as $formEventClass) { |
|
108 | + foreach ($events['onPreSubmit'] as $formEventClass) { |
|
109 | 109 | $formEvent = new $formEventClass(); |
110 | 110 | $formEvent->onPreSubmit($event); |
111 | 111 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $events = self::getEvents(); |
118 | 118 | |
119 | 119 | if (isset($events['onSubmit'])) { |
120 | - foreach($events['onSubmit'] as $formEventClass) { |
|
120 | + foreach ($events['onSubmit'] as $formEventClass) { |
|
121 | 121 | $formEvent = new $formEventClass(); |
122 | 122 | $formEvent->onSubmit($event); |
123 | 123 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $events = self::getEvents(); |
130 | 130 | |
131 | 131 | if (isset($events['onPostSubmit'])) { |
132 | - foreach($events['onPostSubmit'] as $formEventClass) { |
|
132 | + foreach ($events['onPostSubmit'] as $formEventClass) { |
|
133 | 133 | $formEvent = new $formEventClass(); |
134 | 134 | $formEvent->onPostSubmit($event); |
135 | 135 | } |