[Changed] code cleanup

php cs fixer
This commit is contained in:
2024-11-25 18:48:39 +01:00
parent 2cd0652c31
commit c27834536d
47 changed files with 273 additions and 239 deletions

View File

@ -9,15 +9,15 @@ class Basket extends Basket_parent
/**
* @return string
*/
public function getPaymentOnPaymentId() :string
public function getPaymentOnPaymentId(): string
{
if ($this->getPaymentId()){
if ($this->getPaymentId()) {
$oPayment = oxNew(Payment::class);
if ($oPayment->load($this->getPaymentId())){
if ($oPayment->load($this->getPaymentId())) {
return $oPayment->getFieldData('oxdesc');
}
}
return "couldn't load payment!";
}
}
}

View File

@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Category extends Category_parent
{
use articleTreeStructure;
}
}

View File

@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Manufacturer extends Manufacturer_parent
{
use articleTreeStructure;
}
}

View File

@ -4,8 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Vendor extends \OxidEsales\Eshop\Application\Model\Vendor
{
use articleTreeStructure;
}
}

View File

@ -8,9 +8,9 @@ trait articleTreeStructure
* @param int $indexOfArray
* @return string
*/
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false): string
{
if ($bShallTakeStd){
if ($bShallTakeStd) {
$splitCatArray =
array_values(
array_filter(
@ -26,9 +26,9 @@ trait articleTreeStructure
)
);
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))) {
return $splitCatArray[$indexOfArray];
}else{
} else {
return "";
}
}
@ -41,4 +41,4 @@ trait articleTreeStructure
)
);
}
}
}

View File

@ -4,7 +4,6 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Model;
use OxidEsales\Eshop\Application\Model\Payment;
use OxidEsales\Eshop\Core\Registry;
@ -13,8 +12,8 @@ class gtmPayment extends gtmPayment_parent
/**
* @return string
*/
public function gtmGetSelectedPaymentName() :string
public function gtmGetSelectedPaymentName(): string
{
return $this->getFieldData('oxpayments__oxdesc')?: 'No payment name available';
return $this->getFieldData('oxpayments__oxdesc') ?: 'No payment name available';
}
}
}