NVision-Commerce-Solutions / module-customer-price

Commerce 365 for Magento - Magento 2 Extension - Customer Price Module
https://n.vision/products/commerce-365-for-magento-b2b/
2 stars 4 forks source link

Return $this in apply method of data patch #4

Closed hostep closed 1 year ago

hostep commented 1 year ago

The PatchInterface this class implements, expects the apply() method to return $this: https://github.com/magento/magento2/blob/2.4.6/lib/internal/Magento/Framework/Setup/Patch/PatchInterface.php#L31

Was found using phpstan running on level 1:

 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   module-customer-price/Setup/Patch/Data/AddCustomerCurrencyAttribute.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  64     Method Commerce365\CustomerPrice\Setup\Patch\Data\AddCustomerCurrencyAttribute::apply() should return $this(Commerce365\CustomerPrice\Setup\Patch\Data\AddCustomerCurrencyAttribute) but return statement is missing.