Skip to content

Commit 435d11b

Browse files
Copilotswissspidy
andcommitted
Revert $line variable name in prompt() method
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent cef0970 commit 435d11b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/WP_CLI/Shell/REPL.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@ private function prompt() {
8888

8989
$fp = popen( self::create_prompt_cmd( $prompt, $this->history_file ), 'r' );
9090

91-
$__repl_input_line = $fp ? fgets( $fp ) : '';
91+
$line = $fp ? fgets( $fp ) : '';
9292

9393
if ( $fp ) {
9494
pclose( $fp );
9595
}
9696

97-
if ( ! $__repl_input_line ) {
97+
if ( ! $line ) {
9898
break;
9999
}
100100

101-
$__repl_input_line = rtrim( $__repl_input_line, "\n" );
101+
$line = rtrim( $line, "\n" );
102102

103-
if ( $__repl_input_line && '\\' === $__repl_input_line[ strlen( $__repl_input_line ) - 1 ] ) {
104-
$__repl_input_line = substr( $__repl_input_line, 0, -1 );
103+
if ( $line && '\\' === $line[ strlen( $line ) - 1 ] ) {
104+
$line = substr( $line, 0, -1 );
105105
} else {
106106
$done = true;
107107
}
108108

109-
$full_line .= $__repl_input_line;
109+
$full_line .= $line;
110110

111111
} while ( ! $done );
112112

0 commit comments

Comments
 (0)