Skip to content

Commit ca53fb9

Browse files
committed
Fixing command param names and include paths
Param names: /s/theme/repo Include paths were fixed by prepending slash to filenames
1 parent c204035 commit ca53fb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wp-cli-command.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class PHPCS_Diff_CLI_Command extends WP_CLI_Command {
4545
*/
4646
public function __invoke( $args, $assoc_args ) {
4747

48-
require_once( __DIR__ . 'class-phpcs-diff.php' );
48+
require_once( dirname( __FILE__ ). '/class-phpcs-diff.php' );
4949

50-
$repo = sanitize_title( $assoc_args['theme'] );
50+
$repo = sanitize_title( $assoc_args['repo'] );
5151
$start_revision = absint( $assoc_args['start_revision'] );
5252
$end_revision = absint( $assoc_args['end_revision'] );
5353
if ( true === array_key_exists( 'format', $assoc_args ) && true === in_array( $assoc_args['format'], array( 'table', 'markdown' ), true ) ) {
@@ -60,7 +60,7 @@ public function __invoke( $args, $assoc_args ) {
6060
}
6161

6262
// @todo: replace SVN version control backend with any other parser you might want to use - eg.: git
63-
require_once( __DIR__ . 'class-phpcs-diff-svn.php' );
63+
require_once( dirname( __FILE__ ) . '/class-phpcs-diff-svn.php' );
6464
$phpcs = new PHPCS_Diff( new PHPCS_Diff_SVN( $repo ) );
6565

6666
if ( true === array_key_exists( 'ignore-diff-too-big', $assoc_args ) ) {
@@ -142,4 +142,4 @@ public function __invoke( $args, $assoc_args ) {
142142
}
143143
}
144144

145-
WP_CLI::add_command( 'phpcs-diff', 'PHPCS_Diff_CLI_Command' );
145+
WP_CLI::add_command( 'phpcs-diff', 'PHPCS_Diff_CLI_Command' );

0 commit comments

Comments
 (0)