@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | ))); |
257 | 257 | |
258 | 258 | // 選択された支払い方法の名称をエンティティにコピーする |
259 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
259 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
260 | 260 | $Order = $event->getData(); |
261 | 261 | $Payment = $Order->getPayment(); |
262 | 262 | if (!is_null($Payment)) { |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | }); |
266 | 266 | // 会員受注の場合、会員の性別/職業/誕生日をエンティティにコピーする |
267 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
267 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
268 | 268 | $Order = $event->getData(); |
269 | 269 | $Customer = $Order->getCustomer(); |
270 | 270 | if (!is_null($Customer)) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | foreach ($this->paths as $path) { |
75 | - if ( ! is_dir($path)) { |
|
75 | + if (!is_dir($path)) { |
|
76 | 76 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
77 | 77 | } |
78 | 78 | |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
82 | 82 | \RecursiveIteratorIterator::LEAVES_ONLY |
83 | 83 | ), |
84 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
84 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
85 | 85 | \RecursiveRegexIterator::GET_MATCH |
86 | 86 | ); |
87 | 87 | |
88 | 88 | foreach ($iterator as $file) { |
89 | 89 | $sourceFile = $file[0]; |
90 | 90 | |
91 | - if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
91 | + if (!preg_match('(^phar:)i', $sourceFile)) { |
|
92 | 92 | $sourceFile = realpath($sourceFile); |
93 | 93 | } |
94 | 94 | |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceIndex, [';']); |
134 | 134 | $namespace = $tokens->generatePartialCode($tokens->getNextMeaningfulToken($namespaceIndex), $tokens->getPrevMeaningfulToken($namespaceEndIndex)); |
135 | 135 | $className = $tokens[$classNameTokenIndex]->getContent(); |
136 | - $fqcn = $namespace . '\\' . $className; |
|
137 | - if (class_exists($fqcn) && ! $this->isTransient($fqcn)) { |
|
136 | + $fqcn = $namespace.'\\'.$className; |
|
137 | + if (class_exists($fqcn) && !$this->isTransient($fqcn)) { |
|
138 | 138 | if (in_array($sourceFile, $this->newProxyFiles)) { |
139 | - $newClassName = $className . Str::random(12); |
|
139 | + $newClassName = $className.Str::random(12); |
|
140 | 140 | $tokens[$classNameTokenIndex] = new Token([T_STRING, $newClassName]); |
141 | 141 | $newFilePath = $this->outputDir."${newClassName}.php"; |
142 | 142 | file_put_contents($newFilePath, $tokens->generateCode()); |
143 | 143 | require_once $newFilePath; |
144 | - $results[] = $namespace . "\\${newClassName}"; |
|
144 | + $results[] = $namespace."\\${newClassName}"; |
|
145 | 145 | } else { |
146 | 146 | $results[] = $fqcn; |
147 | 147 | } |
@@ -400,15 +400,15 @@ |
||
400 | 400 | foreach ($finder as $content) { |
401 | 401 | $permission = $content->getPerms(); |
402 | 402 | // see also http://www.php.net/fileperms |
403 | - if (!($permission & 0x0010) || !($permission & 0x0002)) { |
|
403 | + if (!($permission&0x0010) || !($permission&0x0002)) { |
|
404 | 404 | $realPath = $content->getRealPath(); |
405 | 405 | if ($verbose) { |
406 | 406 | out(sprintf('%s %s to ', $realPath, substr(sprintf('%o', $permission), -4)), 'info', false); |
407 | 407 | } |
408 | - $permission = !($permission & 0x0020) ? $permission += 040 : $permission; // g+r |
|
409 | - $permission = !($permission & 0x0010) ? $permission += 020 : $permission; // g+w |
|
410 | - $permission = !($permission & 0x0004) ? $permission += 04 : $permission; // o+r |
|
411 | - $permission = !($permission & 0x0002) ? $permission += 02 : $permission; // o+w |
|
408 | + $permission = !($permission&0x0020) ? $permission += 040 : $permission; // g+r |
|
409 | + $permission = !($permission&0x0010) ? $permission += 020 : $permission; // g+w |
|
410 | + $permission = !($permission&0x0004) ? $permission += 04 : $permission; // o+r |
|
411 | + $permission = !($permission&0x0002) ? $permission += 02 : $permission; // o+w |
|
412 | 412 | $result = chmod($realPath, $permission); |
413 | 413 | if ($verbose) { |
414 | 414 | if ($result) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } else { |
96 | 96 | // httpから変更されたらfalseのまま |
97 | 97 | $config['force_ssl'] = Constant::DISABLED; |
98 | - $data['force_ssl'] = (bool)Constant::DISABLED; |
|
98 | + $data['force_ssl'] = (bool) Constant::DISABLED; |
|
99 | 99 | } |
100 | 100 | } else { |
101 | 101 | $config['force_ssl'] = Constant::DISABLED; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if (count($allowHost) > 0) { |
141 | 141 | $form->get('admin_allow_hosts')->setData(Str::convertLineFeed(implode("\n", $allowHost))); |
142 | 142 | } |
143 | - $form->get('force_ssl')->setData((bool)$this->appConfig['force_ssl']); |
|
143 | + $form->get('force_ssl')->setData((bool) $this->appConfig['force_ssl']); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return [ |
@@ -214,7 +214,7 @@ |
||
214 | 214 | |
215 | 215 | // ロードバランサ, プロキシサーバ |
216 | 216 | if (!empty($config['trusted_proxies_connection_only'])) { |
217 | - $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only']; |
|
217 | + $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only']; |
|
218 | 218 | } |
219 | 219 | if (!empty($config['trusted_proxies'])) { |
220 | 220 | $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", |
@@ -92,19 +92,19 @@ |
||
92 | 92 | 'label' => 'SSLを強制', |
93 | 93 | 'required' => false, |
94 | 94 | )) |
95 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app) { |
|
95 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app) { |
|
96 | 96 | $form = $event->getForm(); |
97 | 97 | $data = $form->getData(); |
98 | 98 | |
99 | 99 | $ips = preg_split("/\R/", $data['admin_allow_hosts'], null, PREG_SPLIT_NO_EMPTY); |
100 | 100 | |
101 | - foreach($ips as $ip) { |
|
101 | + foreach ($ips as $ip) { |
|
102 | 102 | $errors = $this->recursiveValidator->validate($ip, array( |
103 | 103 | new Assert\Ip(), |
104 | 104 | ) |
105 | 105 | ); |
106 | 106 | if ($errors->count() != 0) { |
107 | - $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
107 | + $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | }) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | apc_clear_cache(); |
27 | 27 | } |
28 | 28 | |
29 | -require __DIR__ . '/autoload.php'; |
|
29 | +require __DIR__.'/autoload.php'; |
|
30 | 30 | |
31 | 31 | set_time_limit(0); |
32 | 32 | ini_set('memory_limit', -1); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $loader = require __DIR__.'/autoload.php'; |
26 | 26 | |
27 | 27 | ini_set('display_errors', 'Off'); |
28 | -error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); |
|
28 | +error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT); |
|
29 | 29 | |
30 | 30 | // see http://silex.sensiolabs.org/doc/web_servers.html#php-5-4 |
31 | 31 | $filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | 'allow_delete' => true, |
208 | 208 | 'prototype' => true, |
209 | 209 | )) |
210 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
210 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
211 | 211 | /** @var \Eccube\Entity\Shipping $data */ |
212 | 212 | $data = $event->getData(); |
213 | 213 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | 'placeholder' => '指定なし', |
229 | 229 | 'required' => false, |
230 | 230 | 'data' => $DeliveryTime, |
231 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
231 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
232 | 232 | $qb = $er->createQueryBuilder('dt'); |
233 | 233 | if ($Delivery) { |
234 | 234 | $qb |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | 'mapped' => false, |
241 | 241 | )); |
242 | 242 | }) |
243 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
243 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
244 | 244 | $data = $event->getData(); |
245 | 245 | $form = $event->getForm(); |
246 | 246 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | 'choice_label' => 'delivery_time', |
262 | 262 | 'placeholder' => '指定なし', |
263 | 263 | 'required' => false, |
264 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
264 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
265 | 265 | $qb = $er->createQueryBuilder('dt'); |
266 | 266 | if ($Delivery) { |
267 | 267 | $qb |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | 'mapped' => false, |
274 | 274 | )); |
275 | 275 | }) |
276 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
276 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
277 | 277 | $form = $event->getForm(); |
278 | 278 | $OrderItems = $form['OrderItems']->getData(); |
279 | 279 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $form['shipping_delivery_date']->addError(new FormError('商品が追加されていません。')); |
283 | 283 | } |
284 | 284 | }) |
285 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
285 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
286 | 286 | $form = $event->getForm(); |
287 | 287 | $Shipping = $event->getData(); |
288 | 288 | $Delivery = $Shipping->getDelivery(); |