Skip to content

Add Missing Return Type Annotations to Custom Order Fees Interface#96

Merged
JosephLeedy merged 2 commits intomainfrom
94-add-missing-return-annotation
Nov 26, 2025
Merged

Add Missing Return Type Annotations to Custom Order Fees Interface#96
JosephLeedy merged 2 commits intomainfrom
94-add-missing-return-annotation

Conversation

@JosephLeedy
Copy link
Owner

@JosephLeedy JosephLeedy commented Nov 24, 2025

Fixes "Method's return type must be specified using @return annotation" error.

Fixes #94. A huge thanks to @avstaylime for reporting this issue and providing a patch to resolve it. 👏🏽

Fixes "Method's return type must be specified using @return annotation"
error.

Fixes #94. A huge thanks to [@avstaylime](https://github.com/avstaylime)
for reporting this issue and providing a patch to resolve it.
@JosephLeedy JosephLeedy self-assigned this Nov 24, 2025
@JosephLeedy JosephLeedy added the bug Something isn't working label Nov 24, 2025
@JosephLeedy JosephLeedy moved this from Backlog to In review in Custom Fees for Magento 2 Nov 24, 2025
@github-actions
Copy link

Code Coverage Report:
  2025-11-24 22:08:57

 Summary:
  Classes: 30.77% (20/65)
  Methods: 51.63% (111/215)
  Lines:   78.03% (1616/2071)

JosephLeedy\CustomFees\Block\Adminhtml\CustomOrderFees\Report
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 16/ 16)
JosephLeedy\CustomFees\Block\Adminhtml\CustomOrderFees\Report\Filter\Form\CustomOrderFees
  Methods:   0.00% ( 0/ 1)   Lines:  97.73% ( 43/ 44)
JosephLeedy\CustomFees\Block\Adminhtml\CustomOrderFees\Report\Grid
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% (164/164)
JosephLeedy\CustomFees\Block\Adminhtml\CustomOrderFees\Report\Grid\Column\Renderer\Currency\LocalizedFeeAmount
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 20/ 20)
JosephLeedy\CustomFees\Block\Adminhtml\Sales\Order\Creditmemo\Create\Totals
  Methods:  40.00% ( 2/ 5)   Lines:  75.00% ( 39/ 52)
JosephLeedy\CustomFees\Block\Sales\Order\Creditmemo\Totals
  Methods:  66.67% ( 2/ 3)   Lines:  94.74% ( 36/ 38)
JosephLeedy\CustomFees\Block\Sales\Order\Invoice\Totals
  Methods:  66.67% ( 2/ 3)   Lines:  93.02% ( 40/ 43)
JosephLeedy\CustomFees\Block\Sales\Order\Totals
  Methods:  66.67% ( 2/ 3)   Lines:  93.33% ( 28/ 30)
JosephLeedy\CustomFees\Block\System\Config\Form\Field\CustomFees\Advanced\Form
  Methods:  50.00% ( 3/ 6)   Lines:  84.62% ( 77/ 91)
JosephLeedy\CustomFees\Controller\Adminhtml\Config\Export\ExampleCsv
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 16/ 16)
JosephLeedy\CustomFees\Controller\Adminhtml\Report\CustomOrderFees
  Methods:  75.00% ( 3/ 4)   Lines:  80.56% ( 29/ 36)
JosephLeedy\CustomFees\Controller\Adminhtml\Report\CustomOrderFees\Export\Csv
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  4/  4)
JosephLeedy\CustomFees\Controller\Adminhtml\Report\CustomOrderFees\Export\Excel
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  4/  4)
JosephLeedy\CustomFees\Controller\Adminhtml\System\Config\CustomFees\Advanced\Form
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 20/ 20)
JosephLeedy\CustomFees\Controller\Adminhtml\System\Config\CustomFees\Advanced\NewConditionHtml
  Methods:  50.00% ( 1/ 2)   Lines:  82.76% ( 24/ 29)
JosephLeedy\CustomFees\Model\Checkout\ConfigProvider\CustomFees
  Methods:  50.00% ( 1/ 2)   Lines:  80.00% (  8/ 10)
JosephLeedy\CustomFees\Model\Config
  Methods:  50.00% ( 1/ 2)   Lines:  79.55% ( 35/ 44)
JosephLeedy\CustomFees\Model\Config\Backend\File\ImportCustomFees
  Methods:  80.00% ( 4/ 5)   Lines:  93.14% ( 95/102)
JosephLeedy\CustomFees\Model\CustomOrderFees
  Methods:  63.64% ( 7/11)   Lines:  73.91% ( 34/ 46)
JosephLeedy\CustomFees\Model\CustomOrderFeesRepository
  Methods:  33.33% ( 2/ 6)   Lines:  33.33% ( 15/ 45)
JosephLeedy\CustomFees\Model\FeeStatus
  Methods:  50.00% ( 1/ 2)   Lines:  42.86% (  3/  7)
JosephLeedy\CustomFees\Model\FeeType
  Methods:  33.33% ( 1/ 3)   Lines:  27.27% (  3/ 11)
JosephLeedy\CustomFees\Model\ResourceModel\CustomOrderFees
  Methods:  75.00% ( 3/ 4)   Lines:  50.00% (  7/ 14)
JosephLeedy\CustomFees\Model\ResourceModel\CustomOrderFees\Collection
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  1/  1)
JosephLeedy\CustomFees\Model\ResourceModel\Report\CustomOrderFees
  Methods:  75.00% ( 3/ 4)   Lines:  77.78% ( 42/ 54)
JosephLeedy\CustomFees\Model\ResourceModel\Report\CustomOrderFees\Collection
  Methods:  75.00% ( 3/ 4)   Lines:  94.29% ( 33/ 35)
JosephLeedy\CustomFees\Model\Rule\Condition\Combine
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 47/ 47)
JosephLeedy\CustomFees\Model\Rule\Condition\Product
  Methods:   0.00% ( 0/ 1)   Lines:  66.67% (  2/  3)
JosephLeedy\CustomFees\Model\Rule\Condition\Quote
  Methods:  20.00% ( 1/ 5)   Lines:  27.78% (  5/ 18)
JosephLeedy\CustomFees\Model\Rule\Condition\QuoteAddress
  Methods:  71.43% ( 5/ 7)   Lines:  86.84% ( 33/ 38)
JosephLeedy\CustomFees\Model\Rule\CustomFees
  Methods:  50.00% ( 2/ 4)   Lines:  86.67% ( 13/ 15)
JosephLeedy\CustomFees\Model\Sales\Pdf\CustomFees
  Methods:  50.00% ( 2/ 4)   Lines:  94.74% ( 36/ 38)
JosephLeedy\CustomFees\Model\Total\Creditmemo\CustomFees
  Methods:  75.00% ( 3/ 4)   Lines:  78.95% ( 75/ 95)
JosephLeedy\CustomFees\Model\Total\Invoice\CustomFees
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 28/ 28)
JosephLeedy\CustomFees\Model\Total\Quote\CustomFees
  Methods:  50.00% ( 2/ 4)   Lines:  81.67% ( 49/ 60)
JosephLeedy\CustomFees\Observer\AddFieldToProductAttributeEditForm
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 16/ 16)
JosephLeedy\CustomFees\Observer\BeforeQuoteSubmitObserver
  Methods:  50.00% ( 1/ 2)   Lines:  91.67% ( 11/ 12)
JosephLeedy\CustomFees\Plugin\Framework\View\Element\UiComponent\DataProvider\CollectionFactoryPlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 13/ 13)
JosephLeedy\CustomFees\Plugin\Framework\View\Element\UiComponent\DataProvider\DataProviderPlugin
  Methods:  50.00% ( 1/ 2)   Lines:  90.62% ( 29/ 32)
JosephLeedy\CustomFees\Plugin\Quote\Api\Data\TotalsInterfacePlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 28/ 28)
JosephLeedy\CustomFees\Plugin\Reports\Model\ResourceModel\Refresh\CollectionPlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 20/ 20)
JosephLeedy\CustomFees\Plugin\Sales\Api\CreditmemoRepositoryInterfacePlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 23/ 23)
JosephLeedy\CustomFees\Plugin\Sales\Api\OrderRepositoryInterfacePlugin
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 21/ 21)
JosephLeedy\CustomFees\Plugin\Sales\Block\Order\TotalsPlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 25/ 25)
JosephLeedy\CustomFees\Plugin\Sales\Model\Convert\OrderPlugin
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% (  6/  6)
JosephLeedy\CustomFees\Plugin\Sales\Model\Order\InvoicePlugin
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 25/ 25)
JosephLeedy\CustomFees\Plugin\Ui\Component\AbstractComponentPlugin
  Methods:  50.00% ( 1/ 2)   Lines:  93.88% ( 46/ 49)
JosephLeedy\CustomFees\Service\ConditionsApplier
  Methods:  33.33% ( 1/ 3)   Lines:  78.57% ( 11/ 14)
JosephLeedy\CustomFees\Service\ConfigUpdater
  Methods:  42.86% ( 3/ 7)   Lines:  82.76% ( 48/ 58)
JosephLeedy\CustomFees\Service\CustomFeesRetriever
  Methods:  40.00% ( 2/ 5)   Lines:  90.62% ( 29/ 32)
JosephLeedy\CustomFees\Service\InvoicedCustomFeesRecorder
  Methods:  66.67% ( 2/ 3)   Lines:  98.25% ( 56/ 57)
JosephLeedy\CustomFees\Service\RefundedCustomFeesRecorder
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 57/ 57)
JosephLeedy\CustomFees\Setup\Patch\Data\AddFieldsToCustomOrderFeesPatch
  Methods:  25.00% ( 1/ 4)   Lines:  90.32% ( 28/ 31)

@JosephLeedy
Copy link
Owner Author

I cannot get the functional tests to pass for Luma in GHA, but they do pass locally. I don't think that the issue is related to the changes made by this pull request, so I am going to mark this as "Ready to Merge."

@JosephLeedy JosephLeedy moved this from In review to Ready to Merge in Custom Fees for Magento 2 Nov 25, 2025
@github-actions

This comment was marked as duplicate.

@JosephLeedy JosephLeedy merged commit de380a9 into main Nov 26, 2025
14 of 31 checks passed
@JosephLeedy JosephLeedy deleted the 94-add-missing-return-annotation branch November 26, 2025 16:25
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Custom Fees for Magento 2 Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Custom Order Fees Interface Methods Have Missing Return Type Annotations

1 participant