Skip to content

Commit

Permalink
インデント等修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Dec 17, 2024
1 parent f19cc18 commit dfe01a7
Show file tree
Hide file tree
Showing 29 changed files with 201 additions and 175 deletions.
18 changes: 10 additions & 8 deletions data/class/api/SC_Api_Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ public static function doApiAction($arrPost)

if (count($arrErr) == 0) {
// 実行成功
$arrResponseValidSection = ['Request' => [
'IsValid' => 'True',
$operation_name.'Request' => $arrOperationRequestValid,
],
$arrResponseValidSection = [
'Request' => [
'IsValid' => 'True',
$operation_name.'Request' => $arrOperationRequestValid,
],
];
$response_outer = $operation_name.'Response';
SC_Api_Utils_Ex::printApiLog('Operation SUCCESS', $start_time, $response_outer);
Expand All @@ -380,10 +381,11 @@ public static function doApiAction($arrPost)
foreach ($arrErr as $error_code => $error_msg) {
$arrResponseErrorSection[] = ['Code' => $error_code, 'Message' => $error_msg];
}
$arrResponseValidSection = ['Request' => [
'IsValid' => 'False',
'Errors' => ['Error' => $arrResponseErrorSection],
],
$arrResponseValidSection = [
'Request' => [
'IsValid' => 'False',
'Errors' => ['Error' => $arrResponseErrorSection],
],
];
if (is_object($objApiOperation)) {
$response_outer = $operation_name.'Response';
Expand Down
2 changes: 1 addition & 1 deletion data/class/api/SC_Api_Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function getApiConfig($operation_name)
* @param string $msg 出力文字列
* @param text $operation_name
*
* @ @rturn void
* @return void
*/
public static function printApiLog($msg, $start_time = '', $operation_name = '')
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public function lfGetSqlDenyList()
'NOTIFY\s',
'PREPARE\s',
'REASSIGN\s',
// 'REINDEX\s', // REINDEXは許可で良いかなと
// 'REINDEX\s', // REINDEXは許可で良いかなと
'RELEASE\sSAVEPOINT',
'RENAME\s',
'REST\s',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ public function checkConflictPlugin($plugin_id)
/**
* エラー情報が格納されているか判定します.
*
* @return bool.
* @return bool
*/
public function isError($error)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,12 @@ public function lfCheckErrorDetail($item, $arrErr)
$where = 'parent_category_id = ? AND category_id <> ? AND category_name = ?';
$exists = $objQuery->exists('dtb_category',
$where,
[$parent_category_id,
[
$parent_category_id,
$item['category_id'],
$item['category_name'], ]);
$item['category_name'],
]
);
if ($exists) {
$arrErr['category_name'] = '※ 既に同名のカテゴリが存在します。';
}
Expand Down
6 changes: 4 additions & 2 deletions data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,12 @@ public function lfGetTargetData(&$objFormParam)
// 変更されている対象を走査
for ($i = 1; $i <= count($arrIndexFlag); $i++) {
// 入力値チェック
$param = ['indexflag' => $arrIndexFlag[$i],
$param = [
'indexflag' => $arrIndexFlag[$i],
'indexflag_new' => $arrIndexFlagNew[$i],
'table_name' => $arrTableName[$i],
'column_name' => $arrColumnName[$i], ];
'column_name' => $arrColumnName[$i],
];
$objErr = new SC_CheckError_Ex($param);
$objErr->doFunc(['インデックス('.$i.')', 'indexflag', INT_LEN], ['NUM_CHECK']);
$objErr->doFunc(['インデックス変更後('.$i.')', 'indexflag_new', INT_LEN], ['NUM_CHECK']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ public function errorCheck(&$arrKeys, &$arrForm)
{
$objErr = new SC_CheckError_Ex($arrForm);
for ($i = 0; $i < count($arrKeys); $i++) {
$objErr->doFunc([$arrKeys[$i],
$arrForm[$arrKeys[$i]], ],
$objErr->doFunc(
[
$arrKeys[$i],
$arrForm[$arrKeys[$i]
],
],
['EXIST_CHECK_REVERSE', 'EVAL_CHECK']);
}

Expand Down
2 changes: 1 addition & 1 deletion data/class/pages/api/LC_Page_Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function init()
public function process()
{
$this->action();
// $this->sendResponse();
// $this->sendResponse();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion data/class/pages/api/LC_Page_Api_Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function init()
public function process()
{
$this->action();
// $this->sendResponse();
// $this->sendResponse();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion data/class/pages/api/LC_Page_Api_Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function init()
public function process()
{
$this->action();
// $this->sendResponse();
// $this->sendResponse();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion data/class/pages/api/LC_Page_Api_Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function init()
public function process()
{
$this->action();
// $this->sendResponse();
// $this->sendResponse();
}

/**
Expand Down
6 changes: 4 additions & 2 deletions data/class/pages/forgot/LC_Page_Forgot.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
$where = '(email = ? OR email_mobile = ?)'
.' AND name01 = ? AND name02 = ?'
.' AND status = 2 AND del_flg = 0';
$arrVal = [$arrForm['email'], $arrForm['email'],
$arrForm['name01'], $arrForm['name02'], ];
$arrVal = [
$arrForm['email'], $arrForm['email'],
$arrForm['name01'], $arrForm['name02'],
];
$result = $objQuery->select($cols, $table, $where, $arrVal);
if (isset($result[0]['reminder']) && isset($arrReminder[$result[0]['reminder']])
&& $result[0]['reminder'] == $arrForm['reminder']) {
Expand Down
6 changes: 4 additions & 2 deletions data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ public function init()
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->httpCacheControl('nocache');
$this->validUrl = [MYPAGE_DELIVADDR_URLPATH,
$this->validUrl = [
MYPAGE_DELIVADDR_URLPATH,
DELIV_URLPATH,
MULTIPLE_URLPATH, ];
MULTIPLE_URLPATH,
];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions data/module/Calendar/Decorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* {
* function thisDay($format = 'int')
* {
* .* $day = parent::thisDay('timestamp');
* .* return date('D', $day);
* $day = parent::thisDay('timestamp');
* return date('D', $day);
* }
* }
* $Day = & new Calendar_Day(2003, 10, 25);
Expand Down
6 changes: 3 additions & 3 deletions data/module/Calendar/Table/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ public function getEmptyDaysBefore()
public function getEmptyDaysAfter()
{
// Causes bug when displaying more than one month
// static $index;
// if (!isset($index)) {
// static $index;
// if (!isset($index)) {
$index = $this->getEmptyDaysBefore() + $this->cE->getDaysInMonth(
$this->calendar->thisYear(), $this->calendar->thisMonth());

// }
// }
return $index;
}

Expand Down
6 changes: 4 additions & 2 deletions tests/class/SC_CheckError/SC_CheckError_createParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ public function testArrParamIsCaracter()
{
$this->objErr->doFunc(['EXIST_CHECK', 'aabbcc_1234'], ['EXIST_CHECK']);

$this->expected = [self::FORM_NAME => [0 => 'A', 1 => 'B', 2 => 'C'],
'aabbcc_1234' => '', ];
$this->expected = [
self::FORM_NAME => [0 => 'A', 1 => 'B', 2 => 'C'],
'aabbcc_1234' => '',
];
$this->actual = $this->objErr->arrParam;
$this->assertEquals($this->expected, $this->actual);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/class/SC_Date/SC_Date_getZeroMonthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public function testGetZeroMonth要素の数が12の配列を返す()

public function testGetZeroMonth0をつけた月の配列を返す()
{
$this->expected = ['01' => '01', '02' => '02', '03' => '03', '04' => '04', '05' => '05', '06' => '06', '07' => '07', '08' => '08', '09' => '09', '10' => '10', '11' => '11', '12' => '12',
$this->expected = [
'01' => '01', '02' => '02', '03' => '03', '04' => '04', '05' => '05', '06' => '06', '07' => '07', '08' => '08', '09' => '09', '10' => '10', '11' => '11', '12' => '12',
];
$this->actual = $this->objDate->getZeroMonth();

Expand Down
18 changes: 12 additions & 6 deletions tests/class/SC_Query_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,21 @@ public function testUpdate()
$this->setTestData(1, '2', 'f');

$this->objQuery->update('test_table',
['id' => '1',
[
'id' => '1',
'column1' => '2',
'column2' => '2',
'column3' => 'f', ],
'column3' => 'f',
],
'id = ?', [1]);
$this->expected = [['id' => '1',
'column1' => '2',
'column2' => '2',
'column3' => 'f', ]];
$this->expected = [
[
'id' => '1',
'column1' => '2',
'column2' => '2',
'column3' => 'f',
],
];

$this->actual = $this->objQuery->getAll('SELECT * FROM test_table');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ public function testGetShipmentItems存在する受注IDと配送先IDを指定
$result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
$this->actual['count'] = count($result);

$this->actual['first'] = Test_Utils::mapArray($result[0], [
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]);
$this->actual['first'] = Test_Utils::mapArray($result[0],
[
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass',
]
);
$this->actual['first']['productsClass'] = Test_Utils::mapArray($this->actual['first']['productsClass'], ['product_class_id', 'product_id']);
$this->actual['second'] = Test_Utils::mapArray($result[1], [
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]);
$this->actual['second'] = Test_Utils::mapArray($result[1],
[
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass',
]
);
$this->actual['second']['productsClass'] = Test_Utils::mapArray($this->actual['second']['productsClass'], ['product_class_id', 'product_id']);
$this->verify('配送情報');
}
Expand Down Expand Up @@ -135,9 +141,11 @@ public function testGetShipmentItems詳細フラグをOFFにした場合結果
$result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id, false);
$this->actual['count'] = count($result);
$this->actual['first'] = Test_Utils::mapArray($result[0], [
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]);
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass',
]);
$this->actual['second'] = Test_Utils::mapArray($result[1], [
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]);
'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass',
]);
$this->verify('配送情報');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ public function testGetShippingTemp保有フラグがONの場合商品のある
'00001' => [
'shipment_id' => '00001',
'shipment_item' => ['商品1'],
'shipping_pref' => '東京都', ],
'shipping_pref' => '東京都',
],
'00002' => [
'shipment_id' => '00002',
'shipment_item' => ['商品2'],
'shipping_pref' => '沖縄県', ],
'shipping_pref' => '沖縄県',
],
];
$this->actual = SC_Helper_Purchase::getShippingTemp(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public function testGetShippings存在する受注IDを指定した場合結果
$this->actual['count'] = count($result);
// shipping_idごとの配列になっているのでshipping_idで抽出
$this->actual['first'] = Test_Utils::mapArray($result[0], [
'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', ]);
'order_id', 'shipping_id', 'shipping_name01', 'shipping_date',
]);
$this->actual['shipment_item_count'] = count($result[0]['shipment_item']);
$this->verify('配送情報');
}
Expand All @@ -105,7 +106,8 @@ public function testGetShippings商品取得フラグをOFFにした場合結果
$this->actual['count'] = count($result);
// shipping_idごとの配列になっているのでshipping_idで抽出
$this->actual['first'] = Test_Utils::mapArray($result[0], [
'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', ]);
'order_id', 'shipping_id', 'shipping_name01', 'shipping_date',
]);
$this->actual['shipment_item_count'] = is_array($result['1']['shipment_item']) ? count($result['1']['shipment_item']) : 0;
$this->verify('配送情報');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function testRegisterShipping配送日付が空の場合エラーが起
'order_id' => '2',
'shipping_id' => '30',
'shipping_name01' => '配送情報02-update',
// 'shipping_date' => '2013/12/03 00:00:00'
// 'shipping_date' => '2013/12/03 00:00:00'
],
];

Expand Down Expand Up @@ -162,7 +162,7 @@ public function testRegisterShipping非会員購入の場合配送IDが設定さ
$arrParams = [
'30' => [
'order_id' => '2',
// 'shipping_id' => '30',
// 'shipping_id' => '30',
'shipping_name01' => '配送情報02-update',
'shipping_date' => '2013/12/03 00:00:00',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@ public function testSfUpdateOrderStatusオプションの引数が未指定の
}

// TODO 定数を変更できないためテスト不可
/**
* public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない()
* {
*
* $this->verify();
* }
*/
// public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない()
// {
// $this->verify();
// }

public function testSfUpdateOrderStatus対応状況が発送済みに変更された場合発送日が更新される()
{
$order_id = $this->order_ids[0];
Expand Down Expand Up @@ -345,11 +343,9 @@ public function testSfUpdateOrderStatus加算ポイントが負でポイント
}

// TODO ロールバックされる場合はexitするためテスト不可.
/**
* public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる()
* {
* }
*/
// public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる()
// {
// }

// ////////////////////////////////////////

Expand Down
Loading

0 comments on commit dfe01a7

Please sign in to comment.