@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | )); |
| 62 | 62 | |
| 63 | 63 | $message = \Swift_Message::newInstance() |
| 64 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
| 64 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
| 65 | 65 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 66 | 66 | ->setTo(array($Customer->getEmail())) |
| 67 | 67 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | )); |
| 103 | 103 | |
| 104 | 104 | $message = \Swift_Message::newInstance() |
| 105 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。') |
|
| 105 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。') |
|
| 106 | 106 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 107 | 107 | ->setTo(array($Customer->getEmail())) |
| 108 | 108 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | )); |
| 145 | 145 | |
| 146 | 146 | $message = \Swift_Message::newInstance() |
| 147 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了') |
|
| 147 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了') |
|
| 148 | 148 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 149 | 149 | ->setTo(array($email)) |
| 150 | 150 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | // 問い合わせ者にメール送信 |
| 189 | 189 | $message = \Swift_Message::newInstance() |
| 190 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。') |
|
| 190 | + ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。') |
|
| 191 | 191 | ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName())) |
| 192 | 192 | ->setTo(array($formData['email'])) |
| 193 | 193 | ->setBcc($this->BaseInfo->getEmail02()) |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | )); |
| 245 | 245 | |
| 246 | 246 | $message = \Swift_Message::newInstance() |
| 247 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getSubject()) |
|
| 247 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getSubject()) |
|
| 248 | 248 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 249 | 249 | ->setTo(array($Order->getEmail())) |
| 250 | 250 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | )); |
| 289 | 289 | |
| 290 | 290 | $message = \Swift_Message::newInstance() |
| 291 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
| 291 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
| 292 | 292 | ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName())) |
| 293 | 293 | ->setTo(array($Customer->getEmail())) |
| 294 | 294 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | )); |
| 333 | 333 | |
| 334 | 334 | $message = \Swift_Message::newInstance() |
| 335 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['subject']) |
|
| 335 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['subject']) |
|
| 336 | 336 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 337 | 337 | ->setTo(array($Order->getEmail())) |
| 338 | 338 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | )); |
| 374 | 374 | |
| 375 | 375 | $message = \Swift_Message::newInstance() |
| 376 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認') |
|
| 376 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認') |
|
| 377 | 377 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 378 | 378 | ->setTo(array($Customer->getEmail())) |
| 379 | 379 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | )); |
| 415 | 415 | |
| 416 | 416 | $message = \Swift_Message::newInstance() |
| 417 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ') |
|
| 417 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ') |
|
| 418 | 418 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 419 | 419 | ->setTo(array($Customer->getEmail())) |
| 420 | 420 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $webProcessor = new WebProcessor(); |
| 112 | 112 | $uidProcessor = new UidProcessor(8); |
| 113 | 113 | |
| 114 | - $FingerCrossedHandler->pushProcessor(function ($record) use ($app, $uidProcessor, $webProcessor) { |
|
| 114 | + $FingerCrossedHandler->pushProcessor(function($record) use ($app, $uidProcessor, $webProcessor) { |
|
| 115 | 115 | // ログフォーマットに出力する値を独自に設定 |
| 116 | 116 | |
| 117 | 117 | $record['level_name'] = sprintf("%-5s", $record['level_name']); |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | return $log; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 86 | + foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 87 | 87 | // 上限に達した場合、処理を抜ける |
| 88 | 88 | if (count($log) >= $formData['line_max']) { |
| 89 | 89 | break; |
@@ -108,6 +108,9 @@ |
||
| 108 | 108 | ]; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $logFile |
|
| 113 | + */ |
|
| 111 | 114 | private function parseLogFile($logFile, $formData) |
| 112 | 115 | { |
| 113 | 116 | $log = array(); |
@@ -348,7 +348,7 @@ discard block |
||
| 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 |
||
| 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 | { |
@@ -2,15 +2,9 @@ |
||
| 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 | { |
@@ -19,32 +19,32 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -16,6 +16,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -122,7 +126,7 @@ discard block |
||
| 122 | 126 | * Pimple標準では再登録を行うと, `RuntimeException: Cannot override frozen service`が投げられるため,一度unsetしてから再登録を行う. |
| 123 | 127 | * config系の変更程度に利用はとどめること |
| 124 | 128 | * |
| 125 | - * @param $key |
|
| 129 | + * @param string $key |
|
| 126 | 130 | * @param $service |
| 127 | 131 | * @throws \InvalidArgumentException keyが存在しない場合. |
| 128 | 132 | */ |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | |
| 25 | 25 | namespace Eccube\Command; |
| 26 | 26 | |
| 27 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 28 | 27 | use Symfony\Component\Console\Input\InputInterface; |
| 29 | 28 | use Symfony\Component\Console\Input\InputOption; |
| 30 | 29 | use Symfony\Component\Console\Output\OutputInterface; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | $this->app = $this->getSilexApplication(); |
| 54 | 54 | |
| 55 | - \Eccube\Util\CacheUtil::clear($this->app,$input->getOption('all')); |
|
| 55 | + \Eccube\Util\CacheUtil::clear($this->app, $input->getOption('all')); |
|
| 56 | 56 | $output->writeln(sprintf("%s <info>success</info>", 'cache:clear')); |
| 57 | 57 | |
| 58 | 58 | } |
@@ -27,8 +27,6 @@ |
||
| 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; |
@@ -40,14 +40,14 @@ |
||
| 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 { |
@@ -22,17 +22,17 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |