mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-01-27 04: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
|
||||
? 'php.exe'
|
||||
: 'php'
|
||||
) . ' ' . __DIR__ . '/../../../../Cli/cli.php -v'
|
||||
) . ' ' . __DIR__ . '/../../../../cli.php -v'
|
||||
);
|
||||
$cmdResult = $cmdResult === null || $cmdResult === false ? '' : $cmdResult;
|
||||
|
||||
|
|
@ -312,8 +312,8 @@ final class Installer extends InstallerAbstract
|
|||
return [];
|
||||
}
|
||||
|
||||
return !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
return \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2176,7 +2176,7 @@ final class ApiController extends Controller
|
|||
|
||||
break;
|
||||
case ModuleStatusUpdateType::INSTALL:
|
||||
$done = $this->app->moduleManager->isInstalled($module) ? true : false;
|
||||
$done = $this->app->moduleManager->isInstalled($module);
|
||||
$msg = $done
|
||||
? $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'ModuleInstalledSuccessful')
|
||||
: $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 */
|
||||
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
||||
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';
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class AccountMapper extends DataMapperFactory
|
|||
->execute();
|
||||
|
||||
return LoginReturnType::WRONG_PASSWORD;
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Exception $_) {
|
||||
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class ApiKeyMapper extends DataMapperFactory
|
|||
->execute();
|
||||
|
||||
return (int) $result['account_id'];
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Exception $_) {
|
||||
return LoginReturnType::FAILURE; // @codeCoverageIgnore
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ use phpOMS\Stdlib\Base\AddressType;
|
|||
*/
|
||||
final class AddressMapperTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Modules\Admin\Models\AddressMapper
|
||||
* @group module
|
||||
*/
|
||||
public function testCR() : void
|
||||
/**
|
||||
* @covers Modules\Admin\Models\AddressMapper
|
||||
* @group module
|
||||
*/
|
||||
public function testCR() : void
|
||||
{
|
||||
$address = new Address();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user