feat: allow configuration based on shipping classes #1145
54 new issues (0 max.) of at least minor severity.
Here is an overview of what got changed by this pull request:
Issues
======
+ Solved 1
- Added 54
Complexity increasing per file
==============================
- tests/Mock/MockWcShipping.php 2
- tests/Mock/MockWcShippingZone.php 4
- tests/factories/WC_Shipping_Zone_Factory.php 1
- tests/Mock/MockWcShippingMethodFlatRateClass.php 4
- src/WooCommerce/Repository/WcShippingRepository.php 3
- tests/Mock/MockWcShippingZonesClass.php 4
- tests/Mock/MockWpTerm.php 1
- views/frontend/checkout-core/src/utils/getShippingRate.ts 1
- tests/Mock/MockWcShippingMethodClass.php 1
- views/frontend/checkout-delivery-options/src/utils/getHighestShippingClass.ts 2
- src/Pdk/Context/Service/WcContextService.php 5
- tests/Mock/MockWpCache.php 3
- views/frontend/checkout-core/src/utils/useCartStore.ts 1
- tests/factories/WC_Shipping_Method_Factory.php 1
- tests/factories/WC_Shipping_Flat_Rate_Factory.php 1
- tests/Unit/Pdk/Context/Service/WcContextServiceTest.php 2
- tests/mock_wp_functions.php 5
- tests/Mock/MockWcProduct.php 3
- views/frontend/checkout-core/src/main.ts 1
- views/frontend/checkout-delivery-options/src/main.ts 1
Complexity decreasing per file
==============================
+ src/Pdk/Plugin/WcShippingMethodRepository.php -1
See the complete overview on Codacy
Annotations
Check notice on line 77 in tests/Mock/MockWcClass.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcClass.php#L77
The method save_meta_data is not named in camelCase.
Check notice on line 1 in tests/Mock/MockWcShipping.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShipping.php#L1
Missing required strict_types declaration
Check notice on line 64 in tests/Mock/MockWcShipping.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShipping.php#L64
The method get_shipping_classes is not named in camelCase.
Check notice on line 12 in tests/Mock/MockWcShippingMethodClass.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShippingMethodClass.php#L12
The method get_option is not named in camelCase.
Check notice on line 1 in tests/Mock/MockWcShippingZone.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShippingZone.php#L1
Missing required strict_types declaration
Check notice on line 20 in tests/Mock/MockWcShippingZone.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShippingZone.php#L20
The method get_shipping_methods is not named in camelCase.
Check warning on line 42 in tests/Mock/MockWcShippingZonesClass.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShippingZonesClass.php#L42
Avoid unused parameters such as '$context'.
Check notice on line 63 in tests/Mock/MockWcShippingZonesClass.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWcShippingZonesClass.php#L63
The method get_zone is not named in camelCase.
Check warning on line 20 in tests/Mock/MockWpTerm.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWpTerm.php#L20
Avoid unused parameters such as '$taxonomy'.
Check notice on line 20 in tests/Mock/MockWpTerm.php
codacy-production / Codacy Static Code Analysis
tests/Mock/MockWpTerm.php#L20
The method get_instance is not named in camelCase.
Check notice on line 89 in tests/Unit/Pdk/Plugin/WcShippingMethodRepositoryTest.php
codacy-production / Codacy Static Code Analysis
tests/Unit/Pdk/Plugin/WcShippingMethodRepositoryTest.php#L89
Expected 1 blank line at end of file; 2 found
Check notice on line 11 in tests/factories/WC_Shipping_Zone_Factory.php
codacy-production / Codacy Static Code Analysis
tests/factories/WC_Shipping_Zone_Factory.php#L11
The class WC_Shipping_Zone_Factory is not named in CamelCase.
Check notice on line 61 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L61
Only one class is allowed in a file
Check notice on line 61 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L61
The class WC_Shipping_Zones is not named in CamelCase.
Check notice on line 64 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L64
Only one object structure is allowed in a file
Check notice on line 67 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L67
Only one class is allowed in a file
Check notice on line 67 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L67
Opening brace of a class must be on the line after the definition
Check notice on line 70 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L70
Only one class is allowed in a file
Check notice on line 70 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L70
Only one object structure is allowed in a file
Check notice on line 70 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L70
Opening brace of a class must be on the line after the definition
Check notice on line 70 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L70
The class WC_Shipping_Flat_Rate is not named in CamelCase.
Check notice on line 73 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L73
Only one object structure is allowed in a file
Check notice on line 73 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L73
The class WP_Term is not named in CamelCase.
Check notice on line 76 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L76
Only one class is allowed in a file
Check notice on line 76 in tests/mock_class_map.php
codacy-production / Codacy Static Code Analysis
tests/mock_class_map.php#L76
Opening brace of a class must be on the line after the definition