Skip to content

Commit

Permalink
Apply PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --allow-risky=yes
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Sep 6, 2024
1 parent 9326ac0 commit dee413e
Show file tree
Hide file tree
Showing 291 changed files with 9,796 additions and 8,315 deletions.
3 changes: 2 additions & 1 deletion data/class/SC_Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
/**
* バッチ処理用 の基底クラス.
*
* @package Page
* @author EC-CUBE CO.,LTD.
*
* @version $Id$
*/
class SC_Batch
Expand All @@ -34,6 +34,7 @@ class SC_Batch
* バッチ処理を実行する
*
* @param mixed $argv コマンドライン引数
*
* @return mixed バッチの実行結果
*/
public function execute($argv = '')
Expand Down
47 changes: 29 additions & 18 deletions data/class/SC_CartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* カートセッション管理クラス
*
* @author EC-CUBE CO.,LTD.
*
* @version $Id$
*/
class SC_CartSession
Expand Down Expand Up @@ -167,7 +168,7 @@ public function getTotalQuantity($product_type_id)
$total = 0;
$max = $this->getMax($product_type_id);
for ($i = 0; $i <= $max; $i++) {
$total += (int)$this->cartSession[$product_type_id][$i]['quantity'];
$total += (int) $this->cartSession[$product_type_id][$i]['quantity'];
}

return $total;
Expand Down Expand Up @@ -288,7 +289,7 @@ public function setPrevURL($url, $excludePaths = array())
{
// 前頁として記録しないページを指定する。
$arrExclude = array(
'/shopping/'
'/shopping/',
);
$arrExclude = array_merge($arrExclude, $excludePaths);
$exclude = false;
Expand Down Expand Up @@ -346,20 +347,20 @@ public function getValue($key, $product_type_id)
public function adjustSessionProductsClass(&$arrProductsClass)
{
$arrNecessaryItems = array(
'product_id' => true,
'product_class_id' => true,
'name' => true,
'price02' => true,
'point_rate' => true,
'main_list_image' => true,
'main_image' => true,
'product_code' => true,
'stock' => true,
'stock_unlimited' => true,
'sale_limit' => true,
'class_name1' => true,
'product_id' => true,
'product_class_id' => true,
'name' => true,
'price02' => true,
'point_rate' => true,
'main_list_image' => true,
'main_image' => true,
'product_code' => true,
'stock' => true,
'stock_unlimited' => true,
'sale_limit' => true,
'class_name1' => true,
'classcategory_name1' => true,
'class_name2' => true,
'class_name2' => true,
'classcategory_name2' => true,
);

Expand All @@ -376,7 +377,9 @@ public function adjustSessionProductsClass(&$arrProductsClass)
*
* @param integer $product_type_id 商品種別ID
* @param integer $key
*
* @return void
*
* @deprecated 本体では使用していないメソッドです
* MEMO: せっかく一回だけ読み込みにされてますが、税率対応の関係でちょっと保留
*/
Expand Down Expand Up @@ -412,6 +415,7 @@ public function setCartSession4getCartList($product_type_id, $key)
* @param integer $product_type_id 商品種別ID
* @param integer $pref_id 税金計算用注文者都道府県ID
* @param integer $country_id 税金計算用注文者国ID
*
* @return array カート内商品一覧の配列
*/
public function getCartList($product_type_id, $pref_id = 0, $country_id = 0)
Expand All @@ -435,7 +439,6 @@ public function getCartList($product_type_id, $pref_id = 0, $country_id = 0)
isset($this->cartSession[$product_type_id][$i]['cart_no'])
&& $this->cartSession[$product_type_id][$i]['cart_no'] != ''
) {

// 商品情報は常に取得
// TODO: 同一インスタンス内では1回のみ呼ぶようにしたい
// TODO: ここの商品の合計処理は getAllProductsTotalや getAllProductsTaxとで類似重複なので統一出来そう
Expand Down Expand Up @@ -509,6 +512,7 @@ public function getAllCartList()
* カート内にある商品規格IDを全て取得する.
*
* @param integer $product_type_id 商品種別ID
*
* @return array 商品規格ID の配列
*/
public function getAllProductClassID($product_type_id)
Expand All @@ -528,6 +532,7 @@ public function getAllProductClassID($product_type_id)
* 商品種別ID を指定して, カート内の商品を全て削除する.
*
* @param integer $product_type_id 商品種別ID
*
* @return void
*/
public function delAllProducts($product_type_id)
Expand Down Expand Up @@ -572,6 +577,7 @@ public function downQuantity($cart_no, $product_type_id)
*
* @param integer $cart_no カート番号
* @param integer $product_type_id 商品種別ID
*
* @return integer 該当商品規格の数量
*/
public function getQuantity($cart_no, $product_type_id)
Expand Down Expand Up @@ -609,7 +615,9 @@ public function setQuantity($quantity, $cart_no, $product_type_id)
*
* @param integer $cart_no カート番号
* @param integer $product_type_id 商品種別ID
*
* @return integer 商品規格ID
*
* @deprecated 本体では使用していないメソッドです
*/
public function getProductClassId($cart_no, $product_type_id)
Expand All @@ -635,6 +643,7 @@ public function getProductClassId($cart_no, $product_type_id)
* 4. 在庫数チェック
*
* @param string $product_type_id 商品種別ID
*
* @return string エラーが発生した場合はエラーメッセージ
*/
public function checkProducts($product_type_id)
Expand Down Expand Up @@ -695,6 +704,7 @@ public function checkProducts($product_type_id)
* 送料無料条件を満たすかどうかチェックする
*
* @param integer $product_type_id 商品種別ID
*
* @return boolean 送料無料の場合 true
*/
public function isDelivFree($product_type_id)
Expand Down Expand Up @@ -741,12 +751,12 @@ public function isDelivFree($product_type_id)
* @param SC_Customer $objCustomer ログイン中の SC_Customer インスタンス
* @param integer $use_point 今回使用ポイント
* @param integer|array $deliv_pref 配送先都道府県ID.
複数に配送する場合は都道府県IDの配列
* @param integer $charge 手数料
* @param integer $discount 値引き
* @param integer $deliv_id 配送業者ID
* @param integer $order_pref 注文者の都道府県ID
* @param integer $order_country_id 注文者の国
*
* @return array カートの計算結果の配列
*/
public function calculate(
Expand All @@ -760,7 +770,6 @@ public function calculate(
$order_pref = 0,
$order_country_id = 0
) {

$results = array();
$total_point = $this->getAllProductsPoint($product_type_id);
// MEMO: 税金計算は注文者の住所基準
Expand Down Expand Up @@ -840,6 +849,7 @@ public function getKeys()
* カートに設定された現在のキー(商品種別ID)を登録する.
*
* @param integer $key 商品種別ID
*
* @return void
*/
public function registerKey($key)
Expand Down Expand Up @@ -881,6 +891,7 @@ public function isMultiple()
* 引数の商品種別の商品がカートに含まれるかどうか.
*
* @param integer $product_type_id 商品種別ID
*
* @return boolean 指定の商品種別がカートに含まれる場合 true
*/
public function hasProductType($product_type_id)
Expand Down
Loading

0 comments on commit dee413e

Please sign in to comment.