Skip to content

Commit

Permalink
Add --debug output for the file being processed. (#183)
Browse files Browse the repository at this point in the history
Add `--debug` output for the file being processed.
  • Loading branch information
schlessera authored Oct 22, 2019
2 parents 0912b1e + cbbf546 commit 5b8c86a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/JsCodeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public static function fromString( $string, Translations $translations, array $o
try {
$options += static::$options;

WP_CLI::debug( "Parsing file {$options['file']}" );

$functions = new JsFunctionsScanner( $string );

$functions->enableCommentsExtraction( $options['extractComments'] );
Expand Down
2 changes: 2 additions & 0 deletions src/MapCodeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public static function fromString( $string, Translations $translations, array $o

$string = implode( "\n", $map_object->sourcesContent );

WP_CLI::debug( "Parsing file {$options['file']}" );

$functions = new JsFunctionsScanner( $string );

$functions->enableCommentsExtraction( $options['extractComments'] );
Expand Down
2 changes: 2 additions & 0 deletions src/PhpCodeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ final class PhpCodeExtractor extends PhpCode {
public static function fromString( $string, Translations $translations, array $options = [] ) {
$options += static::$options;

WP_CLI::debug( "Parsing file {$options['file']}" );

$functions = new PhpFunctionsScanner( $string );

$functions->enableCommentsExtraction( $options['extractComments'] );
Expand Down

0 comments on commit 5b8c86a

Please sign in to comment.