Skip to content

Commit 70b5d28

Browse files
committed
Tweak - Move the stranded docblock onto the method it documents.
The docblock for test_get_backend_line_items_sends_shipping_only_status_as_exempt() sat above the cart-path test instead, leaving the backend test with no docblock. PHPCS binds a docblock to the immediately following token, so the orphan became a floating comment and Squiz.Commenting.FunctionComment.Missing fired on the method 60 lines below it. WordPress-Docs loads globally in .phpcs.php.xml and its tests/ exclusions do not cover Squiz.Commenting.FunctionComment, so the sniff does apply to tests/. Measured across both changed PHP files, --report=source: merge-base 590070b : 192 violations / 31 sources before this commit : 193 / 31 (FunctionComment.Missing 3 -> 4) after this commit : 192 / 31, byte-identical to baseline
1 parent 5af8404 commit 70b5d28

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/php/test-class-wc-connect-taxjar-integration.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,12 +2261,6 @@ function ( $taxable, $product ) use ( $filtered_id ) {
22612261
WC_Helper_Product::delete_product( $filtered_id );
22622262
}
22632263

2264-
/**
2265-
* Tax Status "Shipping only" is exempt from item tax, and the backend order path
2266-
* sends it to TaxJar as exempt (code 99999) — unlike the cart path, which excludes
2267-
* that status from the exempt branch. This is the input side of the zeroing bug:
2268-
* an exempt code is what makes TaxJar return the 0% breakdown line.
2269-
*/
22702264
/**
22712265
* Cart path: a "Shipping only" product must NOT be recorded as non-taxable.
22722266
*
@@ -2347,6 +2341,12 @@ public function test_get_line_items_still_records_none_status_as_non_taxable() {
23472341
WC_Helper_Product::delete_product( $product->get_id() );
23482342
}
23492343

2344+
/**
2345+
* Tax Status "Shipping only" is exempt from item tax, and the backend order path
2346+
* sends it to TaxJar as exempt (code 99999) — unlike the cart path, which excludes
2347+
* that status from the exempt branch. This is the input side of the zeroing bug:
2348+
* an exempt code is what makes TaxJar return the 0% breakdown line.
2349+
*/
23502350
public function test_get_backend_line_items_sends_shipping_only_status_as_exempt() {
23512351
$product = WC_Helper_Product::create_simple_product();
23522352
$product->set_tax_status( 'shipping' );

0 commit comments

Comments
 (0)