From 66a202083e2548180593b673a8bf4e50bc42267d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 26 Apr 2012 14:54:34 +0200 Subject: [PATCH] Add IOInterface::isDecorated() --- src/Composer/IO/ConsoleIO.php | 8 ++++++++ src/Composer/IO/IOInterface.php | 7 +++++++ src/Composer/IO/NullIO.php | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php index d11ed44d1..95aed6a29 100644 --- a/src/Composer/IO/ConsoleIO.php +++ b/src/Composer/IO/ConsoleIO.php @@ -55,6 +55,14 @@ class ConsoleIO implements IOInterface return $this->input->isInteractive(); } + /** + * {@inheritDoc} + */ + public function isDecorated() + { + return $this->output->isDecorated(); + } + /** * {@inheritDoc} */ diff --git a/src/Composer/IO/IOInterface.php b/src/Composer/IO/IOInterface.php index 5b540892a..583800424 100644 --- a/src/Composer/IO/IOInterface.php +++ b/src/Composer/IO/IOInterface.php @@ -33,6 +33,13 @@ interface IOInterface */ function isVerbose(); + /** + * Is this output decorated? + * + * @return Boolean + */ + function isDecorated(); + /** * Writes a message to the output. * diff --git a/src/Composer/IO/NullIO.php b/src/Composer/IO/NullIO.php index b57e42087..78688f6d5 100644 --- a/src/Composer/IO/NullIO.php +++ b/src/Composer/IO/NullIO.php @@ -35,6 +35,14 @@ class NullIO implements IOInterface return false; } + /** + * {@inheritDoc} + */ + public function isDecorated() + { + return false; + } + /** * {@inheritDoc} */