mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-16 01:38:40 +00:00
static code analysis fixes
This commit is contained in:
parent
8169b89d5a
commit
44fa31a4d2
|
|
@ -99,7 +99,7 @@ final class ApiController extends Controller
|
||||||
$remoteConnection = new NullConnection();
|
$remoteConnection = new NullConnection();
|
||||||
if (!empty($request->getData('dbtype'))) {
|
if (!empty($request->getData('dbtype'))) {
|
||||||
$remoteConnection = ConnectionFactory::create([
|
$remoteConnection = ConnectionFactory::create([
|
||||||
'db' => $request->getData('dbtype') ?? null,
|
'db' => $request->getData('dbtype'),
|
||||||
'host' => $request->getData('dbhost') ?? null,
|
'host' => $request->getData('dbhost') ?? null,
|
||||||
'port' => $request->getData('dbport') ?? null,
|
'port' => $request->getData('dbport') ?? null,
|
||||||
'database' => $request->getData('dbdatabase') ?? null,
|
'database' => $request->getData('dbdatabase') ?? null,
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ namespace Modules\Exchange\Interfaces\OMS;
|
||||||
use Modules\Exchange\Models\ExchangeLog;
|
use Modules\Exchange\Models\ExchangeLog;
|
||||||
use Modules\Exchange\Models\ExchangeType;
|
use Modules\Exchange\Models\ExchangeType;
|
||||||
use Modules\Exchange\Models\ExporterAbstract;
|
use Modules\Exchange\Models\ExporterAbstract;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
|
||||||
use phpOMS\Localization\L11nManager;
|
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Utils\StringUtils;
|
use phpOMS\Utils\StringUtils;
|
||||||
|
|
||||||
|
|
@ -40,14 +38,6 @@ final class Exporter extends ExporterAbstract
|
||||||
*/
|
*/
|
||||||
private int $account = 1;
|
private int $account = 1;
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function __construct(ConnectionAbstract $local, L11nManager $l11n)
|
|
||||||
{
|
|
||||||
parent::__construct($local, $l11n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export all data in time span
|
* Export all data in time span
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,8 @@ use Modules\Exchange\Models\ExchangeLog;
|
||||||
use Modules\Exchange\Models\ExchangeType;
|
use Modules\Exchange\Models\ExchangeType;
|
||||||
use Modules\Exchange\Models\ImporterAbstract;
|
use Modules\Exchange\Models\ImporterAbstract;
|
||||||
use Modules\Media\Controller\ApiController;
|
use Modules\Media\Controller\ApiController;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
||||||
use phpOMS\DataStorage\Database\DatabaseStatus;
|
use phpOMS\DataStorage\Database\DatabaseStatus;
|
||||||
use phpOMS\Localization\L11nManager;
|
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
|
||||||
|
|
@ -43,14 +41,6 @@ final class Importer extends ImporterAbstract
|
||||||
*/
|
*/
|
||||||
private int $account = 1;
|
private int $account = 1;
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function __construct(ConnectionAbstract $local, ConnectionAbstract $remote, L11nManager $l11n)
|
|
||||||
{
|
|
||||||
parent::__construct($local, $remote, $l11n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Import all data in time span
|
* Import all data in time span
|
||||||
*
|
*
|
||||||
|
|
@ -87,7 +77,7 @@ final class Importer extends ImporterAbstract
|
||||||
|
|
||||||
if ($request->getData('db') !== null) {
|
if ($request->getData('db') !== null) {
|
||||||
$this->remote = ConnectionFactory::create([
|
$this->remote = ConnectionFactory::create([
|
||||||
'db' => (string) ($request->getData('db') ?? ''),
|
'db' => (string) ($request->getData('db')),
|
||||||
'host' => (string) ($request->getData('host') ?? ''),
|
'host' => (string) ($request->getData('host') ?? ''),
|
||||||
'port' => (int) ($request->getData('port') ?? 0),
|
'port' => (int) ($request->getData('port') ?? 0),
|
||||||
'database' => (string) ($request->getData('database') ?? ''),
|
'database' => (string) ($request->getData('database') ?? ''),
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"friendsofphp/php-cs-fixer": ">=3.2",
|
"friendsofphp/php-cs-fixer": ">=3.2",
|
||||||
"squizlabs/php_codesniffer": ">=3.6",
|
"squizlabs/php_codesniffer": ">=3.6",
|
||||||
"phpmd/phpmd": ">=2.9",
|
"phpmd/phpmd": ">=2.9",
|
||||||
"phpstan/phpstan": ">=0.12.58",
|
"phpstan/phpstan": ">=1.5.4",
|
||||||
"phan/phan": ">=3.2.6"
|
"phan/phan": ">=3.2.6"
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user