modifs.mineures sans commentaires
This commit is contained in:
parent
3a66a82b86
commit
41bba56895
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpTestFrameworkVersionCache">
|
||||
<tools_cache>
|
||||
<tool tool_name="PHPUnit">
|
||||
<cache>
|
||||
<versions>
|
||||
<info id="Local/vendor/autoload.php" version="9.6.20" />
|
||||
</versions>
|
||||
</cache>
|
||||
</tool>
|
||||
</tools_cache>
|
||||
</component>
|
||||
</project>
|
|
@ -7,6 +7,7 @@ use nur\sery\cl;
|
|||
use nur\sery\ExceptionShadow;
|
||||
use nur\sery\output\IMessenger;
|
||||
use nur\sery\UserException;
|
||||
use nur\SL;
|
||||
use Throwable;
|
||||
|
||||
class StdMessenger implements _IMessenger {
|
||||
|
@ -241,6 +242,7 @@ class StdMessenger implements _IMessenger {
|
|||
int $indentLevel, StdOutput $out): void {
|
||||
$prefixes = self::GENERIC_PREFIXES[$level][$type];
|
||||
if ($prefixes[0]) $out->print();
|
||||
$content = SL::with($content);
|
||||
if ($out->isColor()) {
|
||||
$before = $prefixes[2];
|
||||
$prefix = $prefixes[3];
|
||||
|
@ -249,7 +251,7 @@ class StdMessenger implements _IMessenger {
|
|||
$suffix2 = $suffix !== null? " $suffix": null;
|
||||
$after = $prefixes[5];
|
||||
|
||||
$lines = $out->getLines(false, $content);
|
||||
$lines = $out->getLines(false, ...$content);
|
||||
$maxlen = 0;
|
||||
foreach ($lines as &$content) {
|
||||
$line = $out->filterColors($content);
|
||||
|
@ -274,7 +276,7 @@ class StdMessenger implements _IMessenger {
|
|||
$prefix = $prefixes[1];
|
||||
if ($prefix !== null) $prefix .= " ";
|
||||
$prefix2 = str_repeat(" ", mb_strlen($prefix));
|
||||
$lines = $out->getLines(false, $content);
|
||||
$lines = $out->getLines(false, ...$content);
|
||||
foreach ($lines as $content) {
|
||||
if ($linePrefix !== null) $out->write($linePrefix);
|
||||
$out->iprint($indentLevel, $prefix, $content);
|
||||
|
@ -360,6 +362,7 @@ class StdMessenger implements _IMessenger {
|
|||
string $type, $content,
|
||||
int $indentLevel, StdOutput $out): void {
|
||||
$prefixes = self::GENERIC_PREFIXES[$level][$type];
|
||||
$content = SL::with($content);
|
||||
if ($out->isColor()) {
|
||||
$prefix = $prefixes[1];
|
||||
$prefix2 = null;
|
||||
|
@ -369,7 +372,7 @@ class StdMessenger implements _IMessenger {
|
|||
$prefix2 = str_repeat(" ", mb_strlen($prefix2));
|
||||
}
|
||||
$suffix = $prefixes[2];
|
||||
$lines = $out->getLines(false, $content);
|
||||
$lines = $out->getLines(false, ...$content);
|
||||
foreach ($lines as $content) {
|
||||
if ($linePrefix !== null) $out->write($linePrefix);
|
||||
$out->iprint($indentLevel, $prefix, $content, $suffix);
|
||||
|
@ -379,7 +382,7 @@ class StdMessenger implements _IMessenger {
|
|||
$prefix = $prefixes[0];
|
||||
if ($prefix !== null) $prefix .= " ";
|
||||
$prefix2 = str_repeat(" ", mb_strlen($prefix));
|
||||
$lines = $out->getLines(false, $content);
|
||||
$lines = $out->getLines(false, ...$content);
|
||||
foreach ($lines as $content) {
|
||||
if ($linePrefix !== null) $out->write($linePrefix);
|
||||
$out->iprint($indentLevel, $prefix, $content);
|
||||
|
|
Loading…
Reference in New Issue