[Changed] phpStan - set level to 4, clear files by level
Also changed method, to get the category for items (products)
This commit is contained in:
parent
1c1080923b
commit
5d5b3459cd
@ -41,10 +41,10 @@
|
|||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
'item_variant': '[{if $oGtmProduct->getFieldData('oxvarselect')}][{$oGtmProduct->getFieldData('oxvarselect')}][{/if}]',
|
'item_variant': '[{if $oGtmProduct->getFieldData('oxvarselect')}][{$oGtmProduct->getFieldData('oxvarselect')}][{/if}]',
|
||||||
[{if $gtmCategory}]
|
[{if $gtmCategory}]
|
||||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'quantity': iArtQuantity
|
'quantity': iArtQuantity
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
'coupon': '[{foreach from=$gtmOrderVouchers item="gtmOrderVoucher" name="gtmOrderVoucherIteration"}][{$gtmOrderVoucher}][{if !$smarty.foreach.gtmOrderVoucherIteration.last}], [{/if}][{/foreach}]',
|
'coupon': '[{foreach from=$gtmOrderVouchers item="gtmOrderVoucher" name="gtmOrderVoucherIteration"}][{$gtmOrderVoucher}][{if !$smarty.foreach.gtmOrderVoucherIteration.last}], [{/if}][{/foreach}]',
|
||||||
'item_variant': '[{$gtmBasketItem->getFieldData("oxselvariant")}]',
|
'item_variant': '[{$gtmBasketItem->getFieldData("oxselvariant")}]',
|
||||||
[{if $gtmPurchaseItemCategory}]
|
[{if $gtmPurchaseItemCategory}]
|
||||||
'item_category': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(1)}]',
|
'item_category_2': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(2)}]',
|
'item_category_3': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(3)}]',
|
'item_category_4': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name': '[{$gtmPurchaseItemCategory->getSplitCategoryArray()}]',
|
'item_list_name': '[{$gtmPurchaseItemCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'price': [{$gtmPurchaseItemPriceObject->getPrice()}],
|
'price': [{$gtmPurchaseItemPriceObject->getPrice()}],
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
|
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
|
||||||
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
|
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
|
||||||
[{if $gtmBasketItemCategory}]
|
[{if $gtmBasketItemCategory}]
|
||||||
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
|
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
|
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
|
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'price': [{$d3oItemPrice->getPrice()}],
|
'price': [{$d3oItemPrice->getPrice()}],
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]',
|
'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]',
|
||||||
'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]',
|
'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]',
|
||||||
[{if $gtmBasketItemCategory}]
|
[{if $gtmBasketItemCategory}]
|
||||||
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
|
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
|
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
|
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'price': [{$d3oItemPrice->getPrice()}],
|
'price': [{$d3oItemPrice->getPrice()}],
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
'item_variant': '[{if $gtmProduct->getFieldData("oxvarselect")}][{$gtmProduct->getFieldData("oxvarselect")}][{/if}]',
|
'item_variant': '[{if $gtmProduct->getFieldData("oxvarselect")}][{$gtmProduct->getFieldData("oxvarselect")}][{/if}]',
|
||||||
[{if $gtmCategory}]
|
[{if $gtmCategory}]
|
||||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
'price': [{$d3PriceObject->getPrice()}],
|
'price': [{$d3PriceObject->getPrice()}],
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
[{if $gtmCategory}]
|
[{if $gtmCategory}]
|
||||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3, true)}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'quantity': 1
|
'quantity': 1
|
||||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
'price': [{$d3PriceObject->getPrice()}],
|
'price': [{$d3PriceObject->getPrice()}],
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
[{if $gtmCategory}]
|
[{if $gtmCategory}]
|
||||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
|
||||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1, true)}]',
|
||||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2, true)}]',
|
||||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3, true)}]',
|
||||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
||||||
[{/if}]
|
[{/if}]
|
||||||
'quantity': 1
|
'quantity': 1
|
||||||
|
@ -8,9 +8,9 @@ class Category extends Category_parent
|
|||||||
* @param int $indexOfArray
|
* @param int $indexOfArray
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getSplitCategoryArray(int $indexOfArray = -1) :string
|
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string
|
||||||
{
|
{
|
||||||
if ($indexOfArray > -1){
|
if ($bShallTakeStd){
|
||||||
$splitCatArray =
|
$splitCatArray =
|
||||||
array_values(
|
array_values(
|
||||||
array_filter(
|
array_filter(
|
||||||
@ -26,7 +26,7 @@ class Category extends Category_parent
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($splitCatArray[$indexOfArray]){
|
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){
|
||||||
return $splitCatArray[$indexOfArray];
|
return $splitCatArray[$indexOfArray];
|
||||||
}else{
|
}else{
|
||||||
return "";
|
return "";
|
||||||
|
@ -8,9 +8,9 @@ class Manufacturer extends Manufacturer_parent
|
|||||||
* @param int $indexOfArray
|
* @param int $indexOfArray
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getSplitCategoryArray(int $indexOfArray = -1) :string
|
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string
|
||||||
{
|
{
|
||||||
if ($indexOfArray > -1){
|
if ($bShallTakeStd){
|
||||||
$splitCatArray =
|
$splitCatArray =
|
||||||
array_values(
|
array_values(
|
||||||
array_filter(
|
array_filter(
|
||||||
@ -26,7 +26,7 @@ class Manufacturer extends Manufacturer_parent
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($splitCatArray[$indexOfArray]){
|
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){
|
||||||
return $splitCatArray[$indexOfArray];
|
return $splitCatArray[$indexOfArray];
|
||||||
}else{
|
}else{
|
||||||
return "";
|
return "";
|
||||||
|
@ -185,8 +185,8 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
'title' => $oView->getTitle(),
|
'title' => $oView->getTitle(),
|
||||||
'cl' => $cl,
|
'cl' => $cl,
|
||||||
],
|
],
|
||||||
'userid' => ($oUser ? $oUser->getId() : false),
|
'userid' => is_bool($oUser) ? false : $oUser->getId(),
|
||||||
'sessionid' => session_id() ?? false,
|
'sessionid' => session_id(),
|
||||||
//'httpref' => $_SERVER["HTTP_REFERER"] ?? "unknown"
|
//'httpref' => $_SERVER["HTTP_REFERER"] ?? "unknown"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -10,6 +10,6 @@ parameters:
|
|||||||
- '#.*is not subtype of Throwable.*#'
|
- '#.*is not subtype of Throwable.*#'
|
||||||
paths:
|
paths:
|
||||||
- ./
|
- ./
|
||||||
level: 3
|
level: 4
|
||||||
phpVersion: 70200
|
phpVersion: 70200
|
||||||
checkMissingIterableValueType: false
|
checkMissingIterableValueType: false
|
||||||
|
Loading…
Reference in New Issue
Block a user