mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 03:28:41 +00:00
rector fixes + bug fixes
This commit is contained in:
parent
bbfb16cb7f
commit
31d59dbdb4
|
|
@ -89,7 +89,7 @@ final class Installer extends InstallerAbstract
|
||||||
(OperatingSystem::getSystem() === SystemType::WIN
|
(OperatingSystem::getSystem() === SystemType::WIN
|
||||||
? 'php.exe'
|
? 'php.exe'
|
||||||
: 'php'
|
: 'php'
|
||||||
) . ' ' . __DIR__ . '/../../../../Cli/cli.php -v'
|
) . ' ' . __DIR__ . '/../../../../cli.php -v'
|
||||||
);
|
);
|
||||||
$cmdResult = $cmdResult === null || $cmdResult === false ? '' : $cmdResult;
|
$cmdResult = $cmdResult === null || $cmdResult === false ? '' : $cmdResult;
|
||||||
|
|
||||||
|
|
@ -312,8 +312,8 @@ final class Installer extends InstallerAbstract
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return !\is_array($responseData['response'])
|
return \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2176,7 +2176,7 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ModuleStatusUpdateType::INSTALL:
|
case ModuleStatusUpdateType::INSTALL:
|
||||||
$done = $this->app->moduleManager->isInstalled($module) ? true : false;
|
$done = $this->app->moduleManager->isInstalled($module);
|
||||||
$msg = $done
|
$msg = $done
|
||||||
? $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'ModuleInstalledSuccessful')
|
? $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'ModuleInstalledSuccessful')
|
||||||
: $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'ModuleInstalledFailure');
|
: $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'ModuleInstalledFailure');
|
||||||
|
|
|
||||||
|
|
@ -699,7 +699,7 @@ final class BackendController extends Controller
|
||||||
/** @var null|\Model\NullSetting|\Model\Setting[] $settings */
|
/** @var null|\Model\NullSetting|\Model\Setting[] $settings */
|
||||||
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
||||||
if ($settings->id > 0) {
|
if ($settings->id > 0) {
|
||||||
$view->setData('settings', !\is_array($settings) ? [$settings] : $settings);
|
$view->setData('settings', \is_array($settings) ? $settings : [$settings]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$class = '\\Modules\\' . $request->getData('id') . '\\Models\\SettingsEnum';
|
$class = '\\Modules\\' . $request->getData('id') . '\\Models\\SettingsEnum';
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ class AccountMapper extends DataMapperFactory
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
return LoginReturnType::WRONG_PASSWORD;
|
return LoginReturnType::WRONG_PASSWORD;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $_) {
|
||||||
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class ApiKeyMapper extends DataMapperFactory
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
return (int) $result['account_id'];
|
return (int) $result['account_id'];
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $_) {
|
||||||
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ use phpOMS\Stdlib\Base\AddressType;
|
||||||
*/
|
*/
|
||||||
final class AddressMapperTest extends \PHPUnit\Framework\TestCase
|
final class AddressMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers Modules\Admin\Models\AddressMapper
|
* @covers Modules\Admin\Models\AddressMapper
|
||||||
* @group module
|
* @group module
|
||||||
*/
|
*/
|
||||||
public function testCR() : void
|
public function testCR() : void
|
||||||
{
|
{
|
||||||
$address = new Address();
|
$address = new Address();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user