fix code style

This commit is contained in:
Daniel Seifert 2022-08-07 22:18:23 +02:00
parent 42cf5721ce
commit 817f9e68a2
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
10 changed files with 62 additions and 42 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.php_cs.cache

12
.php-cs-fixer.php Normal file
View File

@ -0,0 +1,12 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP73Migration' => true,
'@PSR12' => true
])
->setFinder($finder);

View File

@ -36,6 +36,10 @@
"d3/ordermanager": "^5.0",
"d3/linkmobility4oxid": "^1.0"
},
"require-dev": {
"php": "^7.4",
"friendsofphp/php-cs-fixer": "^3.9"
},
"autoload": {
"psr-4": {
"D3\\Linkmobility4Ordermanager\\": "../../../source/modules/d3/linkmobility4ordermanager"

View File

@ -38,21 +38,21 @@ use OxidEsales\Eshop\Core\Registry;
class d3linkmobility_ordermanager_action extends d3ordermanager_action_abstract
{
public $sTplName = 'd3linkmobility_ordermanager_action.tpl';
CONST ACTIVE_SWITCH = 'blActionLinkmobility_status';
public const ACTIVE_SWITCH = 'blActionLinkmobility_status';
public $sTitleIdent = 'D3_LINKMOBILITY_ORDERMANAGER_ACTION';
CONST SOURCE_TEMPLATE = 'template';
CONST SOURCE_CMS = 'cms';
public const SOURCE_TEMPLATE = 'template';
public const SOURCE_CMS = 'cms';
/**
* @return array
*/
public final function isAllowedInEditions(): array
final public function isAllowedInEditions(): array
{
return [
d3ordermanager_conf::SERIAL_BIT_FREE_EDITION,
d3ordermanager_conf::SERIAL_BIT_STANDARD_EDITION,
d3ordermanager_conf::SERIAL_BIT_PREMIUM_EDITION
d3ordermanager_conf::SERIAL_BIT_PREMIUM_EDITION,
];
}
@ -117,7 +117,8 @@ class d3linkmobility_ordermanager_action extends d3ordermanager_action_abstract
{
$aMailDesc = [];
($this->getManager()->getValue('blLinkMobilityMessageToCustomer') ? $aMailDesc[] = 'Customer' : '');
($this->getManager()->getValue('blLinkMobilityMessageToCustom') ?
(
$this->getManager()->getValue('blLinkMobilityMessageToCustom') ?
$aMailDesc[] = 'Custom: ' . $this->getManager()->getValue('sLinkMobilityMessageToCustomAddress') :
''
);

View File

@ -261,7 +261,7 @@ class d3linkmobility_ordermanager_sender
if (strlen($customAddresses)) {
foreach (explode(';', $customAddresses) as $addressGroups) {
list($phoneNumber, $countryId) = explode('@', trim($addressGroups));
[$phoneNumber, $countryId] = explode('@', trim($addressGroups));
$addresses[trim($phoneNumber)] = trim($countryId);
}
}

View File

@ -17,7 +17,7 @@ declare(strict_types=1);
$sLangName = 'Deutsch';
$aLang = array(
$aLang = [
'charset' => 'UTF-8',
'D3_LINKMOBILITY_ORDERMANAGER_ACTION' => 'SMS senden (via LINK Mobility)',
@ -53,6 +53,6 @@ $aLang = array(
'D3_ORDERMANAGER_JOBDESC_SENDLMMESSAGE_EMPTYMESSAGE' => 'SMS wurde wegen leerer Nachricht nicht gesendet',
'D3_ORDERMANAGER_JOBDESC_SENDLMMESSAGE_NORECIPIENT' => 'SMS wurde wegen fehlender Empfänger nicht gesendet',
'D3_ORDERMANAGER_JOBDESC_SENDLMMESSAGE_RECIPIENTERROR' => 'SMS Empfänger %1$s (%2$s) konnte nicht verwendet werden',
);
];
// @codeCoverageIgnoreEnd

View File

@ -17,5 +17,7 @@ namespace D3\Linkmobility4Ordermanager\Modules\Ordermanager\Application\Model
{
use D3\Ordermanager\Application\Model\d3ordermanager_conf;
class d3ordermanager_conf_linkmobility_parent extends d3ordermanager_conf {}
class d3ordermanager_conf_linkmobility_parent extends d3ordermanager_conf
{
}
}

View File

@ -36,13 +36,13 @@ $aModule = [
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
'extend' => [
d3ordermanager_conf::class => d3ordermanager_conf_linkmobility::class
d3ordermanager_conf::class => d3ordermanager_conf_linkmobility::class,
],
'controllers' => [],
'templates' => [
'd3linkmobility_ordermanager_action.tpl' => 'd3/linkmobility4ordermanager/Application/views/admin/tpl/d3linkmobility_ordermanager_action.tpl'
'd3linkmobility_ordermanager_action.tpl' => 'd3/linkmobility4ordermanager/Application/views/admin/tpl/d3linkmobility_ordermanager_action.tpl',
],
'events' => [],
'blocks' => [],
'settings' => []
'settings' => [],
];