Skip to content

Commit

Permalink
Update Output.php
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph committed Mar 28, 2024
1 parent ec9a903 commit 122568d
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions src/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,21 @@

final class Output
{
/**
* @var bool $quiet Suppress output status
*/
private static bool $quiet = false;

/**
* Suppress output
*/
public static function quiet(): void
{
self::$quiet = true;
}

/**
* Disable suppressing output
*/
public static function disableQuiet(): void
{
self::$quiet = false;
}

/**
* Display text in terminal
*
* @param string $text Text string to display
*/
public static function text(string $text = ''): void
{
if (self::$quiet === false) {
echo $text . "\n";
}
echo $text . "\n";
}

/**
* Output system newline character in terminal
*/
public static function newline(): void
{
if (self::$quiet === false) {
echo PHP_EOL;
}
echo PHP_EOL;
}
}

0 comments on commit 122568d

Please sign in to comment.