diff --git a/.distignore b/.distignore index acbaa32..2f9c78d 100644 --- a/.distignore +++ b/.distignore @@ -6,6 +6,8 @@ .travis.yml behat.yml circle.yml +phpcs.xml.dist +phpunit.xml.dist bin/ features/ utils/ diff --git a/.gitignore b/.gitignore index 0d94f9a..4a485fb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ vendor/ *.txt *.log composer.lock +phpunit.xml +phpcs.xml +.phpcs.xml diff --git a/composer.json b/composer.json index 7584ee1..213ece7 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "wp-cli/wp-cli": "^2" }, "require-dev": { - "wp-cli/wp-cli-tests": "^2.0.7" + "wp-cli/wp-cli-tests": "^2.1" }, "config": { "process-timeout": 7200, diff --git a/maintenance-mode-command.php b/maintenance-mode-command.php index bcddc83..21cccb4 100644 --- a/maintenance-mode-command.php +++ b/maintenance-mode-command.php @@ -4,10 +4,10 @@ return; } -$autoload = __DIR__ . '/vendor/autoload.php'; +$wpcli_maintenance_mode_autoloader = __DIR__ . '/vendor/autoload.php'; -if ( file_exists( $autoload ) ) { - require_once $autoload; +if ( file_exists( $wpcli_maintenance_mode_autoloader ) ) { + require_once $wpcli_maintenance_mode_autoloader; } WP_CLI::add_command( 'maintenance-mode', '\WP_CLI\MaintenanceMode\MaintenanceModeCommand' ); diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..6ca1c7d --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,54 @@ + + + Custom ruleset for WP-CLI maintenance-mode-command + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +