@@ -46,7 +46,7 @@ |
||
46 | 46 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
47 | 47 | { |
48 | 48 | if ($targetEntity->hasField('del_flg') && !in_array($targetEntity->getName(), $this->getExcludes())) { |
49 | - return $targetTableAlias . '.del_flg = 0'; |
|
49 | + return $targetTableAlias.'.del_flg = 0'; |
|
50 | 50 | } else { |
51 | 51 | return ""; |
52 | 52 | } |
@@ -36,18 +36,18 @@ discard block |
||
36 | 36 | { |
37 | 37 | $events = array(); |
38 | 38 | // YamlでParseしてがんばる |
39 | - $basePath = __DIR__ . '/../../../app/Plugin'; |
|
39 | + $basePath = __DIR__.'/../../../app/Plugin'; |
|
40 | 40 | $finder = Finder::create() |
41 | 41 | ->in($basePath) |
42 | 42 | ->directories() |
43 | 43 | ->depth(0); |
44 | 44 | |
45 | 45 | foreach ($finder as $dir) { |
46 | - $config = Yaml::parse($dir->getRealPath() . '/config.yml'); |
|
46 | + $config = Yaml::parse($dir->getRealPath().'/config.yml'); |
|
47 | 47 | |
48 | 48 | if (isset($config['form'])) { |
49 | 49 | foreach ($config['form'] as $event => $class) { |
50 | - $events[$event][] = '\\Plugin\\' . $config['code'] . '\\' . $class; |
|
50 | + $events[$event][] = '\\Plugin\\'.$config['code'].'\\'.$class; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $events = self::getEvents(); |
72 | 72 | |
73 | 73 | if (isset($events['onPreSetData'])) { |
74 | - foreach($events['onPreSetData'] as $formEventClass) { |
|
74 | + foreach ($events['onPreSetData'] as $formEventClass) { |
|
75 | 75 | $formEvent = new $formEventClass(); |
76 | 76 | $formEvent->onPreSetData($event); |
77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $events = self::getEvents(); |
84 | 84 | |
85 | 85 | if (isset($events['onPostSetData'])) { |
86 | - foreach($events['onPostSetData'] as $formEventClass) { |
|
86 | + foreach ($events['onPostSetData'] as $formEventClass) { |
|
87 | 87 | $formEvent = new $formEventClass(); |
88 | 88 | $formEvent->onPostSetData($event); |
89 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $events = self::getEvents(); |
96 | 96 | |
97 | 97 | if (isset($events['onPreSubmit'])) { |
98 | - foreach($events['onPreSubmit'] as $formEventClass) { |
|
98 | + foreach ($events['onPreSubmit'] as $formEventClass) { |
|
99 | 99 | $formEvent = new $formEventClass(); |
100 | 100 | $formEvent->onPreSubmit($event); |
101 | 101 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $events = self::getEvents(); |
108 | 108 | |
109 | 109 | if (isset($events['onSubmit'])) { |
110 | - foreach($events['onSubmit'] as $formEventClass) { |
|
110 | + foreach ($events['onSubmit'] as $formEventClass) { |
|
111 | 111 | $formEvent = new $formEventClass(); |
112 | 112 | $formEvent->onSubmit($event); |
113 | 113 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $events = self::getEvents(); |
120 | 120 | |
121 | 121 | if (isset($events['onPostSubmit'])) { |
122 | - foreach($events['onPostSubmit'] as $formEventClass) { |
|
122 | + foreach ($events['onPostSubmit'] as $formEventClass) { |
|
123 | 123 | $formEvent = new $formEventClass(); |
124 | 124 | $formEvent->onPostSubmit($event); |
125 | 125 | } |
@@ -113,7 +113,7 @@ |
||
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) { |
|
116 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) { |
|
117 | 117 | $data = $event->getData(); |
118 | 118 | $form = $event->getForm(); |
119 | 119 | if ($Product->getClassName2()) { |
@@ -53,8 +53,8 @@ |
||
53 | 53 | 'constraints' => array( |
54 | 54 | new Assert\NotBlank(array('message' => 'ファイルを選択してください。')), |
55 | 55 | new Assert\File(array( |
56 | - 'maxSize' => $app['config']['csv_size'] . 'M', |
|
57 | - 'maxSizeMessage' => 'CSVファイルは' . $app['config']['csv_size'] . 'M以下でアップロードしてください。', |
|
56 | + 'maxSize' => $app['config']['csv_size'].'M', |
|
57 | + 'maxSizeMessage' => 'CSVファイルは'.$app['config']['csv_size'].'M以下でアップロードしてください。', |
|
58 | 58 | )), |
59 | 59 | ), |
60 | 60 | )) |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | ))); |
226 | 226 | |
227 | 227 | $app = $this->app; |
228 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
228 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
229 | 229 | |
230 | 230 | if ('calc' === $app['request']->get('mode')) { |
231 | 231 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | }); |
268 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
268 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
269 | 269 | $form = $event->getForm(); |
270 | 270 | $orderDetails = $form['OrderDetails']->getData(); |
271 | 271 | if (empty($orderDetails) || count($orderDetails) < 1) { |
@@ -36,6 +36,9 @@ |
||
36 | 36 | { |
37 | 37 | protected $app; |
38 | 38 | |
39 | + /** |
|
40 | + * @param \Silex\Application $app |
|
41 | + */ |
|
39 | 42 | public function __construct($app) |
40 | 43 | { |
41 | 44 | $this->app = $app; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | 'label' => false, |
42 | 42 | 'class' => 'Eccube\Entity\PageLayout', |
43 | 43 | 'property' => 'name', |
44 | - 'query_builder' => function (EntityRepository $er) { |
|
44 | + 'query_builder' => function(EntityRepository $er) { |
|
45 | 45 | return $er |
46 | 46 | ->createQueryBuilder('l') |
47 | 47 | ->where('l.id <> 0') |
@@ -148,7 +148,7 @@ |
||
148 | 148 | 'required' => false, |
149 | 149 | 'value' => 1, |
150 | 150 | )) |
151 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
151 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
152 | 152 | $form = $event->getForm(); |
153 | 153 | $data = $form->getData(); |
154 | 154 |
@@ -72,10 +72,10 @@ |
||
72 | 72 | 'required' => false, |
73 | 73 | )) |
74 | 74 | ->add('Category', 'category', array( |
75 | - 'label' => '商品カテゴリ', |
|
76 | - 'multiple' => true, |
|
77 | - 'expanded' => true, |
|
78 | - 'mapped' => false, |
|
75 | + 'label' => '商品カテゴリ', |
|
76 | + 'multiple' => true, |
|
77 | + 'expanded' => true, |
|
78 | + 'mapped' => false, |
|
79 | 79 | )) |
80 | 80 | |
81 | 81 | // 詳細な説明 |
@@ -55,8 +55,8 @@ |
||
55 | 55 | new Assert\NotBlank(), |
56 | 56 | new Assert\Length(array('max' => $this->config['stext_len'])), |
57 | 57 | new Assert\Regex(array( |
58 | - 'pattern' => "/^[0-9a-zA-Z]+$/", |
|
59 | - )), |
|
58 | + 'pattern' => "/^[0-9a-zA-Z]+$/", |
|
59 | + )), |
|
60 | 60 | ), |
61 | 61 | )) |
62 | 62 | ->add('admin_allow_host', 'textarea', array( |
@@ -70,19 +70,19 @@ |
||
70 | 70 | 'label' => 'SSLを強制', |
71 | 71 | 'required' => false, |
72 | 72 | )) |
73 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app) { |
|
73 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app) { |
|
74 | 74 | $form = $event->getForm(); |
75 | 75 | $data = $form->getData(); |
76 | 76 | |
77 | 77 | $ips = preg_split("/\R/", $data['admin_allow_host'], null, PREG_SPLIT_NO_EMPTY); |
78 | 78 | |
79 | - foreach($ips as $ip) { |
|
79 | + foreach ($ips as $ip) { |
|
80 | 80 | $errors = $app['validator']->validateValue($ip, array( |
81 | 81 | new Assert\Ip(), |
82 | 82 | ) |
83 | 83 | ); |
84 | 84 | if ($errors->count() != 0) { |
85 | - $form['admin_allow_host']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
85 | + $form['admin_allow_host']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | }) |