Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 41ef891

Browse files
committed
Fix incorrect brace placement in ExpectObj subclass
1 parent 7f47a2a commit 41ef891

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/TestLib/ExpectObj.hack

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,22 @@ final class ExpectObj<T> extends \Facebook\FBExpect\ExpectObj<T> {
7171
);
7272
\fwrite(\STDERR, $diff);
7373
}
74-
}
75-
\fwrite(\STDERR, "----- END -----\n");
76-
\stream_set_blocking(\STDERR, false);
74+
\fwrite(\STDERR, "----- END -----\n");
75+
\stream_set_blocking(\STDERR, false);
7776

78-
$recorded = false;
79-
if (\posix_isatty(\STDIN) && \posix_isatty(\STDERR)) {
80-
\fprintf(\STDERR, "Would you like to save this output? [y/N] ");
81-
\stream_set_blocking(\STDIN, true);
82-
$response = Str\trim(\fgets(\STDIN));
83-
\stream_set_blocking(\STDIN, false);
84-
if ($response === 'y') {
85-
\file_put_contents($expect_file, $code);
86-
$recorded = true;
77+
$recorded = false;
78+
if (\posix_isatty(\STDIN) && \posix_isatty(\STDERR)) {
79+
\fprintf(\STDERR, "Would you like to save this output? [y/N] ");
80+
\stream_set_blocking(\STDIN, true);
81+
$response = Str\trim(\fgets(\STDIN));
82+
\stream_set_blocking(\STDIN, false);
83+
if ($response === 'y') {
84+
\file_put_contents($expect_file, $code);
85+
$recorded = true;
86+
}
87+
} else {
88+
throw new \Exception($expect_file.' does not exist');
8789
}
88-
} else {
89-
throw new \Exception($expect_file.' does not exist');
9090
}
9191
$this->toBeSame(\file_get_contents($expect_file));
9292
}

0 commit comments

Comments
 (0)