Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ignore some linting issues
  • Loading branch information
jeroenpf committed Jul 19, 2024
commit 963fc04f43df753cc91f531e643e653734c538ce
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