@@ -35,9 +35,9 @@ |
||
| 35 | 35 | public function hasProductByName($productName) |
| 36 | 36 | { |
| 37 | 37 | $OrderDetails = array_filter($this->getArrayCopy(), |
| 38 | - function ($OrderDetail) use ($productName) { |
|
| 39 | - return $OrderDetail->getProductName() == $productName; |
|
| 40 | - }); |
|
| 38 | + function ($OrderDetail) use ($productName) { |
|
| 39 | + return $OrderDetail->getProductName() == $productName; |
|
| 40 | + }); |
|
| 41 | 41 | return !empty($OrderDetails); |
| 42 | 42 | } |
| 43 | 43 | // map, filter, reduce も実装したい |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | return new self(array_filter( |
| 20 | 20 | $this->getArrayCopy(), |
| 21 | - function ($OrderDetail) { |
|
| 21 | + function($OrderDetail) { |
|
| 22 | 22 | if ($OrderDetail->getProductClass()) { |
| 23 | 23 | return true; |
| 24 | 24 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function hasProductByName($productName) |
| 36 | 36 | { |
| 37 | 37 | $OrderDetails = array_filter($this->getArrayCopy(), |
| 38 | - function ($OrderDetail) use ($productName) { |
|
| 38 | + function($OrderDetail) use ($productName) { |
|
| 39 | 39 | return $OrderDetail->getProductName() == $productName; |
| 40 | 40 | }); |
| 41 | 41 | return !empty($OrderDetails); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * @param \Eccube\Entity\ProductClass|integer $ProductClass |
|
| 234 | + * @param string $ProductClass |
|
| 235 | 235 | * @param integer $quantity |
| 236 | 236 | * @return \Eccube\Service\CartService |
| 237 | 237 | * @throws CartException |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | * 在庫数と販売制限数ともに個数が超えていれば、少ない方を適用させてメッセージを表示する |
| 646 | 646 | * |
| 647 | 647 | * @param ProductClass $ProductClass |
| 648 | - * @param $productName |
|
| 648 | + * @param string $productName |
|
| 649 | 649 | * @param $quantity |
| 650 | 650 | * @return int チェック後に更新した個数 |
| 651 | 651 | */ |
@@ -302,7 +302,7 @@ |
||
| 302 | 302 | // 制限数チェック(在庫不足の場合は、処理の中でカート内商品を削除している) |
| 303 | 303 | $quantity = $this->setProductLimit($ProductClass, $productName, $tmp_quantity); |
| 304 | 304 | |
| 305 | - // 新しい数量でカート内商品を登録する |
|
| 305 | + // 新しい数量でカート内商品を登録する |
|
| 306 | 306 | if (0 < $quantity) { |
| 307 | 307 | $CartItem = new CartItem(); |
| 308 | 308 | $CartItem |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public function getProductQuantity($productClassId) |
| 224 | 224 | { |
| 225 | - $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
| 225 | + $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
| 226 | 226 | if ($CartItem) { |
| 227 | 227 | return $CartItem->getQuantity(); |
| 228 | 228 | } else { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | $CartItem = new CartItem(); |
| 308 | 308 | $CartItem |
| 309 | 309 | ->setClassName('Eccube\Entity\ProductClass') |
| 310 | - ->setClassId((string)$ProductClass->getId()) |
|
| 310 | + ->setClassId((string) $ProductClass->getId()) |
|
| 311 | 311 | ->setPrice($ProductClass->getPrice02IncTax()) |
| 312 | 312 | ->setQuantity($quantity); |
| 313 | 313 | |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | public function removeProduct($productClassId) |
| 467 | 467 | { |
| 468 | - $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
| 468 | + $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
| 469 | 469 | |
| 470 | 470 | // 支払方法の再設定 |
| 471 | 471 | if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | ->add('name', TextType::class, array( |
| 66 | 66 | 'required' => false, |
| 67 | 67 | )) |
| 68 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) { |
|
| 68 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) { |
|
| 69 | 69 | $form = $event->getForm(); |
| 70 | 70 | $data = $form->getData(); |
| 71 | 71 | if (strlen($data['id']) && strlen($data['name']) == 0) { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $app->match('/plugin/[lower_code]/hello', 'Plugin\[code]\Controller\[code]Controller::index')->bind('plugin_[code]_hello'); |
| 34 | 34 | |
| 35 | 35 | // Form |
| 36 | - $app['form.types'] = $app->extend('form.types', function ($types) use ($app) { |
|
| 36 | + $app['form.types'] = $app->extend('form.types', function($types) use ($app) { |
|
| 37 | 37 | $types[] = new [code]ConfigType(); |
| 38 | 38 | |
| 39 | 39 | return $types; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | // } |
| 58 | 58 | |
| 59 | 59 | // ログファイル設定 |
| 60 | - $app['monolog.logger.[lower_code]'] = function ($app) { |
|
| 60 | + $app['monolog.logger.[lower_code]'] = function($app) { |
|
| 61 | 61 | |
| 62 | 62 | $logger = new $app['monolog.logger.class']('[lower_code]'); |
| 63 | 63 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | // 支払い方法のプルダウンを生成 |
| 84 | 84 | $builder->addEventListener( |
| 85 | 85 | FormEvents::PRE_SET_DATA, |
| 86 | - function (FormEvent $event) { |
|
| 86 | + function(FormEvent $event) { |
|
| 87 | 87 | $Order = $event->getData(); |
| 88 | 88 | if (is_null($Order) || !$Order->getId()) { |
| 89 | 89 | return; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | // TODO Calculatorで行うのが適切. |
| 133 | 133 | $builder->addEventListener( |
| 134 | 134 | FormEvents::POST_SUBMIT, |
| 135 | - function (FormEvent $event) { |
|
| 135 | + function(FormEvent $event) { |
|
| 136 | 136 | /** @var Order $Order */ |
| 137 | 137 | $Order = $event->getData(); |
| 138 | 138 | $Payment = $Order->getPayment(); |
@@ -121,14 +121,14 @@ |
||
| 121 | 121 | $sql = sprintf( |
| 122 | 122 | "EXTRACT(%s FROM %s %s $op INTERVAL '$second SECONDS')", |
| 123 | 123 | $this->field, |
| 124 | - (string)$this->type, |
|
| 124 | + (string) $this->type, |
|
| 125 | 125 | $this->source->dispatch($sqlWalker)); |
| 126 | 126 | break; |
| 127 | 127 | default: |
| 128 | 128 | $sql = sprintf( |
| 129 | 129 | "EXTRACT(%s FROM %s %s $op INTERVAL $second SECOND)", |
| 130 | 130 | $this->field, |
| 131 | - (string)$this->type, |
|
| 131 | + (string) $this->type, |
|
| 132 | 132 | $this->source->dispatch($sqlWalker)); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Doctrine\Common\DataFixtures\FixtureInterface; |
| 6 | 6 | use Doctrine\Common\Persistence\ObjectManager; |
| 7 | 7 | use Doctrine\DBAL\Connection; |
| 8 | -use Doctrine\DBAL\Schema\Table; |
|
| 9 | 8 | |
| 10 | 9 | /** |
| 11 | 10 | * CSVファイルを扱うためのフィクスチャ. |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function load(ObjectManager $manager) |
| 29 | 29 | { |
| 30 | 30 | // CSV Reader に設定 |
| 31 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY); |
|
| 31 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY); |
|
| 32 | 32 | |
| 33 | 33 | // ヘッダ行を取得 |
| 34 | 34 | $headers = $this->file->current(); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ->name('*.csv') |
| 44 | 44 | ->sort( |
| 45 | 45 | // 定義ファイルに記載の順にソート. |
| 46 | - function (\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 46 | + function(\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 47 | 47 | if (!isset($definition[$a->getFilename()])) { |
| 48 | 48 | throw new \Exception(sprintf('"%s" is undefined in %s', $a->getFilename())); |
| 49 | 49 | } |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | apc_clear_cache(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -require __DIR__ . '/autoload.php'; |
|
| 29 | +require __DIR__.'/autoload.php'; |
|
| 30 | 30 | |
| 31 | 31 | $app = new Eccube\InstallApplication(); |
| 32 | 32 | $app['debug'] = true; |
| 33 | -$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
| 33 | +$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
| 34 | 34 | if (!$request->getSession()->isStarted()) { |
| 35 | 35 | $request->getSession()->start(); |
| 36 | 36 | } |