Applied coding standards.
This commit is contained in:
parent
c5df64ca57
commit
909a57e784
|
@ -45,7 +45,7 @@ class MigrationHelper {
|
|||
break;
|
||||
case 'update':
|
||||
$insert_query = 'UPDATE';
|
||||
break;
|
||||
break;
|
||||
case 'insert':
|
||||
default:
|
||||
$insert_query = 'INSERT';
|
||||
|
@ -54,6 +54,13 @@ class MigrationHelper {
|
|||
return $insert_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to escape backtick in various schema fields.
|
||||
*
|
||||
* @param array $schema_config Schema config.
|
||||
*
|
||||
* @return array Schema config escaped for backtick.
|
||||
*/
|
||||
public static function escape_schema_for_backtick( $schema_config ) {
|
||||
array_walk( $schema_config['source']['entity'], array( self::class, 'escape_and_add_backtick' ) );
|
||||
array_walk( $schema_config['source']['meta'], array( self::class, 'escape_and_add_backtick' ) );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* Service provider for COTMigration.
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders;
|
||||
|
@ -8,10 +8,20 @@ namespace Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders;
|
|||
use Automattic\WooCommerce\DataBase\Migrations\CustomOrderTable\WPPostToCOTMigrator;
|
||||
use Automattic\WooCommerce\Internal\DependencyManagement\AbstractServiceProvider;
|
||||
|
||||
/**
|
||||
* Class COTMigrationServiceProvider
|
||||
*
|
||||
* @package Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders
|
||||
*/
|
||||
class COTMigrationServiceProvider extends AbstractServiceProvider {
|
||||
|
||||
/**
|
||||
* Services provided by this provider.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $provides = array(
|
||||
WPPostToCOTMigrator::class
|
||||
WPPostToCOTMigrator::class,
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue