Skip to content

Commit 3bb02e4

Browse files
NGSTACK-938 fix phpstan only booleans allowed in ternary operator condition
1 parent a34ce0a commit 3bb02e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Action/CheckPrettier.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ protected function doExecute(Config $config, IO $io, Repository $repository, Act
4444
$result = $this->checkPrettier($file->getPath(), $prettierCommand, $formatOptions);
4545

4646
$io->write(sprintf('<info>%s: </info>', $file->getPath()));
47-
$result['success'] ? $io->write($result['output']) : $io->writeError(sprintf('<error>%s</error>', $result['error']));
47+
48+
if ($result['success']) {
49+
$io->write($result['output']);
50+
} else {
51+
$io->writeError(sprintf('<error>%s</error>', $result['error']));
52+
}
4853

4954
if ($result['success'] !== true) {
5055
$this->throwError($action, $io);

0 commit comments

Comments
 (0)