Skip to content

Commit

Permalink
Ignore some linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenpf committed Jul 19, 2024
1 parent f6b2da6 commit 963fc04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WP_SQLite_Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ protected function load_dependencies() {

// Load the translator class from the plugin.
if ( ! defined( 'SQLITE_DB_DROPIN_VERSION' ) ) {
define( 'SQLITE_DB_DROPIN_VERSION', self::get_sqlite_version() );
define( 'SQLITE_DB_DROPIN_VERSION', self::get_sqlite_version() ); // phpcs:ignore
}

# A hack to add the do_action and apply_filters functions to the global namespace.
# This is necessary because during the import WP has not been loaded, and we
# need to define these functions to avoid fatal errors.
if ( ! function_exists( 'do_action' ) ) {
function do_action() {}
function apply_filters() {}
function do_action() {} // phpcs:ignore
function apply_filters() {} // phpcs:ignore
}

// We also need to selectively load the necessary classes from the plugin.
Expand Down
1 change: 1 addition & 0 deletions src/WP_SQLite_Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ protected function get_create_statement( $table, $translator ) {
protected function get_insert_statements( $table, $pdo ) {
$stmt = $pdo->prepare( 'SELECT * FROM ' . $table->name );
$stmt->execute();
// phpcs:ignore
while ( $row = $stmt->fetch( PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT ) ) {
yield sprintf( 'INSERT INTO `%1s` VALUES (%2s);', $table->name, $this->escape_values( $pdo, $row ) );
}
Expand Down
1 change: 1 addition & 0 deletions src/WP_SQLite_Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function parse_statements( $sql_file_path ) {
$in_comment = false;
$buffer = '';

// phpcs:ignore
while ( ( $line = fgets( $handle ) ) !== false ) {
$line = trim( $line );

Expand Down

0 comments on commit 963fc04

Please sign in to comment.