From 3657b2819e377f01724dc27db62f366537eeeeb6 Mon Sep 17 00:00:00 2001 From: freek Date: Sat, 5 Aug 2017 23:35:51 +0200 Subject: [PATCH] improve formatting --- CHANGELOG.md | 4 ++++ src/ConsoleApplication.php | 2 +- src/Screens/Phpunit.php | 10 +++++----- src/Terminal.php | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 000c169..af2d8a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `phpunit-watcher` will be documented in this file +## 1.3.1 - 2017-08-05 + +- improved readability of manual + ## 1.3.0 - 2017-08-05 - added desktop notifications diff --git a/src/ConsoleApplication.php b/src/ConsoleApplication.php index 0fee434..f11b01b 100644 --- a/src/ConsoleApplication.php +++ b/src/ConsoleApplication.php @@ -8,7 +8,7 @@ class ConsoleApplication extends Application { public function __construct() { - parent::__construct('PHPUnit Watcher', '1.3.0'); + parent::__construct('PHPUnit Watcher', '1.3.1'); $this->add(new WatcherCommand()); } diff --git a/src/Screens/Phpunit.php b/src/Screens/Phpunit.php index 1e6b606..9daaee4 100644 --- a/src/Screens/Phpunit.php +++ b/src/Screens/Phpunit.php @@ -87,11 +87,11 @@ protected function displayManual() { $this->terminal ->emptyLine() - ->write('Press a to run all tests.') - ->write('Press t to filter by test name.') - ->write('Press p to filter by file name.') - ->write('Press q to quit the watcher.') - ->write('Press Enter to trigger a test run.'); + ->write('Press a to run all tests.') + ->write('Press t to filter by test name.') + ->write('Press p to filter by file name.') + ->write('Press q to quit the watcher.') + ->write('Press Enter to trigger a test run.'); return $this; } diff --git a/src/Terminal.php b/src/Terminal.php index 9e32174..ac1dbe6 100644 --- a/src/Terminal.php +++ b/src/Terminal.php @@ -63,6 +63,9 @@ public function write(string $message = '', $level = null) $formattedMessage = (new OutputFormatter(true))->format($message); + $formattedMessage = str_replace('', "\e[2m", $formattedMessage); + $formattedMessage = str_replace('', "\e[22m", $formattedMessage); + $this->io->writeln($formattedMessage); return $this;