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

This commit is contained in:
MaxBUhe 2024-01-17 15:36:43 +01:00
bovenliggende 007e83909b
commit 1c1080923b
5 gewijzigde bestanden met toevoegingen van 23 en 17 verwijderingen

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

@ -1,10 +1,15 @@
parameters: parameters:
scanFiles: scanFiles:
- IntelliSenseHelper.php - IntelliSenseHelper.php
- ../../oxid-esales/oxideshop-ce/source/oxfunctions.php - ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/bootstrap.php
- ../../oxid-esales/oxideshop-ce/source/overridablefunctions.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: paths:
- ./ - ./
level: 0 level: 3
phpVersion: 70200 phpVersion: 70200
checkMissingIterableValueType: false checkMissingIterableValueType: false