@@ -119,7 +119,7 @@ |
||
119 | 119 | public function checkPluginArchiveContent($dir) |
120 | 120 | { |
121 | 121 | try { |
122 | - $meta = $this->readYml($dir . '/config.yml'); |
|
122 | + $meta = $this->readYml($dir.'/config.yml'); |
|
123 | 123 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
124 | 124 | $this->app['monolog']->warning($e->getMessage()); |
125 | 125 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -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; |
@@ -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 | } |