@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | // SSL強制時は, httpsのみにアクセス制限する |
| 66 | 66 | $accessControl = [ |
| 67 | - ['path' => '^/%eccube_admin_route%/login', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 68 | - ['path' => '^/%eccube_admin_route%/', 'roles' => 'ROLE_ADMIN'], |
|
| 69 | - ['path' => '^/mypage/login', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 70 | - ['path' => '^/mypage/withdraw_complete', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 71 | - ['path' => '^/mypage/change', 'roles' => 'IS_AUTHENTICATED_FULLY'], |
|
| 72 | - ['path' => '^/mypage/', 'roles' => 'ROLE_USER'], |
|
| 67 | + ['path' => '^/%eccube_admin_route%/login', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 68 | + ['path' => '^/%eccube_admin_route%/', 'roles' => 'ROLE_ADMIN'], |
|
| 69 | + ['path' => '^/mypage/login', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 70 | + ['path' => '^/mypage/withdraw_complete', 'roles' => 'IS_AUTHENTICATED_ANONYMOUSLY'], |
|
| 71 | + ['path' => '^/mypage/change', 'roles' => 'IS_AUTHENTICATED_FULLY'], |
|
| 72 | + ['path' => '^/mypage/', 'roles' => 'ROLE_USER'], |
|
| 73 | 73 | ]; |
| 74 | 74 | if ($forceSSL) { |
| 75 | 75 | foreach ($accessControl as &$control) { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | // security.ymlでは制御できないため, ここで定義する. |
| 81 | 81 | $container->prependExtensionConfig('security', [ |
| 82 | - 'access_control' => $accessControl, |
|
| 82 | + 'access_control' => $accessControl, |
|
| 83 | 83 | ]); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | } elseif ($item->isProduct()) { |
| 84 | 84 | // ポイント = 単価 * ポイント付与率 * 数量 |
| 85 | 85 | $point = round($item->getPrice() * ($pointRate / 100)) * $item->getQuantity(); |
| 86 | - } elseif($item->isDiscount()) { |
|
| 86 | + } elseif ($item->isDiscount()) { |
|
| 87 | 87 | $point = round($item->getPrice() * ($pointRate / 100)) * $item->getQuantity(); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -391,7 +391,7 @@ |
||
| 391 | 391 | 'DiscountProcessor' => $this->discountProcessors->map($callback)->toArray(), |
| 392 | 392 | 'ItemHolderPostValidator' => $this->itemHolderPostValidators->map($callback)->toArray() |
| 393 | 393 | ]; |
| 394 | - $tree = new \RecursiveTreeIterator(new \RecursiveArrayIterator($flows)); |
|
| 394 | + $tree = new \RecursiveTreeIterator(new \RecursiveArrayIterator($flows)); |
|
| 395 | 395 | $tree->setPrefixPart(\RecursiveTreeIterator::PREFIX_RIGHT, ' '); |
| 396 | 396 | $tree->setPrefixPart(\RecursiveTreeIterator::PREFIX_MID_LAST, ' '); |
| 397 | 397 | $tree->setPrefixPart(\RecursiveTreeIterator::PREFIX_MID_HAS_NEXT, '│'); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | public function getTaxableDiscountItems() |
| 107 | 107 | { |
| 108 | - return array_filter($this->getTaxableItems(), function(OrderItem $Item) { |
|
| 108 | + return array_filter($this->getTaxableItems(), function (OrderItem $Item) { |
|
| 109 | 109 | return $Item->isDiscount(); |
| 110 | 110 | }); |
| 111 | 111 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getTaxFreeDiscountItems() |
| 131 | 131 | { |
| 132 | - return array_filter($this->OrderItems->toArray(), function(OrderItem $Item) { |
|
| 132 | + return array_filter($this->OrderItems->toArray(), function (OrderItem $Item) { |
|
| 133 | 133 | return $Item->isPoint() || ($Item->isDiscount() && $Item->getTaxType()->getId() != TaxType::TAXATION); |
| 134 | 134 | }); |
| 135 | 135 | } |
@@ -557,7 +557,7 @@ |
||
| 557 | 557 | $arrOrder[$i][2] = ''; |
| 558 | 558 | $arrOrder[$i][3] = ''; |
| 559 | 559 | |
| 560 | - foreach($Order->getTaxFreeDiscountItems() as $Item) { |
|
| 560 | + foreach ($Order->getTaxFreeDiscountItems() as $Item) { |
|
| 561 | 561 | ++$i; |
| 562 | 562 | $arrOrder[$i][0] = ''; |
| 563 | 563 | $arrOrder[$i][1] = ''; |
@@ -251,7 +251,7 @@ |
||
| 251 | 251 | ] |
| 252 | 252 | ); |
| 253 | 253 | |
| 254 | - if(!is_null($qtyInCart)) { |
|
| 254 | + if (!is_null($qtyInCart)) { |
|
| 255 | 255 | |
| 256 | 256 | return [ |
| 257 | 257 | 'qtyInCart' => $qtyInCart, |
@@ -126,14 +126,14 @@ |
||
| 126 | 126 | setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), FILTER_VALIDATE_BOOLEAN)); |
| 127 | 127 | } else { |
| 128 | 128 | setcookie($this->sessionName, '', |
| 129 | - [ |
|
| 130 | - 'expires' => 0, |
|
| 131 | - 'path' => $this->getCookiePath(), |
|
| 132 | - 'domain' => ini_get('session.cookie_domain'), |
|
| 133 | - 'secure' => filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN), |
|
| 134 | - 'httponly' => filter_var(ini_get('session.cookie_httponly'), FILTER_VALIDATE_BOOLEAN), |
|
| 135 | - 'samesite' => $this->getCookieSameSite(), |
|
| 136 | - ] |
|
| 129 | + [ |
|
| 130 | + 'expires' => 0, |
|
| 131 | + 'path' => $this->getCookiePath(), |
|
| 132 | + 'domain' => ini_get('session.cookie_domain'), |
|
| 133 | + 'secure' => filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN), |
|
| 134 | + 'httponly' => filter_var(ini_get('session.cookie_httponly'), FILTER_VALIDATE_BOOLEAN), |
|
| 135 | + 'samesite' => $this->getCookieSameSite(), |
|
| 136 | + ] |
|
| 137 | 137 | ); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | |
| 227 | 227 | // id |
| 228 | 228 | if (isset($searchData['id']) && StringUtil::isNotBlank($searchData['id'])) { |
| 229 | - $id = preg_match('/^\d{0,10}$/', $searchData['id']) ? $searchData['id'] : null; |
|
| 229 | + $id = preg_match('/^\d{0,10}$/', $searchData['id']) ? $searchData['id'] : null; |
|
| 230 | 230 | if ($id && $id > '2147483647' && $this->isPostgreSQL()) { |
| 231 | 231 | $id = null; |
| 232 | 232 | } |
@@ -71,13 +71,13 @@ |
||
| 71 | 71 | if ($form->getClickedButton() && $form->getClickedButton()->getName() === 'download') { |
| 72 | 72 | $bufferSize = 1024 * 50; |
| 73 | 73 | $response = new StreamedResponse(); |
| 74 | - $response->headers->set('Content-Length',filesize($logFile)); |
|
| 75 | - $response->headers->set('Content-Disposition','attachment; filename=' . basename($logFile)); |
|
| 76 | - $response->headers->set('Content-Type','application/octet-stream'); |
|
| 77 | - $response->setCallback(function() use($logFile,$bufferSize) { |
|
| 78 | - if ($fh = fopen($logFile,'r')) { |
|
| 74 | + $response->headers->set('Content-Length', filesize($logFile)); |
|
| 75 | + $response->headers->set('Content-Disposition', 'attachment; filename='.basename($logFile)); |
|
| 76 | + $response->headers->set('Content-Type', 'application/octet-stream'); |
|
| 77 | + $response->setCallback(function () use($logFile, $bufferSize) { |
|
| 78 | + if ($fh = fopen($logFile, 'r')) { |
|
| 79 | 79 | while (!feof($fh)) { |
| 80 | - echo fread($fh,$bufferSize); |
|
| 80 | + echo fread($fh, $bufferSize); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | }); |