Skip to content

Commit

Permalink
Merge pull request #1050 from EC-CUBE/seasoft-1017
Browse files Browse the repository at this point in the history
ソース整形 配列末尾のカンマと閉じ括弧を改行する #1017
  • Loading branch information
seasoftjapan authored Nov 12, 2024
2 parents 0d0a7b4 + 80a7daf commit 6d133f4
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 48 deletions.
16 changes: 11 additions & 5 deletions data/class/api/SC_Api_Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,17 @@ public static function doApiAction($arrPost)
protected static function getOperationRequestEcho($arrParam, $start_time)
{
$arrRet = [
'HTTPHeaders' => ['Header' => ['_attributes' => ['Name' => 'UserAgent',
'Value' => htmlspecialchars($_SERVER['HTTP_USER_AGENT']), ]]],
'RequestId' => $start_time,
'Arguments' => [],
];
'HTTPHeaders' => [
'Header' => [
'_attributes' => [
'Name' => 'UserAgent',
'Value' => htmlspecialchars($_SERVER['HTTP_USER_AGENT']),
],
],
],
'RequestId' => $start_time,
'Arguments' => [],
];
foreach ($arrParam as $key => $val) {
$arrRet['Arguments'][] = ['_attributes' => ['Name' => htmlentities($key, ENT_NOQUOTES, 'UTF-8'), 'Value' => htmlentities($val, ENT_NOQUOTES, 'UTF-8')]];
}
Expand Down
6 changes: 4 additions & 2 deletions data/class/api/SC_Api_Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ public static function sendResponseXml($response_outer_name, &$arrResponse)
'addDecl' => true,
'encoding' => 'UTF-8',
'rootName' => $response_outer_name,
'rootAttributes' => ['xmlns' => self::API_XMLNS.ECCUBE_VERSION,
'xml:lang' => self::API_XML_LANG, ],
'rootAttributes' => [
'xmlns' => self::API_XMLNS.ECCUBE_VERSION,
'xml:lang' => self::API_XML_LANG,
],
'defaultTagName' => 'Response',
'attributesArray' => '_attributes',
];
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/CartAdd.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_CartAdd extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/CartClear.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_CartClear extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/CartCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_CartCreate extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/CartGet.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_CartGet extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/CartModify.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_CartModify extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion data/class/api/operations/GetVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class API_GetVersion extends SC_Api_Abstract_Ex
public function doAction($arrParam)
{
$this->arrResponse = [
'Version' => ECCUBE_VERSION, ];
'Version' => ECCUBE_VERSION,
];

return true;
}
Expand Down
8 changes: 5 additions & 3 deletions data/class/db/SC_DB_MasterData.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ public function registMasterData($name, $columns, $masterData, $autoCommit = tru
}
$i = 0;
foreach ($masterData as $key => $val) {
$sqlVal = [$columns[0] => (string) $key,
$columns[1] => (string) $val,
$columns[2] => (string) $i, ];
$sqlVal = [
$columns[0] => (string) $key,
$columns[1] => (string) $val,
$columns[2] => (string) $i,
];
$this->objQuery->insert($name, $sqlVal);
$i++;
}
Expand Down
12 changes: 8 additions & 4 deletions data/class/helper/SC_Helper_DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,10 @@ public function addProductBeforCategories($category_id, $product_id)
{
$objQuery = SC_Query_Ex::getSingletonInstance();

$sqlval = ['category_id' => $category_id,
'product_id' => $product_id, ];
$sqlval = [
'category_id' => $category_id,
'product_id' => $product_id,
];

$arrSql = [];
$arrSql['rank'] = '(SELECT COALESCE(MAX(rank), 0) FROM dtb_product_categories sub WHERE category_id = ?) + 1';
Expand All @@ -706,8 +708,10 @@ public function addProductBeforCategories($category_id, $product_id)
*/
public function addProductAfterCategories($category_id, $product_id)
{
$sqlval = ['category_id' => $category_id,
'product_id' => $product_id, ];
$sqlval = [
'category_id' => $category_id,
'product_id' => $product_id,
];

$objQuery = SC_Query_Ex::getSingletonInstance();

Expand Down
10 changes: 6 additions & 4 deletions data/class/helper/SC_Helper_TaxRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,12 @@ public static function getTaxRule($product_id = 0, $product_class_id = 0, $pref_

$arrRet = [];
// リクエストの配列化
$arrRequest = ['product_id' => $product_id,
'product_class_id' => $product_class_id,
'pref_id' => $pref_id,
'country_id' => $country_id, ];
$arrRequest = [
'product_id' => $product_id,
'product_class_id' => $product_class_id,
'pref_id' => $pref_id,
'country_id' => $country_id,
];

// 地域設定を優先するが、システムパラメーターなどに設定を持っていくか
// 後に書いてあるほど優先される、詳細後述MEMO参照
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ public function action()
if ($objLayout->isEditablePage($this->device_type_id, $this->page_id)) {
$objLayout->lfDelPageData($this->page_id, $this->device_type_id);

SC_Response_Ex::reload(['device_type_id' => $this->device_type_id,
'msg' => 'on', ], true);
$arrQueryString = [
'device_type_id' => $this->device_type_id,
'msg' => 'on',
];
SC_Response_Ex::reload($arrQueryString, true);
SC_Response_Ex::actionExit();
}
}
Expand Down
10 changes: 6 additions & 4 deletions data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,12 @@ public function lfCheckError(&$objFormParam, &$objUpFile)
}

// 登録不可の文字列チェック
$arrIgnoreCode = ['admin',
MOBILE_DEFAULT_TEMPLATE_NAME,
SMARTPHONE_DEFAULT_TEMPLATE_NAME,
DEFAULT_TEMPLATE_NAME, ];
$arrIgnoreCode = [
'admin',
MOBILE_DEFAULT_TEMPLATE_NAME,
SMARTPHONE_DEFAULT_TEMPLATE_NAME,
DEFAULT_TEMPLATE_NAME,
];
if (in_array($template_code, $arrIgnoreCode)) {
$arrErr['template_code'] = '※ このテンプレートコードは使用できません。<br/>';
}
Expand Down
32 changes: 19 additions & 13 deletions data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,16 @@ public function lfInitMultipleParam(&$objFormParam)
*/
public function setMultipleItemTo(&$objFormParam)
{
$arrMultipleKey = ['multiple_shipping_id',
'multiple_product_class_id',
'multiple_product_name',
'multiple_product_code',
'multiple_classcategory_name1',
'multiple_classcategory_name2',
'multiple_price',
'multiple_quantity', ];
$arrMultipleKey = [
'multiple_shipping_id',
'multiple_product_class_id',
'multiple_product_name',
'multiple_product_code',
'multiple_classcategory_name1',
'multiple_classcategory_name2',
'multiple_price',
'multiple_quantity',
];
$arrMultipleParams = $objFormParam->getSwapArray($arrMultipleKey);

/*
Expand Down Expand Up @@ -682,9 +684,11 @@ public function lfCheckError(&$objFormParam)
foreach ($arrValues['shipping_date_year'] as $key_index => $year) {
$month = $arrValues['shipping_date_month'][$key_index];
$day = $arrValues['shipping_date_day'][$key_index];
$objError = new SC_CheckError_Ex(['shipping_date_year' => $year,
$objError = new SC_CheckError_Ex([
'shipping_date_year' => $year,
'shipping_date_month' => $month,
'shipping_date_day' => $day, ]);
'shipping_date_day' => $day,
]);
$objError->doFunc(['お届け日', 'shipping_date_year', 'shipping_date_month', 'shipping_date_day'], ['CHECK_DATE']);
$arrErrDate['shipping_date_year'][$key_index] = $objError->arrErr['shipping_date_year'];
}
Expand All @@ -694,9 +698,11 @@ public function lfCheckError(&$objFormParam)
$year = $arrValues['order_birth_year'];
$month = $arrValues['order_birth_month'];
$day = $arrValues['order_birth_day'];
$objError = new SC_CheckError_Ex(['order_birth_year' => $year,
'order_birth_month' => $month,
'order_birth_day' => $day, ]);
$objError = new SC_CheckError_Ex([
'order_birth_year' => $year,
'order_birth_month' => $month,
'order_birth_day' => $day,
]);
$objError->doFunc(['生年月日', 'order_birth_year', 'order_birth_month', 'order_birth_day'],
['CHECK_BIRTHDAY']);
$arrErrTemp['order_birth_year'] = $objError->arrErr['order_birth_year'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,7 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
$objDb = new SC_Helper_DB_Ex();

// 配列の添字を定義
$checkArray = ['name', 'status',
'main_list_comment', 'main_comment',
'deliv_fee', 'comment1', 'comment2', 'comment3',
'comment4', 'comment5', 'comment6',
'sale_limit', 'deliv_date_id', 'maker_id', 'note', ];
$checkArray = ['name', 'status', 'main_list_comment', 'main_comment', 'deliv_fee', 'comment1', 'comment2', 'comment3', 'comment4', 'comment5', 'comment6', 'sale_limit', 'deliv_date_id', 'maker_id', 'note'];
$arrList = SC_Utils_Ex::arrayDefineIndexes($arrList, $checkArray);

// INSERTする値を作成する。
Expand Down

0 comments on commit 6d133f4

Please sign in to comment.