Skip to content

Move line length limit exceptions to inline comments#2776

Merged
Crabcyborg merged 12 commits into
masterfrom
move_line_length_limit_exceptions_to_comments
Jan 12, 2026
Merged

Move line length limit exceptions to inline comments#2776
Crabcyborg merged 12 commits into
masterfrom
move_line_length_limit_exceptions_to_comments

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg commented Jan 12, 2026

I don't want to introduce more line length issues, so I'm moving these exceptions from ignoring entire files to individual lines.

A lot of the long lines are translations that likely won't change, so this is probably the best direction long term.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Walkthrough

Adds inline PHPCS ignore comments (primarily SlevomatCodingStandard.Files.LineLength.LineTooLong) across many files to suppress line-length linter warnings. All edits are comments/formatting only; no functional, control-flow, or public API signature changes.

Changes

Cohort / File(s) Summary
Controllers
classes/controllers/FrmAddonsController.php, classes/controllers/FrmAppController.php, classes/controllers/FrmDashboardController.php, classes/controllers/FrmEntriesController.php, classes/controllers/FrmFormActionsController.php, classes/controllers/FrmFormsController.php, classes/controllers/FrmInboxController.php, classes/controllers/FrmOnboardingWizardController.php, classes/controllers/FrmSMTPController.php, classes/controllers/FrmSettingsController.php, classes/controllers/FrmStylesController.php, classes/controllers/FrmXMLController.php
Appended inline // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong comments to long lines (HTML strings, enqueue calls, submenu registrations, etc.). No logic or signatures changed.
Helpers
classes/helpers/FrmAppHelper.php, classes/helpers/FrmCSVExportHelper.php, classes/helpers/FrmEmailSummaryHelper.php, classes/helpers/FrmEntriesHelper.php, classes/helpers/FrmEntriesListHelper.php, classes/helpers/FrmFieldsHelper.php, classes/helpers/FrmFormMigratorsHelper.php, classes/helpers/FrmFormTemplatesHelper.php, classes/helpers/FrmFormsHelper.php, classes/helpers/FrmFormsListHelper.php, classes/helpers/FrmListHelper.php, classes/helpers/FrmStylesCardHelper.php, classes/helpers/FrmStylesHelper.php, classes/helpers/FrmXMLHelper.php
Added/relocated PHPCS ignore comments for long string literals, SVG blocks, and generated HTML. Behavior and return values unchanged.
Models
classes/models/FrmAddon.php, classes/models/FrmEntry.php, classes/models/FrmEntryMeta.php, classes/models/FrmEntryValidate.php, classes/models/FrmField.php, classes/models/FrmForm.php, classes/models/FrmFormAction.php, classes/models/FrmInbox.php, classes/models/FrmMigrate.php, classes/models/FrmPluginSearch.php, classes/models/FrmRecaptchaSettings.php, classes/models/FrmReviews.php, classes/models/FrmSolution.php, classes/models/FrmStyle.php, classes/models/FrmTurnstileSettings.php
Appended PHPCS line-length ignore comments to long message strings, SQL/query lines, and inline HTML. No changes to logic, signatures, or control flow.
Field models
classes/models/fields/FrmFieldType.php, classes/models/fields/FrmFieldUserID.php
Added PHPCS ignore comments to long return/HTML lines; no behavioral changes.
Stripe modules
stripe/helpers/FrmStrpLiteAppHelper.php, stripe/helpers/FrmStrpLiteConnectHelper.php, stripe/helpers/FrmTransLiteListHelper.php, stripe/models/FrmStrpLiteAuth.php, stripe/models/FrmTransLiteAction.php
Inserted PHPCS line-length ignore comments around SVG output, dropdown/option rendering, and warning strings. No logic changes.
Tests
tests/phpunit/base/FrmUnitTest.php, tests/phpunit/database/test_FrmMigrate.php, tests/phpunit/entries/test_FrmShowEntryShortcode.php, tests/phpunit/fields/test_FrmFieldType.php, tests/phpunit/fields/test_FrmFieldsAjax.php, tests/phpunit/forms/test_FrmForm.php, tests/phpunit/misc/test_FrmAppController.php, tests/phpunit/misc/test_FrmAppHelper.php, tests/phpunit/misc/test_FrmMisc.php, tests/phpunit/misc/test_FrmOverlayController.php, tests/phpunit/onboarding-wizard/test_FrmOnboardingWizardController.php, tests/phpunit/xml/test_FrmXMLController.php, tests/phpunit/xml/test_FrmXMLHelper.php
Appended or relocated PHPCS ignore comments in assertions and expected strings; one test adjusted expected ARIA composition ordering (see file list) — otherwise test logic intact.

Sequence Diagram(s)

(omitted — changes are formatting-only and do not introduce new multi-component control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: moving line length limit exceptions from file-level ignores to inline comments on individual lines.
Docstring Coverage ✅ Passed Docstring coverage is 97.56% which is sufficient. The required threshold is 80.00%.
Description check ✅ Passed The PR description accurately describes the changeset: moving line length exceptions from file-level ignores to inline comments on individual lines.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
classes/helpers/FrmAppHelper.php (1)

3999-4011: HTML markup appears to open <th> and close </td> (possible typo).

This may be pre-existing, but since this line is touched: the string starts with <th ...> and ends with </td></tr>. If this renders in WP fine, ignore; otherwise swap to </th> or open a <td>.

Possible fix (if this is unintended)
-		echo '<tr class="plugin-update-tr active"><th colspan="' . absint( $wp_list_table->get_column_count() ) . '" class="check-column plugin-update colspanchange"><div class="update-message">' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		echo '<tr class="plugin-update-tr active"><td colspan="' . absint( $wp_list_table->get_column_count() ) . '" class="check-column plugin-update colspanchange"><div class="update-message">' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
 			esc_html__( 'You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable.', 'formidable' ) .
-			'</div></td></tr>';
+			'</div></td></tr>';
🧹 Nitpick comments (28)
stripe/helpers/FrmStrpLiteAppHelper.php (1)

146-146: LGTM - phpcs:ignore directive correctly added.

The inline suppression comment is properly formatted and achieves the PR objective of narrowing the scope of line-length exceptions from file-level to specific lines.

Optional: While the inline ignore works, you could eliminate the need for the suppression by extracting the link HTML to variables:

♻️ Optional refactor to avoid line-length exception
+$stripe_link_open  = '<a href="?page=formidable-settings&t=stripe_settings" target="_blank">';
+$square_link_open  = '<a href="?page=formidable-settings&t=square_settings" target="_blank">';
+$link_close        = '</a>';
 printf(
-	esc_html__( 'Credit Cards will not work without %1$sconnecting Stripe%2$s or %3$sconnecting Square%4$s first.', 'formidable' ), '<a href="?page=formidable-settings&t=stripe_settings" target="_blank">', '</a>', '<a href="?page=formidable-settings&t=square_settings" target="_blank">', '</a>' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+	esc_html__( 'Credit Cards will not work without %1$sconnecting Stripe%2$s or %3$sconnecting Square%4$s first.', 'formidable' ),
+	$stripe_link_open,
+	$link_close,
+	$square_link_open,
+	$link_close
+);
tests/phpunit/onboarding-wizard/test_FrmOnboardingWizardController.php (1)

44-44: Change aligns with PR objectives.

The phpcs:ignore comment correctly suppresses the line-length violation and achieves the stated goal of narrowing the scope of exceptions from file-level to inline.

As an optional improvement, consider reformatting to avoid needing the suppression comment:

♻️ Optional refactor to eliminate phpcs:ignore
-		$this->assertEquals( 'no', get_transient( $this->controller::TRANSIENT_NAME ), 'Transient should be set to "no" to indicate a redirect to the Onboarding Wizard is expected.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		$expected_message = 'Transient should be set to "no" to indicate a redirect to the Onboarding Wizard is expected.';
+		$this->assertEquals( 'no', get_transient( $this->controller::TRANSIENT_NAME ), $expected_message );

Or use multi-line formatting:

-		$this->assertEquals( 'no', get_transient( $this->controller::TRANSIENT_NAME ), 'Transient should be set to "no" to indicate a redirect to the Onboarding Wizard is expected.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		$this->assertEquals(
+			'no',
+			get_transient( $this->controller::TRANSIENT_NAME ),
+			'Transient should be set to "no" to indicate a redirect to the Onboarding Wizard is expected.'
+		);
stripe/helpers/FrmTransLiteListHelper.php (1)

459-459: Change aligns with PR objectives.

The inline phpcs:ignore comment successfully narrows the scope of the line length exception as intended. The delete action implementation is functionally correct with proper escaping.

♻️ Optional refactor for improved readability

Consider breaking this long line into multiple variables or using sprintf() for better maintainability:

-		$actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" data-frmverify="' . esc_attr__( 'Permanently delete this payment?', 'formidable' ) . '" data-frmverify-btn="frm-button-red">' . esc_html__( 'Delete', 'formidable' ) . '</a>'; // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		$delete_url     = esc_url( wp_nonce_url( $delete_link ) );
+		$delete_verify  = esc_attr__( 'Permanently delete this payment?', 'formidable' );
+		$delete_text    = esc_html__( 'Delete', 'formidable' );
+		$actions['delete'] = sprintf(
+			'<a href="%s" data-frmverify="%s" data-frmverify-btn="frm-button-red">%s</a>',
+			$delete_url,
+			$delete_verify,
+			$delete_text
+		);

This eliminates the need for the suppression comment while improving code readability.

classes/models/FrmSolution.php (1)

695-695: Inline suppression is acceptable; consider multi-line formatting.

The phpcs:ignore comment addresses the line length violation as intended. The approach aligns with the PR's objective to narrow the scope of exceptions.

♻️ Optional refactor for improved readability

If you prefer improved readability, consider breaking the input attributes across multiple lines:

-				<input type="text" name="pages[<?php echo esc_html( $page['type'] ); ?>]" value="<?php echo esc_attr( $page['name'] ); ?>" id="pages_<?php echo esc_html( $page['type'] ); ?>" required /><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
+				<input type="text"
+					name="pages[<?php echo esc_html( $page['type'] ); ?>]"
+					value="<?php echo esc_attr( $page['name'] ); ?>"
+					id="pages_<?php echo esc_html( $page['type'] ); ?>"
+					required
+				/>
stripe/helpers/FrmStrpLiteConnectHelper.php (1)

683-683: Consider splitting the function call across multiple lines.

While the phpcs:ignore comment correctly addresses the line length violation, splitting this function call across multiple lines would improve readability and eliminate the need for the exception.

♻️ Optional refactor to improve readability
-	wp_register_script( 'formidable_stripe_settings', FrmStrpLiteAppHelper::plugin_url() . '/js/connect_settings.js', array( 'formidable_dom' ), FrmAppHelper::plugin_version(), true ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+	wp_register_script(
+		'formidable_stripe_settings',
+		FrmStrpLiteAppHelper::plugin_url() . '/js/connect_settings.js',
+		array( 'formidable_dom' ),
+		FrmAppHelper::plugin_version(),
+		true
+	);
stripe/models/FrmTransLiteAction.php (2)

182-183: LGTM - phpcs:ignore correctly placed.

The suppression comment is appropriately scoped to the specific long line.

♻️ Optional refactor to avoid the suppression

If you prefer to eliminate the line-length violation instead of suppressing it, you could extract the attribute values:

-		<?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
-		<select class="frm_with_left_label" name="<?php echo esc_attr( $this->get_field_name( $field_atts['name'] ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( $field_atts['name'] ) ); ?>">
+		<?php
+		$field_name = $this->get_field_name( $field_atts['name'] );
+		$field_id   = $this->get_field_id( $field_atts['name'] );
+		?>
+		<select class="frm_with_left_label" name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>">

200-201: LGTM - consistent suppression pattern.

The phpcs:ignore comment is correctly positioned and matches the pattern used on line 182.

♻️ Optional refactor to avoid the suppression

Alternatively, you could extract the selected value to shorten the line:

 				$has_field  = true;
 				$key_exists = array_key_exists( $field_atts['name'], $form_atts['form_action']->post_content );
+				$selected_value = $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0;
 				?>
-				<?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
-				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>>
+				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $selected_value, $field->id ); ?>>
stripe/models/FrmStrpLiteAuth.php (2)

274-274: LGTM: Line length suppression added as intended.

The addition of the SlevomatCodingStandard.Files.LineLength.LineTooLong suppression aligns with the PR objective to move exceptions to inline comments.

♻️ Optional: Refactor to avoid line length suppression

You could split this across lines to eliminate the need for the line length suppression:

-		$intents = $_POST[ $name ]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing, SlevomatCodingStandard.Files.LineLength.LineTooLong
+		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
+		$intents = $_POST[ $name ];

This moves the comment to its own line, avoiding the line length issue entirely.


293-293: LGTM: Line length suppression added as intended.

The addition of the SlevomatCodingStandard.Files.LineLength.LineTooLong suppression aligns with the PR objective.

♻️ Optional: Refactor to avoid line length suppression

Similar to line 274, you could move the comment to a separate line:

-		$form = json_decode( stripslashes( $_POST['form'] ), true ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, SlevomatCodingStandard.Files.LineLength.LineTooLong
+		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+		$form = json_decode( stripslashes( $_POST['form'] ), true );

This avoids the line length issue without requiring a suppression.

classes/helpers/FrmFieldsHelper.php (1)

2530-2530: LGTM - Acceptable suppression for UI string.

The line-length suppression is acceptable for this concatenated upgrade message string. While the line could potentially be split across multiple lines for better readability, the current approach keeps the message cohesive.

♻️ Optional refactor to improve readability

Consider splitting the long string concatenation across multiple lines:

-				'message' => __( 'Show images instead of radio buttons or check boxes. This is ideal for polls, surveys, segmenting questionnaires and more.', 'formidable' ) . '<img src="' . esc_url( FrmAppHelper::plugin_url() ) . '/images/image-options.png" />', // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+				'message' => __( 'Show images instead of radio buttons or check boxes. This is ideal for polls, surveys, segmenting questionnaires and more.', 'formidable' ) .
+					'<img src="' . esc_url( FrmAppHelper::plugin_url() ) . '/images/image-options.png" />',
classes/controllers/FrmFormActionsController.php (1)

695-695: LGTM! phpcs:ignore directive correctly applied.

The inline suppression comment aligns with the PR's objective to narrow the scope of line length exceptions.

💡 Optional: Consider breaking down this complex expression

For improved readability, this complex boolean expression could be refactored into intermediate variables or a helper method in a future update:

$is_parent_form = is_numeric( $form->parent_form_id ) && $form->parent_form_id;
$entry_mismatch = $entry && ( (int) $entry->form_id !== (int) $form->id || $entry->parent_item_id );
$explicit_child = ! empty( $args['is_child'] );
$child_entry = $is_parent_form || $entry_mismatch || $explicit_child;

This is purely a maintainability suggestion and not required for this PR.

classes/helpers/FrmCSVExportHelper.php (3)

621-630: Long if condition: consider formatting instead of suppressing line-length.
The LineTooLong ignore is fine for this PR, but the condition would be more readable split across multiple lines (especially given the nested array access).


707-720: Consider extracting $embedded_field_id to avoid the long inline ternary.
This would improve readability and likely remove the need for LineTooLong on Line 717 while keeping translation/array structure intact.


845-854: $convmap constant is inherently long; the per-line ignore is reasonable.
Given this is essentially data, a LineTooLong ignore is acceptable; optionally consider moving it into a dedicated private constant/property to reduce visual noise in the switch block.

tests/phpunit/base/FrmUnitTest.php (1)

276-283: Swap assertEquals args to ($expected, $actual, $message) for clearer failure output.
Current order still tests equality, but PHPUnit’s diff/readout will be more intuitive with expected-first. The LineTooLong ignore is otherwise fine for this PR’s goal.

classes/controllers/FrmDashboardController.php (1)

141-143: Consider extracting the CTA URL construction to reduce ternary complexity.
Not required for this PR, but it would improve readability and likely eliminate the need for a line-length ignore here.

classes/models/FrmStyle.php (2)

112-122: Multi-sniff ignore list remains coherent; adding LineTooLong here is consistent with PR scope.
Optionally, consider extracting the sanitized post_content into a local $post_content var to reduce both line length and the need for broad ignores.


601-606: Consider rewriting the line_height default logic to avoid == '' and reduce ignores.
Not required for this PR, but using a small helper/explicit normalization would improve readability and may eliminate the need for both strict-comparison and line-length suppressions on this line.

tests/phpunit/misc/test_FrmMisc.php (1)

37-37: LGTM on the lint suppression additions.

The phpcs:ignore comments are correctly placed. However, I noticed pre-existing issues in the assertion messages that you may want to address while you're here:

  1. Typo: "sourcem ap" should be "source map" (Lines 37 and 40)
  2. Copy-paste error on Line 40: The message says "popper JS file" but the test is checking bootstrap.min.js
🔧 Optional fix for the assertion messages
-		$this->assertStringNotContainsString( 'sourceMappingURL=popper.min.js.map', $popper_js, 'We do not want the popper JS file to include a source map reference. Since the sourcem ap is not included, this shows 404 errors in Safari.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		$this->assertStringNotContainsString( 'sourceMappingURL=popper.min.js.map', $popper_js, 'We do not want the popper JS file to include a source map reference. Since the source map is not included, this shows 404 errors in Safari.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong

 		$bootstrap_js = file_get_contents( FrmAppHelper::plugin_path() . '/js/bootstrap.min.js' );
-		$this->assertStringNotContainsString( 'sourceMappingURL=bootstrap.min.js.map', $bootstrap_js, 'We do not want the popper JS file to include a source map reference. Since the sourcem ap is not included, this shows 404 errors in Safari.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
+		$this->assertStringNotContainsString( 'sourceMappingURL=bootstrap.min.js.map', $bootstrap_js, 'We do not want the bootstrap JS file to include a source map reference. Since the source map is not included, this shows 404 errors in Safari.' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong

Also applies to: 40-40

classes/helpers/FrmAppHelper.php (3)

321-332: svg_logo() one-line SVG is OK, but consider keeping it diff-friendly.

This meets the “inline ignore” goal, but the single-line SVG makes future diffs painful; consider storing path data in a dedicated constant/file if it changes frequently.


730-744: get_param() nested ternary is hard to read/maintain; consider refactoring (no behavior change).

The new line-length suppression is fine, but the nested ternary hurts readability and makes future edits riskier.

Possible refactor (same behavior)
-			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, SlevomatCodingStandard.Files.LineLength.LineTooLong
+			// phpcs:ignore WordPress.Security.NonceVerification.Missing
+			if ( isset( $_POST[ $param ] ) ) {
+				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+				$value = wp_unslash( $_POST[ $param ] );
+			} elseif ( isset( $_GET[ $param ] ) ) {
+				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
+				$value = wp_unslash( $_GET[ $param ] );
+			} else {
+				$value = $default;
+			}

3796-3813: Long canAccessApplicationDashboard expression: OK, but consider extracting for clarity.

tests/phpunit/misc/test_FrmAppHelper.php (1)

733-747: Test long-line suppression looks fine; consider fixtures if more of these accumulate.

classes/models/FrmEntryMeta.php (1)

495-496: Function signature suppression is OK; consider splitting args if this keeps growing.

classes/controllers/FrmStylesController.php (2)

76-79: Inline phpcs:ignore is fine here; consider formatting the calls instead of suppressing.

Line 77–78: This achieves the PR goal, but these would be much more readable as multi-line add_submenu_page(...) calls (and would avoid needing ignores at all).


1387-1397: Avoid embedding <?php // ... ?> inside HTML tags if possible (readability).

Line 1389 and Line 1395: This works, but mixing PHP open/close solely to host a comment inside HTML makes the markup harder to scan. If you’re willing to touch formatting, splitting attributes across multiple lines would remove the need for the ignore (or at least avoid the embedded PHP comment).

classes/helpers/FrmFormsHelper.php (2)

376-384: Optional: consider de-ternary-ing this assignment for readability (ignore is fine though).

Line 377: Inline ignore meets the PR goal; readability could improve by extracting the chosen value into a small local first.


416-446: These nested ternaries are hard to maintain; consider a helper to reduce duplication.

Line 427, 431, 439: Since you’re already touching these lines, it may be worth a follow-up refactor (helper like self::coalesce_post_record_default(...)) to improve readability and reduce future bugs.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2aac4f and 4d59060.

⛔ Files ignored due to path filters (1)
  • phpcs.xml is excluded by !**/*.xml
📒 Files selected for processing (61)
  • classes/controllers/FrmAddonsController.php
  • classes/controllers/FrmAppController.php
  • classes/controllers/FrmDashboardController.php
  • classes/controllers/FrmEntriesController.php
  • classes/controllers/FrmFormActionsController.php
  • classes/controllers/FrmFormsController.php
  • classes/controllers/FrmInboxController.php
  • classes/controllers/FrmOnboardingWizardController.php
  • classes/controllers/FrmSMTPController.php
  • classes/controllers/FrmSettingsController.php
  • classes/controllers/FrmStylesController.php
  • classes/controllers/FrmXMLController.php
  • classes/helpers/FrmAppHelper.php
  • classes/helpers/FrmCSVExportHelper.php
  • classes/helpers/FrmEmailSummaryHelper.php
  • classes/helpers/FrmEntriesHelper.php
  • classes/helpers/FrmEntriesListHelper.php
  • classes/helpers/FrmFieldsHelper.php
  • classes/helpers/FrmFormMigratorsHelper.php
  • classes/helpers/FrmFormTemplatesHelper.php
  • classes/helpers/FrmFormsHelper.php
  • classes/helpers/FrmFormsListHelper.php
  • classes/helpers/FrmListHelper.php
  • classes/helpers/FrmStylesCardHelper.php
  • classes/helpers/FrmStylesHelper.php
  • classes/helpers/FrmXMLHelper.php
  • classes/models/FrmAddon.php
  • classes/models/FrmEntry.php
  • classes/models/FrmEntryMeta.php
  • classes/models/FrmEntryValidate.php
  • classes/models/FrmField.php
  • classes/models/FrmForm.php
  • classes/models/FrmFormAction.php
  • classes/models/FrmInbox.php
  • classes/models/FrmMigrate.php
  • classes/models/FrmPluginSearch.php
  • classes/models/FrmRecaptchaSettings.php
  • classes/models/FrmReviews.php
  • classes/models/FrmSolution.php
  • classes/models/FrmStyle.php
  • classes/models/FrmTurnstileSettings.php
  • classes/models/fields/FrmFieldType.php
  • classes/models/fields/FrmFieldUserID.php
  • stripe/helpers/FrmStrpLiteAppHelper.php
  • stripe/helpers/FrmStrpLiteConnectHelper.php
  • stripe/helpers/FrmTransLiteListHelper.php
  • stripe/models/FrmStrpLiteAuth.php
  • stripe/models/FrmTransLiteAction.php
  • tests/phpunit/base/FrmUnitTest.php
  • tests/phpunit/database/test_FrmMigrate.php
  • tests/phpunit/entries/test_FrmShowEntryShortcode.php
  • tests/phpunit/fields/test_FrmFieldType.php
  • tests/phpunit/fields/test_FrmFieldsAjax.php
  • tests/phpunit/forms/test_FrmForm.php
  • tests/phpunit/misc/test_FrmAppController.php
  • tests/phpunit/misc/test_FrmAppHelper.php
  • tests/phpunit/misc/test_FrmMisc.php
  • tests/phpunit/misc/test_FrmOverlayController.php
  • tests/phpunit/onboarding-wizard/test_FrmOnboardingWizardController.php
  • tests/phpunit/xml/test_FrmXMLController.php
  • tests/phpunit/xml/test_FrmXMLHelper.php
🧰 Additional context used
🧬 Code graph analysis (21)
tests/phpunit/misc/test_FrmAppController.php (1)
classes/models/FrmMigrate.php (1)
  • upgrade (39-93)
classes/helpers/FrmEntriesHelper.php (1)
classes/models/FrmField.php (2)
  • FrmField (6-1620)
  • is_option_true (1400-1405)
classes/models/fields/FrmFieldType.php (2)
classes/controllers/FrmFieldsController.php (1)
  • input_html (527-552)
classes/models/fields/FrmFieldRadio.php (1)
  • input_html (42-44)
classes/models/FrmForm.php (1)
classes/models/FrmDb.php (4)
  • FrmDb (6-864)
  • prepend_and_or_where (647-667)
  • esc_order (546-574)
  • esc_limit (600-622)
classes/helpers/FrmAppHelper.php (2)
stubs.php (2)
  • FrmProApplicationsHelper (32-39)
  • get_required_templates_capability (37-38)
classes/helpers/FrmFieldsHelper.php (2)
  • FrmFieldsHelper (6-2801)
  • default_unique_msg (315-319)
classes/controllers/FrmAppController.php (2)
classes/helpers/FrmAppHelper.php (3)
  • FrmAppHelper (6-5022)
  • plugin_url (65-68)
  • plugin_version (44-46)
stripe/helpers/FrmStrpLiteAppHelper.php (1)
  • plugin_url (30-32)
classes/models/FrmFormAction.php (1)
classes/views/frm-form-actions/email_action.php (1)
  • get_upgrade_text (54-56)
classes/helpers/FrmXMLHelper.php (2)
classes/controllers/FrmXMLController.php (1)
  • form (309-336)
tests/phpunit/xml/test_FrmXMLHelper.php (1)
  • populate_postmeta (119-121)
classes/helpers/FrmFormsHelper.php (2)
classes/helpers/FrmAppHelper.php (2)
  • FrmAppHelper (6-5022)
  • get_unique_key (2676-2723)
classes/helpers/FrmShortcodeHelper.php (2)
  • FrmShortcodeHelper (9-157)
  • remove_inline_conditions (147-156)
tests/phpunit/misc/test_FrmOverlayController.php (1)
classes/controllers/FrmOverlayController.php (1)
  • open_overlay (154-167)
classes/controllers/FrmSettingsController.php (2)
js/admin/dom.js (1)
  • __ (4-4)
js/admin/style.js (1)
  • color (1183-1183)
classes/helpers/FrmEmailSummaryHelper.php (3)
classes/helpers/FrmAppHelper.php (2)
  • FrmAppHelper (6-5022)
  • plugin_url (65-68)
stripe/helpers/FrmStrpLiteAppHelper.php (1)
  • plugin_url (30-32)
stripe/helpers/FrmTransLiteAppHelper.php (1)
  • plugin_url (18-20)
classes/helpers/FrmStylesHelper.php (3)
classes/models/FrmFormAction.php (1)
  • get_field_name (257-262)
classes/models/FrmStyle.php (1)
  • get_field_name (788-790)
classes/helpers/FrmAppHelper.php (1)
  • checked (2414-2418)
classes/controllers/FrmEntriesController.php (1)
stubs.php (2)
  • FrmProAppHelper (44-85)
  • views_is_installed (52-53)
stripe/helpers/FrmStrpLiteConnectHelper.php (1)
stripe/helpers/FrmStrpLiteAppHelper.php (2)
  • FrmStrpLiteAppHelper (6-162)
  • plugin_url (30-32)
classes/helpers/FrmFieldsHelper.php (1)
classes/helpers/FrmAppHelper.php (4)
  • FrmAppHelper (6-5022)
  • allow_unfiltered_html (4428-4433)
  • kses (1044-1047)
  • plugin_url (65-68)
classes/models/FrmMigrate.php (3)
classes/models/FrmDb.php (1)
  • get_col (296-298)
classes/controllers/FrmFormActionsController.php (1)
  • FrmFormActionsController (6-805)
classes/controllers/FrmStylesController.php (1)
  • FrmStylesController (6-1489)
classes/models/FrmEntryValidate.php (1)
classes/helpers/FrmAppHelper.php (2)
  • FrmAppHelper (6-5022)
  • is_admin (580-589)
classes/helpers/FrmFormsListHelper.php (1)
classes/helpers/FrmFormsHelper.php (2)
  • FrmFormsHelper (6-2140)
  • get_direct_link (32-35)
classes/models/FrmPluginSearch.php (1)
classes/models/FrmInstallPlugin.php (1)
  • activate_url (66-68)
tests/phpunit/misc/test_FrmMisc.php (1)
classes/helpers/FrmAppHelper.php (2)
  • FrmAppHelper (6-5022)
  • plugin_path (58-60)
🪛 PHPMD (2.15.0)
classes/controllers/FrmStylesController.php

851-851: Avoid unused local variables such as '$heading'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Cypress
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
🔇 Additional comments (102)
classes/models/fields/FrmFieldUserID.php (1)

55-55: LGTM!

The inline phpcs:ignore comment is correctly formatted and appropriately scoped to suppress the line length violation only on this specific line. This aligns with the PR objective of narrowing exception scope to prevent inadvertently ignoring new line length issues.

classes/models/FrmEntryValidate.php (1)

30-33: LGTM!

The inline phpcs:ignore comment is appropriately scoped to this specific long line, aligning with the PR objective of narrowing lint suppression scope. The underlying conditional logic for admin nonce verification remains unchanged.

classes/models/FrmRecaptchaSettings.php (1)

53-53: LGTM! Change aligns with PR objectives.

The inline phpcs:ignore comment correctly suppresses the line-length violation for this long tooltip string, which is consistent with the PR's goal of narrowing the scope of line-length exceptions.

classes/models/FrmReviews.php (2)

160-162: LGTM! Appropriate use of inline ignore directive.

The phpcs:ignore comment is correctly placed for this long translatable string. Breaking this line would complicate translation workflows and potentially harm readability.


164-165: LGTM! The inline ignore is appropriate here.

The phpcs:ignore comment correctly handles this long HTML anchor tag. The current approach keeps the opening tag cohesive and readable.

tests/phpunit/entries/test_FrmShowEntryShortcode.php (1)

917-918: LGTM! Inline suppressions are appropriate for test expectations.

The phpcs:ignore comments correctly suppress line length warnings on these test data lines. For hardcoded HTML test expectations like these, inline suppressions are more practical than breaking the lines, as they preserve readability of the expected output.

classes/models/FrmSolution.php (2)

476-476: Inline suppression is appropriate for this SVG element.

The phpcs:ignore comment correctly addresses the line length violation. Breaking this SVG across multiple lines would reduce readability without significant benefit.


582-582: Inline suppression is appropriate for translatable strings.

The phpcs:ignore comment is correctly applied. Breaking translatable strings across multiple lines can interfere with translation tools and workflows, so the inline suppression is the right approach here.

classes/models/FrmPluginSearch.php (1)

325-325: LGTM! Suppression aligns with PR objectives.

The inline phpcs:ignore comment correctly suppresses the line length violation for this specific line, which aligns with the PR's goal of narrowing the scope of line length exceptions. The code itself properly uses escaping functions (esc_url, esc_attr) and includes an appropriate aria-label for accessibility.

stripe/helpers/FrmStrpLiteConnectHelper.php (1)

660-660: LGTM! Inline exception appropriate for SVG markup.

The phpcs:ignore comment is correctly placed. Keeping the SVG on a single line is reasonable for this use case.

tests/phpunit/forms/test_FrmForm.php (1)

48-48: LGTM! Good practice to use inline suppressions.

Moving line-length exceptions from file-level to inline comments is a solid improvement. This approach narrows the scope of suppressions to specific lines where the long assertion messages add value, while preventing new violations from being introduced elsewhere in the file.

Also applies to: 153-153

tests/phpunit/misc/test_FrmOverlayController.php (1)

48-48: LGTM! Appropriate use of inline suppressions.

The phpcs:ignore comments are correctly applied to preserve the descriptive assertion messages while maintaining line-length standards for the rest of the file.

Also applies to: 51-51

tests/phpunit/fields/test_FrmFieldsAjax.php (1)

86-86: LGTM! Inline suppression maintains test clarity.

The phpcs:ignore comment appropriately preserves the detailed assertion message that provides valuable debugging context.

classes/helpers/FrmStylesCardHelper.php (1)

274-274: LGTM - Appropriate line-length suppression.

The inline phpcs:ignore comment appropriately suppresses the line-length check for this ternary expression. The logic correctly handles RGB vs hex color formatting.

tests/phpunit/misc/test_FrmAppController.php (1)

172-172: LGTM - Appropriate suppression for test assertion.

The inline phpcs:ignore comment is appropriate here. The detailed error message in the assertion provides valuable debugging context when tests fail, and breaking it across multiple lines would reduce readability.

classes/helpers/FrmFieldsHelper.php (4)

348-358: LGTM - Consistent suppression pattern.

The line-length suppressions added to lines 348, 356, and 358 are appropriate. These lines are long due to multiple required PHPCS suppressions for security checks that are validated elsewhere in the codebase (specifically in context_is_safe_to_load_field_options_from_request_data() at lines 224-266).


696-697: LGTM - Appropriate suppressions for complex conditional.

The inline suppressions on line 696 are appropriate for this complex conditional that intentionally uses loose comparison to handle mixed-type field values. While the logic could theoretically be extracted to a helper method, the current approach is acceptable.


1520-1520: LGTM - Suppression added to existing complexity annotation.

The line-length suppression is appropriately added alongside the existing cognitive complexity suppression. The function signature is long due to the PHPDoc annotation.


1544-1558: LGTM - Appropriate suppressions for $_POST access.

The line-length suppressions on lines 1544, 1545, 1547, 1557, and 1558 are appropriate. These lines handle "Other" option values with proper sanitization (sanitize_text_field and wp_unslash). The security suppressions indicate nonce verification is handled elsewhere.

tests/phpunit/xml/test_FrmXMLController.php (1)

12-12: LGTM!

The inline phpcs:ignore comment correctly suppresses the line length warning for this long URL string. This is an appropriate use case since the URL with query parameters cannot be reasonably shortened.

classes/helpers/FrmFormTemplatesHelper.php (1)

189-189: LGTM!

The inline phpcs:ignore comment appropriately suppresses the line length warning for this translatable string. Keeping the string intact is preferred for translation management purposes.

classes/models/fields/FrmFieldType.php (1)

1220-1220: LGTM!

The inline phpcs:ignore comment correctly suppresses the line length warning for this HTML input construction. The line properly escapes all dynamic values with esc_attr(), and keeping it on a single line maintains readability for this return statement.

classes/controllers/FrmOnboardingWizardController.php (2)

469-469: LGTM!

The inline phpcs:ignore comment appropriately suppresses the line length warning for this translatable onboarding wizard message. Keeping the string intact aids translation management.


479-479: LGTM!

The inline phpcs:ignore comment correctly suppresses the line length warning for this CTA HTML element. The URL and text are properly escaped.

classes/controllers/FrmInboxController.php (2)

97-97: LGTM!

The inline phpcs:ignore comment appropriately suppresses the line length warning for this message containing embedded HTML links. The URLs are properly escaped with esc_url().


99-99: LGTM!

The inline phpcs:ignore comment correctly suppresses the line length warning for this CTA HTML string. The URL is properly escaped.

classes/controllers/FrmSettingsController.php (2)

24-24: LGTM! Appropriate use of phpcs:ignore for WordPress menu registration.

The inline suppression is correctly applied to this add_submenu_page call, which necessarily includes long localized strings.


529-529: LGTM! phpcs:ignore correctly applied to button element.

The inline suppression directive is appropriately placed for this HTML button with multiple attributes.

classes/models/FrmFormAction.php (1)

1001-1001: LGTM! phpcs:ignore correctly applied to anchor element.

The inline suppression directive is appropriately placed for this anchor tag with multiple data attributes. The use of proper escaping functions (esc_attr()) is also noted and correct.

classes/controllers/FrmEntriesController.php (1)

14-14: LGTM!

The inline phpcs:ignore comments appropriately suppress line-length warnings for these add_submenu_page calls. This approach is preferable to file-level ignores as it limits the exception scope to specific lines.

Also applies to: 19-19

classes/models/FrmAddon.php (1)

479-479: LGTM!

The inline phpcs:ignore comments are correctly applied to lines containing long translatable strings, HTML output, and complex conditionals. This narrowly scopes the line-length exceptions to only the necessary lines.

Also applies to: 496-496, 498-498, 649-649, 1012-1012

classes/helpers/FrmEntriesListHelper.php (1)

345-345: LGTM!

The inline suppression comments are appropriately applied to these HTML construction lines. The checkbox label and delete action link contain necessary attributes that make them exceed line length limits.

Also applies to: 502-502

classes/controllers/FrmXMLController.php (1)

12-12: LGTM!

The inline suppression comments correctly target the long add_submenu_page call and the file upload check condition. Combining multiple ignore rules on line 353 is appropriate when both apply to the following statement.

Also applies to: 353-354

classes/models/FrmMigrate.php (1)

155-155: LGTM!

The inline suppression comments appropriately target the long message string and database query lines. These lines contain complex SQL or HTML that legitimately exceed line length limits.

Also applies to: 435-435, 449-449

classes/controllers/FrmAppController.php (1)

975-975: LGTM!

The inline suppression comment is correctly applied to this wp_enqueue_script call which includes the full plugin URL and version parameters.

classes/models/FrmField.php (2)

140-140: LGTM!

The inline suppression comments appropriately target these translatable field description strings. These messages describe feature benefits and naturally exceed line length limits due to their content.

Also applies to: 147-147, 154-154, 161-161, 168-168, 196-196, 207-207, 214-214, 221-221, 229-229, 237-237, 244-244, 251-251, 264-264, 271-271, 297-297, 309-309, 317-317, 325-325


787-787: LGTM!

The inline suppression is correctly applied to this database query that requires multiple LIKE patterns for transient cleanup.

classes/helpers/FrmCSVExportHelper.php (2)

259-263: PHPCS ignore is appropriately narrow for the $_POST['csv_col_sep'] read.
Keeping WordPress.Security.NonceVerification.Missing scoped to only the needed line (vs file-level) matches the PR objective. Consider adding a short rationale comment (e.g., “Read-only export preference”) if reviewers repeatedly question why nonce isn’t required here.


593-595: Re-check whether Line 594 still passes line-length now that file-level ignores are removed.
The assignment line is marked as changed but has no LineTooLong suppression; if it still violates the configured limit, prefer splitting across lines (or add a per-line ignore consistent with this PR).

classes/controllers/FrmDashboardController.php (3)

32-34: Menu registration change is non-functional; LineTooLong suppression is scoped correctly.


43-52: Filter name construction unchanged; LineTooLong suppression is fine.


285-297: Docblock wrap is clearer without changing meaning.

classes/models/FrmTurnstileSettings.php (1)

63-65: Keeping the tooltip as one translation string + per-line LineTooLong suppression is the right tradeoff.
Splitting would likely harm translation quality; the inline ignore matches the PR’s intent.

classes/models/FrmStyle.php (1)

523-527: SQL prepare line-length suppression is fine; no logic changes.

classes/helpers/FrmEmailSummaryHelper.php (1)

417-418: LGTM!

The inline phpcs:ignore directives appropriately suppress line-length warnings for these specific lines containing long inline CSS strings and HTML output, aligning with the PR's goal of narrowing exception scope.

Also applies to: 431-432

classes/helpers/FrmListHelper.php (2)

953-954: LGTM!

The LineTooLong directive is appropriately appended to the existing suppressions for this complex method signature.


1271-1272: LGTM!

The LineTooLong directive is appropriately appended to the existing StrictComparisons suppression on this return statement.

classes/models/FrmInbox.php (1)

174-175: LGTM!

The inline phpcs:ignore appropriately suppresses the line-length warning for this conditional expression with nested array accesses.

tests/phpunit/database/test_FrmMigrate.php (1)

292-294: LGTM!

The inline phpcs:ignore directives appropriately suppress line-length warnings for these test assertions that include detailed debugging messages.

classes/helpers/FrmEntriesHelper.php (4)

403-414: LGTM!

The LineTooLong directives are appropriately appended to existing suppressions on these lines with deep $_POST['item_meta'] array access patterns.


460-463: LGTM!

The LineTooLong directives are appropriately appended to the existing security-related suppressions for these posted value retrieval lines.


503-504: LGTM!

The LineTooLong directive is appropriately appended for this line handling "other" field values.


528-533: LGTM!

The LineTooLong directives are appropriately appended to the existing suppressions for these repeating section "other" value handling lines.

classes/helpers/FrmFormsListHelper.php (1)

208-208: LGTM!

The inline phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong comments are correctly placed on the long lines. This approach narrows the scope of line-length exceptions to specific lines rather than entire files, which helps prevent introducing new line-length issues elsewhere in the file.

Also applies to: 311-311, 343-343, 379-379, 457-457

classes/helpers/FrmFormMigratorsHelper.php (2)

156-156: Unconventional but functional approach for HTML context.

The empty PHP tag pattern <?php // phpcs:ignore ... ?> is unusual but necessary here since the line-length violation occurs on the <a> opening tag, and the line continues with PHP/HTML content. This is an acceptable workaround given the template structure.

Also applies to: 164-164


59-59: LGTM!

Standard inline suppression correctly placed at the end of the long line.

classes/controllers/FrmFormsController.php (1)

70-71: LGTM!

All inline phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong comments are correctly placed on the respective long lines throughout the controller. The changes are consistent with the PR objective of narrowing line-length exception scope.

Also applies to: 883-883, 921-921, 1072-1072, 1348-1348, 2619-2619, 3196-3196

tests/phpunit/xml/test_FrmXMLHelper.php (1)

156-156: LGTM!

The inline suppression is correctly placed on the long expected value string in the test assertion.

classes/helpers/FrmStylesHelper.php (5)

208-208: LGTM - phpcs:ignore placement is correct.

The inline comment after the self-closing PHP tag effectively suppresses the line-length warning for this long HTML input line.


492-492: LGTM - Lint suppression added for long CSS output line.

The line contains multiple method calls for CSS variable output which naturally exceeds line length limits.


679-679: LGTM - Suppression for long validation-related line.

The line already has existing phpcs:ignore directives and the line-length suppression is appropriately added.


931-931: LGTM - Suppression for long conditional statement.

The multi-condition check for AJAX style changes naturally results in a long line.


1115-1116: LGTM - phpcs:ignore on separate line for long comment.

Placing the suppression directive on its own line before a lengthy documentation comment is a valid approach when the comment itself cannot be reasonably shortened.

classes/controllers/FrmSMTPController.php (3)

168-168: LGTM - Suppression for long translated paragraph.

Long translatable strings in HTML output are often unavoidable and appropriately suppressed here.


195-195: LGTM - Suppression for inline SVG.

Inline SVG path data cannot be meaningfully broken across multiple lines.


443-443: LGTM - Suppression for SVG logo output.

Large inline SVG content is a valid case for line-length suppression as breaking it would harm readability.

classes/controllers/FrmAddonsController.php (6)

329-329: LGTM - Suppression for long plugin excerpt.

Plugin description excerpts are inherently long text and appropriately suppressed.


334-334: LGTM - Suppression for long plugin excerpt.


339-339: LGTM - Suppression for long plugin excerpt.


373-373: LGTM - Suppression for long plugin excerpt.


1247-1247: LGTM - Suppression for long ternary with translated strings.

The ternary containing two long translated message strings naturally exceeds the line length limit.


1498-1498: LGTM - Suppression for long anchor tag with multiple attributes.

HTML elements with multiple attributes and escaping functions often result in long lines.

classes/models/FrmForm.php (7)

316-316: LGTM - Suppression for long ternary assignment.

The ternary with method call and default value naturally results in a long line.


340-340: LGTM - Line-length suppression added to function with existing ignore.

The function signature already had a cognitive complexity ignore; adding line-length suppression is consistent with the PR objective.


360-361: LGTM - Suppression for complex multi-condition statement.

The condition spans multiple array checks and logical operators, making line length suppression appropriate.


408-408: LGTM - Suppression for long conditional with array access.

Multiple array key accesses in a single condition naturally creates a long line.


635-635: LGTM - Suppression for prepared SQL statement.

SQL queries with table prefixes and prepared statement syntax often exceed line limits.


726-726: LGTM - Suppression for DELETE SQL query.

Complex SQL queries with JOINs and multiple conditions appropriately suppressed.


933-933: LGTM - Suppression for SELECT query construction.

Query building with multiple chained method calls naturally results in a long line.

classes/helpers/FrmXMLHelper.php (5)

50-51: LGTM - Suppression for long error message with documentation link.

Error messages with embedded documentation links naturally exceed line limits and breaking them would harm readability.


963-963: LGTM - Suppression for complex comparison statement.

The line already has a strict comparison ignore; adding line-length suppression maintains consistency with the PR approach.


1290-1290: LGTM - Line-length suppression added to function with multiple existing ignores.

Function already has cognitive complexity and cyclomatic complexity ignores; line-length suppression completes the set.


2317-2317: LGTM - Suppression for long string concatenation.

Email template construction with multiple ternary operators and concatenations naturally results in long lines.


2388-2388: LGTM - Suppression for long string concatenation.

Similar to line 2317, email template construction with ternary operators appropriately suppressed.

classes/models/FrmEntry.php (2)

626-633: Inline line-length ignore on long $fields assignment looks fine.


223-227: No action needed — the current syntax is correct.

The code uses * phpcs:ignore, which is the modern, correct PHPCS syntax (standard since PHPCS 3.2+). The suggestion to switch to @phpcsSuppress recommends a deprecated form. The docblock suppression as currently written is valid and will be honored by PHPCS.

Likely an incorrect or invalid review comment.

classes/helpers/FrmAppHelper.php (4)

3497-3508: Tooltip long-string ignores are consistent with the PR goal.


3860-3927: Admin localized strings: inline ignores look consistent; keep an eye on translator ergonomics.


4059-4064: Inline ignore on long PHP version warning string looks fine.


1938-1952: Verify that the inline phpcs:ignore comment properly suppresses the LineLength warning on line 1953.

The line is 266 characters and exceeds the configured 180-character limit. While the suppression comment <?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?> is present, this pattern relies on PHPCS recognizing the inline comment within mixed HTML and PHP tokens. Similar patterns are used elsewhere in the codebase, and PHPCS runs in GitHub Actions CI, suggesting it works in practice. However, confirm locally that no LineTooLong violations are reported for this line during code review.

tests/phpunit/misc/test_FrmAppHelper.php (1)

356-371: Test long-line suppressions look fine.

classes/models/FrmEntryMeta.php (3)

180-190: Inline ignore on long prepared DELETE query looks consistent with PR intent.


388-399: Inline ignore on long FrmDb::check_cache call looks fine.


632-640: Inline ignore on long $wpdb->prepare(...) line looks fine.

tests/phpunit/fields/test_FrmFieldType.php (1)

265-277: Production code correctly matches test expectations for aria-describedby ordering.

The add_aria_description implementation (FrmFieldType.php:1537–1575) properly:

  • Detects whether error IDs precede description IDs in existing aria-describedby
  • Prepends or appends IDs based on that ordering
  • Emits data-error-first="0" when error does not come first

Test cases at lines 265–277 are accurate. Note: data-error-first="0" is generated but not consumed anywhere in the codebase; it may be a forward-looking attribute or documentation for third-party integrations.

classes/controllers/FrmStylesController.php (2)

140-145: LGTM: narrow line-length suppression to the single enqueue line.

Line 143: Inline ignore matches the intent of this PR and keeps scope tight.


845-862: PHPMD false-positive confirmed; $heading is used in the included template.

Line 851: PHPMD correctly flags $heading as unused in static analysis, but the variable is consumed by the included template classes/views/styles/custom_css.php (line 8: echo esc_html( $heading )). This is a known false-positive when variables are scoped only to include statements. No action required.

classes/helpers/FrmFormsHelper.php (5)

78-83: LGTM: line-length suppression is scoped to the single long output line.

Line 80: Inline ignore is appropriately narrow and keeps the rest of the function linted normally.


103-110: LGTM: adding LineTooLong to the existing ignore list is consistent with the PR approach.

Line 107: The combined ignore list reads cleanly and avoids a file-level exception.


912-925: LGTM: inline ignore is narrowly applied on the long helper call.

Line 923: Scope is correct; no behavioral impact.


1443-1476: LGTM: appropriate to ignore line length for a long translatable string.

Line 1455: This is the kind of line where breaking it up can be more painful than helpful; the inline ignore is reasonable.


1860-1879: LGTM: inline ignores are scoped to the long return statements.

Line 1872 and Line 1878: Matches the PR intent and avoids broad file-level exceptions.

@Crabcyborg Crabcyborg merged commit 84d5c73 into master Jan 12, 2026
16 checks passed
@Crabcyborg Crabcyborg deleted the move_line_length_limit_exceptions_to_comments branch January 12, 2026 16:00
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…tions_to_comments

Move line length limit exceptions to inline comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant