Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Sep 13, 2024
1 parent 8382e09 commit 897ce71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mantle/support/traits/trait-enumerates-values.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ public function reject( $callback = true ) {
return $this->filter(
fn ( $value, $key ) => $use_as_callable
? ! $callback( $value, $key )
: $value !== $callback
: $value != $callback // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual, WordPress.PHP.StrictComparisons.LooseComparison
);
}

Expand Down
5 changes: 3 additions & 2 deletions tests/Console/generators/PrinterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function test_make_function() {
->addComment( '' )
// For some reason these rules need to be disabled by the generated code
// doesn't have any issues.
->addComment( 'phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found' )
->addComment( 'phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found, Universal.WhiteSpace.PrecisionAlignment.Found' )
->addComment( 'phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect' )
->addComment( '' )
->addComment( '@package App' )
Expand Down Expand Up @@ -112,9 +112,10 @@ protected function lint_code( PhpFile $file, string $file_name ) {
if ( 0 !== $exit_code ) {
echo "Output from phpcs:\n";
dump( $output );
echo "File output:\n";
dump( $code );
}

$this->assertEquals( 0, $exit_code, 'phpcs exit code should be 0 for no errors.' );

}
}

0 comments on commit 897ce71

Please sign in to comment.