Skip to content

Commit

Permalink
Update a few more sniffs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Aug 29, 2023
1 parent 8626e7b commit 7660405
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,7 @@ private static function log_proc_method_run_time( $key, $start_time ) {
}
}

// phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed
function wp_cli_behat_env_debug( $message ) {
if ( ! getenv( 'WP_CLI_TEST_DEBUG_BEHAT_ENV' ) ) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/Context/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ protected function assert_not_regex( $regex, $actual ) {
}

protected function assert_equals( $expected, $actual ) {
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Deliberate loose comparison.
// phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual -- Deliberate loose comparison.
if ( $expected != $actual ) {
throw new Exception( 'Actual value: ' . var_export( $actual, true ) );
}
}

protected function assert_not_equals( $expected, $actual ) {
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Deliberate loose comparison.
// phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual -- Deliberate loose comparison.
if ( $expected == $actual ) {

Check warning on line 36 in src/Context/Support.php

View workflow job for this annotation

GitHub Actions / code-quality / PHPCS

Loose comparisons are not allowed. Expected: "==="; Found: "=="
throw new Exception( 'Actual value: ' . var_export( $actual, true ) );
}
Expand Down

0 comments on commit 7660405

Please sign in to comment.