8
0

apply code style rules

Dieser Commit ist enthalten in:
Daniel Seifert 2022-07-27 08:47:20 +02:00
Ursprung 00e54ec4dc
Commit 72fcd89823
Signiert von: DanielS
GPG-Schlüssel-ID: 8A7C4C6ED1915C6F
7 geänderte Dateien mit 28 neuen und 27 gelöschten Zeilen

1
.gitignore vendored Normale Datei
Datei anzeigen

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

Datei anzeigen

@ -6,7 +6,7 @@ $finder = PhpCsFixer\Finder::create()
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PSR12' => true
])
->setFinder($finder)

Datei anzeigen

@ -22,21 +22,21 @@ use OxidEsales\Eshop\Core\Registry;
class Configuration
{
const GENERAL_APITOKEN = "d3linkmobility_apitoken";
const GENERAL_DEBUG = "d3linkmobility_debug";
public const GENERAL_APITOKEN = "d3linkmobility_apitoken";
public const GENERAL_DEBUG = "d3linkmobility_debug";
const ORDER_RECFIELDS = "d3linkmobility_smsOrderRecipientsFields";
const USER_RECFIELDS = "d3linkmobility_smsUserRecipientsFields";
public const ORDER_RECFIELDS = "d3linkmobility_smsOrderRecipientsFields";
public const USER_RECFIELDS = "d3linkmobility_smsUserRecipientsFields";
const SMS_SENDERNR = "d3linkmobility_smsSenderNumber";
const SMS_SENDERCOUNTRY = "d3linkmobility_smsSenderCountry";
public const SMS_SENDERNR = "d3linkmobility_smsSenderNumber";
public const SMS_SENDERCOUNTRY = "d3linkmobility_smsSenderCountry";
const SENDBY_ORDERED = "d3linkmobility_orderActive";
const SENDBY_SENDEDNOW = "d3linkmobility_sendedNowActive";
const SENDBY_CANCELED = "d3linkmobility_cancelOrderActive";
public const SENDBY_ORDERED = "d3linkmobility_orderActive";
public const SENDBY_SENDEDNOW = "d3linkmobility_sendedNowActive";
public const SENDBY_CANCELED = "d3linkmobility_cancelOrderActive";
const ARGS_CHECKKEYS = "checkKeys";
const ARGS_CHECKCLASS = "checkClassName";
public const ARGS_CHECKKEYS = "checkKeys";
public const ARGS_CHECKCLASS = "checkClassName";
/**
* @return string

Datei anzeigen

@ -30,7 +30,7 @@ class MessageSender
public function sendOrderFinishedMessage(Order $order, $messageBody)
{
if ((oxNew(Configuration::class))->sendOrderFinishedMessage()) {
$this->sendMessageByOrder( $order, $messageBody);
$this->sendMessageByOrder($order, $messageBody);
}
}

Datei anzeigen

@ -22,7 +22,7 @@ use OxidEsales\Eshop\Application\Model\Remark;
abstract class AbstractMessage
{
const REMARK_IDENT = 'LINKMOB';
public const REMARK_IDENT = 'LINKMOB';
protected $message;
protected $removeLineBreaks = true;
@ -109,5 +109,5 @@ abstract class AbstractMessage
return $this->removeMultipleSpaces ? preg_replace($regexp, ' ', $message) : $message;
}
abstract public function getTypeName() : string;
abstract public function getTypeName(): string;
}

Datei anzeigen

@ -43,17 +43,17 @@ class OrderRecipients
{
foreach ($this->getSmsRecipientFields() as $phoneFieldName => $countryIdFieldName) {
$content = trim((string) $this->order->getFieldData($phoneFieldName));
$country = oxNew( Country::class );
$country = oxNew(Country::class);
try {
if ( strlen( $content ) ) {
$country->load( $this->order->getFieldData( $countryIdFieldName ) );
return oxNew( Recipient::class, $content, $country->getFieldData( 'oxisoalpha2' ) );
if (strlen($content)) {
$country->load($this->order->getFieldData($countryIdFieldName));
return oxNew(Recipient::class, $content, $country->getFieldData('oxisoalpha2'));
}
} catch (NumberParseException $e) {
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData( 'oxisoalpha2' )]);
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData('oxisoalpha2')]);
} catch (RecipientException $e) {
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData( 'oxisoalpha2' )]);
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData('oxisoalpha2')]);
}
}

Datei anzeigen

@ -43,17 +43,17 @@ class UserRecipients
{
foreach ($this->getSmsRecipientFields() as $fieldName) {
$content = trim($this->user->getFieldData($fieldName));
$country = oxNew( Country::class );
$country = oxNew(Country::class);
try {
if ( strlen( $content ) ) {
$country->load( $this->user->getFieldData( 'oxcountryid' ) );
return oxNew( Recipient::class, $content, $country->getFieldData( 'oxisoalpha2' ) );
if (strlen($content)) {
$country->load($this->user->getFieldData('oxcountryid'));
return oxNew(Recipient::class, $content, $country->getFieldData('oxisoalpha2'));
}
} catch (NumberParseException $e) {
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData( 'oxisoalpha2' )]);
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData('oxisoalpha2')]);
} catch (RecipientException $e) {
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData( 'oxisoalpha2' )]);
LoggerHandler::getInstance()->getLogger()->info($e->getMessage(), [$content, $country->getFieldData('oxisoalpha2')]);
}
}