update php-cs-fixer

This commit is contained in:
Pig Fang 2023-01-27 10:19:43 +08:00
parent 3748163394
commit 81f421b6a1
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2
6 changed files with 17 additions and 31 deletions

View File

@ -4,11 +4,16 @@ $finder = PhpCsFixer\Finder::create()->in('plugins');
$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'increment_style' => ['style' => 'post'],
'list_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
])
'@Symfony' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'increment_style' => ['style' => 'post'],
'list_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => null,
],
])
->setFinder($finder);

View File

@ -1,19 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/plugins')
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'increment_style' => ['style' => 'post'],
'list_syntax' => ['syntax' => 'short'],
'standardize_increment' => false,
'yoda_style' => false,
])
->setFinder($finder)
;

View File

@ -2,7 +2,7 @@
"name": "bs-community/blessing-skin-plugins",
"license": "MIT",
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0"
"friendsofphp/php-cs-fixer": "^3.13"
},
"repositories": {
"packagist": {

View File

@ -28,8 +28,8 @@
];
config(['database.connections.remote' => array_merge(
forum_get_default_db_config(), $config
)]);
forum_get_default_db_config(), $config
)]);
try {
DB::connection('remote')->getPdo();

View File

@ -90,7 +90,7 @@ return function (Dispatcher $events) {
$signText = preg_replace('/\*/', '%2A', $signText);
$signText = preg_replace('/%7E/', '~', $signText);
$stringToSign = 'GET&%2F&'.$signText;
$signature = base64_encode(hash_hmac('sha1', $stringToSign, ($accessKeySecret.'&'), true));
$signature = base64_encode(hash_hmac('sha1', $stringToSign, $accessKeySecret.'&', true));
// URL 拼接
$apiQuery['Signature'] = $signature;

View File

@ -130,7 +130,7 @@ class SessionController extends Controller
'user_id' => $profile->player->uid,
'player_id' => $profile->player->pid,
'parameters' => json_encode($request->except('username')),
], ($ip ? compact('ip') : [])));
], $ip ? compact('ip') : []));
return response()->json()->setContent($response);
}