Skip to content

Commit

Permalink
PHPCS: ignore more intended approaches
Browse files Browse the repository at this point in the history
  • Loading branch information
JJJ committed Jun 19, 2024
1 parent 9600837 commit bf255f2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ludicrousdb/includes/class-ludicrousdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,8 @@ public function query( $query ) {

while ( $row = mysqli_fetch_object( $this->result ) ) { // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition
$this->last_result[ $num_rows ] = $row;

// phpcs:ignore
$num_rows++;
}
}
Expand Down Expand Up @@ -1905,9 +1907,11 @@ public function check_tcp_responsiveness( $host, $port, $float_timeout ) {
$errstr = '';

// Try to get a new socket
// phpcs:disable
$socket = ( WP_DEBUG )
? fsockopen( $host, $port, $errno, $errstr, $float_timeout )
: @fsockopen( $host, $port, $errno, $errstr, $float_timeout ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
: @fsockopen( $host, $port, $errno, $errstr, $float_timeout );
// phpcs:enable

// No socket
if ( false === $socket ) {
Expand All @@ -1917,6 +1921,7 @@ public function check_tcp_responsiveness( $host, $port, $float_timeout ) {
}

// Close the socket
// phpcs:ignore
fclose( $socket );

// Using API
Expand Down Expand Up @@ -2159,7 +2164,7 @@ protected function strip_invalid_text_using_db( $to_strip, $charset ) {
/**
* Get the cache key used for TCP responses
*
* @since 3.0.0
* since 3.0.0
*
* @param string $host Host
* @param string $port Port or socket.
Expand Down

0 comments on commit bf255f2

Please sign in to comment.