Skip to content

Commit d8cd2d9

Browse files
committed
Correct more details in bin tools
1 parent 96b74c2 commit d8cd2d9

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

bin/PackageBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private function readPluginVersion(): string {
6464
throw new RuntimeException( "Could not read {$plugin_file}." );
6565
}
6666

67-
if ( 1 === preg_match( "/PLUGIN_VERSION', '([^']+)'/", $contents, $matches ) ) {
67+
if ( 1 === preg_match( "/PLUGIN_VERSION'\\s*,\\s*'([^']+)'/", $contents, $matches ) ) {
6868
return $matches[1];
6969
}
7070

bin/bump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function read_version( string $file ): string {
1919
throw new RuntimeException( "Could not read file: {$file}" );
2020
}
2121

22-
if ( 1 === preg_match( "/PLUGIN_VERSION', '([^']+)'/", $contents, $matches ) ) {
22+
if ( 1 === preg_match( "/PLUGIN_VERSION'\\s*,\\s*'([^']+)'/", $contents, $matches ) ) {
2323
return $matches[1];
2424
}
2525

bin/check-textdomains.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@
145145

146146
// Skip heredoc/nowdoc body entirely.
147147
if ( $type === T_START_HEREDOC ) {
148-
while ( $k < $t_count ) {
149-
$k++;
148+
while ( ++$k < $t_count ) {
150149
if ( is_array( $tokens[ $k ] ) && $tokens[ $k ][0] === T_END_HEREDOC ) {
151150
break;
152151
}

0 commit comments

Comments
 (0)