[Changed] phpStan - set level to 3, clean files by level

This commit is contained in:
MaxBUhe 2024-01-17 15:36:43 +01:00
parent 007e83909b
commit 1c1080923b
5 changed files with 23 additions and 17 deletions

View File

@ -11,7 +11,7 @@ use oxSystemComponentException;
class BasketController extends BasketController_parent
{
/**
* @throws oxSystemComponentException
* @return string
*/
public function render()
{
@ -33,22 +33,18 @@ class BasketController extends BasketController_parent
$aProducts = Registry::getRequest()->getRequestEscapedParameter('aproducts');
// collecting specified item
$sProductId = $sProductId ?? Registry::getRequest()->getRequestEscapedParameter('aid');
$sProductId = Registry::getRequest()->getRequestEscapedParameter('aid');
if ($sProductId) {
// additionally fetching current product info
$dAmount = $dAmount ?? Registry::getRequest()->getRequestEscapedParameter('am');
$dAmount = Registry::getRequest()->getRequestEscapedParameter('am');
// select lists
$aSel = $aSel ?? Registry::getRequest()->getRequestEscapedParameter('sel');
// persistent parameters
if (empty($aPersParam)) {
$aSel = Registry::getRequest()->getRequestEscapedParameter('sel');
/** @var BasketComponent $oBasketComponent */
$oBasketComponent = $this->getComponent('oxcmp_basket');
$aPersParam = $oBasketComponent->__call('getPersistedParameters', []);
}
$sBasketItemId = Registry::getRequest()->getRequestEscapedParameter('bindex');

View File

@ -3,6 +3,7 @@
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
use OxidEsales\Eshop\Application\Model\Country;
use OxidEsales\Eshop\Application\Model\Order;
class ThankYouController extends ThankYouController_parent
{
@ -11,7 +12,9 @@ class ThankYouController extends ThankYouController_parent
*/
public function d3GAGetUserCountry()
{
$sCountryId = $this->getOrder()->getFieldData('oxbillcountryid');
/** @var Order $oOrder */
$oOrder = $this->getOrder();
$sCountryId = $oOrder->getFieldData('oxbillcountryid');
/** @var Country $oCountry */
$oCountry = oxNew(Country::class);

View File

@ -7,7 +7,7 @@ use OxidEsales\Eshop\Application\Model\Payment;
class Basket extends Basket_parent
{
/**
* @return void
* @return string
*/
public function getPaymentOnPaymentId() :string
{

View File

@ -15,6 +15,7 @@ namespace D3\GoogleAnalytics4\Modules\Core;
use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
use OxidEsales\Eshop\Application\Controller\FrontendController;
use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Registry;
class ViewConfig extends ViewConfig_parent
@ -160,7 +161,8 @@ class ViewConfig extends ViewConfig_parent
$oConfig = Registry::getConfig();
$oView = $oConfig->getTopActiveView();
/** @var FrontendController $oShop */
/** @var User $oUser */
$oUser = $oConfig->getUser();
$cl = $this->getTopActiveClassName();

View File

@ -1,10 +1,15 @@
parameters:
scanFiles:
- IntelliSenseHelper.php
- ../../oxid-esales/oxideshop-ce/source/oxfunctions.php
- ../../oxid-esales/oxideshop-ce/source/overridablefunctions.php
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/bootstrap.php
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/oxfunctions.php
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/overridablefunctions.php
scanDirectories:
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales
ignoreErrors:
- '#.*is not subtype of Throwable.*#'
paths:
- ./
level: 0
level: 3
phpVersion: 70200
checkMissingIterableValueType: false