Add CommandOutputFormatterTrait
This commit is contained in:
parent
92a0e575d4
commit
a6ac3c1f58
16
Command/Traits/CommandOutputFormatterTrait.php
Normal file
16
Command/Traits/CommandOutputFormatterTrait.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace RetailCrm\DeliveryModuleBundle\Command\Traits;
|
||||||
|
|
||||||
|
trait CommandOutputFormatterTrait
|
||||||
|
{
|
||||||
|
public function output(string $level, string $message): string
|
||||||
|
{
|
||||||
|
return sprintf("%s %s %s", date('Y-m-d H:i:s'), strtoupper($level), $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function infoOutput(string $message): string
|
||||||
|
{
|
||||||
|
return $this->output('INFO', $message);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user