[Changed] code cleanup
php cs fixer
This commit is contained in:
@ -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!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
|
||||
class Category extends Category_parent
|
||||
{
|
||||
use articleTreeStructure;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
|
||||
class Manufacturer extends Manufacturer_parent
|
||||
{
|
||||
use articleTreeStructure;
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace D3\GoogleAnalytics4\Modules\Application\Model;
|
||||
|
||||
|
||||
class Vendor extends \OxidEsales\Eshop\Application\Model\Vendor
|
||||
{
|
||||
use articleTreeStructure;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user