Skip to content

Conversation

@FJiskra
Copy link
Contributor

@FJiskra FJiskra commented Dec 17, 2025

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

📊 Code Coverage Report



Code Coverage Report:
  2026-01-06 09:15:09

 Summary:
  Classes: 16.51% (35/212)
  Methods: 31.95% (454/1421)
  Lines:   21.59% (2459/11389)

Packetery\Core\Api\InvalidRequestException
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% (  3/  3)
Packetery\Core\Api\Rest\Exception\InvalidApiKeyException
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% (  2/  2)
Packetery\Core\Api\Rest\PickupPointValidate
  Methods:  66.67% ( 2/ 3)   Lines:  95.24% ( 20/ 21)
Packetery\Core\Api\Rest\PickupPointValidateRequest
  Methods:  50.00% ( 1/ 2)   Lines:  61.29% ( 19/ 31)
Packetery\Core\Api\Rest\PickupPointValidateResponse
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% (  4/  4)
Packetery\Core\Api\Soap\Request\PacketCourierNumber
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% (  2/  2)
Packetery\Core\Api\Soap\Request\PacketSetStoredUntil
  Methods:  33.33% ( 1/ 3)   Lines:  37.50% (  3/  8)
Packetery\Core\Api\Soap\Request\PacketStatus
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% (  2/  2)
Packetery\Core\Api\Soap\Request\PacketsCourierLabelsPdf
  Methods:  25.00% ( 1/ 4)   Lines:  50.00% (  3/  6)
Packetery\Core\Api\Soap\Request\PacketsLabelsPdf
  Methods:  25.00% ( 1/ 4)   Lines:  50.00% (  3/  6)
Packetery\Core\Api\Soap\Response\BaseResponse
  Methods:  37.50% ( 3/ 8)   Lines:  37.50% (  3/  8)
Packetery\Core\CoreHelper
  Methods:  77.78% ( 7/ 9)   Lines:  92.86% ( 26/ 28)
Packetery\Core\Entity\Address
  Methods: 100.00% (14/14)   Lines: 100.00% ( 22/ 22)
Packetery\Core\Entity\Carrier
  Methods: 100.00% (19/19)   Lines: 100.00% ( 34/ 34)
Packetery\Core\Entity\CustomsDeclaration
  Methods: 100.00% (26/26)   Lines: 100.00% ( 36/ 36)
Packetery\Core\Entity\CustomsDeclarationItem
  Methods: 100.00% (16/16)   Lines: 100.00% ( 22/ 22)
Packetery\Core\Entity\Order
  Methods:  95.33% (102/107)   Lines:  94.66% (124/131)
Packetery\Core\Entity\PacketStatus
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% (  6/  6)
Packetery\Core\Entity\PickupPoint
  Methods:  87.50% (14/16)   Lines:  94.87% ( 37/ 39)
Packetery\Core\Entity\Size
  Methods: 100.00% ( 7/ 7)   Lines: 100.00% (  9/  9)
Packetery\Core\PickupPointProvider\BaseProvider
  Methods: 100.00% ( 9/ 9)   Lines: 100.00% ( 14/ 14)
Packetery\Core\PickupPointProvider\CompoundCarrierCollectionFactory
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% ( 50/ 50)
Packetery\Core\PickupPointProvider\CompoundProvider
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)
Packetery\Core\PickupPointProvider\VendorCollectionFactory
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% ( 74/ 74)
Packetery\Core\PickupPointProvider\VendorProvider
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)
Packetery\Core\Rounder
  Methods: 100.00% ( 7/ 7)   Lines: 100.00% ( 47/ 47)
Packetery\Core\Validator\Address
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  1/  1)
Packetery\Core\Validator\Order
  Methods: 100.00% ( 7/ 7)   Lines: 100.00% ( 40/ 40)
Packetery\Core\Validator\Size
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  5/  5)
Packetery\Core\Validator\SizeReport
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% (  6/  6)
Packetery\Module\Carrier\CarrierUpdater
  Methods:  75.00% ( 3/ 4)   Lines:  95.65% ( 22/ 23)
Packetery\Module\Carrier\OptionPrefixer
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% (  3/  3)
Packetery\Module\Carrier\Options
  Methods:  41.18% ( 7/17)   Lines:  23.33% (  7/ 30)
Packetery\Module\Carrier\OptionsPage
  Methods:  11.11% ( 3/27)   Lines:   4.04% ( 20/495)
Packetery\Module\Carrier\PacketaPickupPointsConfig
  Methods:  41.67% ( 5/12)   Lines:  68.06% ( 49/ 72)
Packetery\Module\Checkout\CartService
  Methods:  80.00% ( 8/10)   Lines:  97.20% (139/143)
Packetery\Module\Checkout\Checkout
  Methods:  85.71% ( 6/ 7)   Lines:  75.10% (187/249)
Packetery\Module\Checkout\CheckoutService
  Methods:  78.57% (11/14)   Lines:  92.65% ( 63/ 68)
Packetery\Module\Checkout\CheckoutStorage
  Methods:  45.45% ( 5/11)   Lines:  44.44% ( 36/ 81)
Packetery\Module\Checkout\CheckoutValidator
  Methods:  57.14% ( 4/ 7)   Lines:  69.61% ( 71/102)
Packetery\Module\Checkout\CurrencySwitcherService
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% (  8/  8)
Packetery\Module\Checkout\OrderUpdater
  Methods:  85.71% ( 6/ 7)   Lines:  92.50% (111/120)
Packetery\Module\Checkout\RateCalculator
  Methods: 100.00% ( 6/ 6)   Lines: 100.00% ( 93/ 93)
Packetery\Module\Checkout\SessionService
  Methods: 100.00% ( 5/ 5)   Lines: 100.00% ( 15/ 15)
Packetery\Module\Checkout\ShippingRateFactory
  Methods:  71.43% ( 5/ 7)   Lines:  97.94% ( 95/ 97)
Packetery\Module\Dashboard\DashboardItemBuilder
  Methods:  33.33% ( 2/ 6)   Lines:   9.48% ( 11/116)
Packetery\Module\Email\BugReportAttachment
  Methods:  12.50% ( 1/ 8)   Lines:  64.41% ( 38/ 59)
Packetery\Module\Email\BugReportEmail
  Methods:  66.67% ( 2/ 3)   Lines:  97.37% ( 37/ 38)
Packetery\Module\Email\EmailShortcodes
  Methods:  88.24% (15/17)   Lines:  79.41% ( 81/102)
Packetery\Module\EntityFactory\SizeFactory
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 19/ 19)
Packetery\Module\FormValidators
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% ( 15/ 15)
Packetery\Module\Forms\BugReportForm
  Methods:  83.33% ( 5/ 6)   Lines:  98.25% ( 56/ 57)
Packetery\Module\Labels\CarrierLabelService
  Methods: 100.00% ( 6/ 6)   Lines: 100.00% ( 82/ 82)
Packetery\Module\Labels\LabelPrintPacketData
  Methods:  66.67% ( 6/ 9)   Lines:  76.92% ( 20/ 26)
Packetery\Module\Labels\LabelPrintPacketDataItem
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% (  4/  4)
Packetery\Module\Labels\LabelPrintParametersService
  Methods: 100.00% ( 6/ 6)   Lines: 100.00% ( 42/ 42)
Packetery\Module\Log\ArgumentTypeErrorLogger
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 25/ 25)
Packetery\Module\Message
  Methods: 100.00% ( 7/ 7)   Lines: 100.00% ( 12/ 12)
Packetery\Module\MessageManager
  Methods:  87.50% ( 7/ 8)   Lines:  87.88% ( 29/ 33)
Packetery\Module\ModuleHelper
  Methods:  26.32% ( 5/19)   Lines:  15.48% ( 13/ 84)
Packetery\Module\Options\OptionsProvider
  Methods:  12.73% ( 7/55)   Lines:  21.96% ( 47/214)
Packetery\Module\Order\DetailCommonLogic
  Methods:  50.00% ( 3/ 6)   Lines:  32.35% ( 11/ 34)
Packetery\Module\Order\Form
  Methods:  40.00% ( 2/ 5)   Lines:  27.91% ( 24/ 86)
Packetery\Module\Order\LabelPrint
  Methods:  13.33% ( 2/15)   Lines:  27.75% ( 63/227)
Packetery\Module\Order\MetaboxesWrapper
  Methods:  50.00% ( 2/ 4)   Lines:  63.16% ( 12/ 19)
Packetery\Module\Order\PacketSetStoredUntil
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 32/ 32)
Packetery\Module\Order\PacketSynchronizer
  Methods:  42.86% ( 3/ 7)   Lines:  84.09% ( 74/ 88)
Packetery\Module\Order\PickupPointValidator
  Methods:  66.67% ( 2/ 3)   Lines:  76.19% ( 32/ 42)
Packetery\Module\Plugin
  Methods:  20.00% ( 1/ 5)   Lines:   6.67% (  1/ 15)
Packetery\Module\Shipping\ShippingProvider
  Methods:  27.27% ( 3/11)   Lines:  50.70% ( 36/ 71)
Packetery\Module\WeightCalculator
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 13/ 13)
Packetery\Module\WidgetOptionsBuilder
  Methods:  80.00% ( 4/ 5)   Lines:  98.59% ( 70/ 71)
Packetery\Module\WidgetUrlResolver
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% (  4/  4)

@FJiskra FJiskra force-pushed the PES-2943-prerelease_refactor-wc-logger-class branch 3 times, most recently from 7ca15f7 to d995430 Compare December 19, 2025 09:54
- Move from Packetery\Module to Packetery\Module\Log namespace
- Rename class to ArgumentTypeErrorLogger for single-purpose clarity
- Make methods non-static with WcAdapter and WpAdapter injected via constructor
- Rename logArgumentTypeError() to log() and inline original log() method
- Keep write() method as private helper
- Use WpAdapter for didAction() and addAction() calls instead of direct WordPress functions
- Update all usages across codebase (10 files)
- Add comprehensive unit tests with full coverage
- Modernize code with PHP 7.4+ typed properties
- Add complete PHPDoc documentation
@FJiskra FJiskra force-pushed the PES-2943-prerelease_refactor-wc-logger-class branch from d995430 to e35a858 Compare December 19, 2025 09:58
J7F added 5 commits January 5, 2026 10:38
- Remove Logger::formatMessage call (message is always string)
- Remove $level parameter from write() method, use constant directly
- Remove PHPDoc from BulkActions constructor
- Type properties and remove PHPDoc comments in Checkout class
- Update tests to use string arguments for realistic error scenarios
- Update composer/composer from ^2.6 to ^2.9.3
- Fixes CVE-2025-67746 (ANSI sequence injection vulnerability)
- Remove PHPDoc from all 7 constructors with @param ArgumentTypeErrorLogger
- Type all 12 properties with @var ArgumentTypeErrorLogger
- Update tests to use string as givenValue while keeping original expectedType
@zemekoule zemekoule merged commit e72ba31 into pre-release Jan 8, 2026
9 checks passed
@zemekoule zemekoule deleted the PES-2943-prerelease_refactor-wc-logger-class branch January 8, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants