1
0
mirror of synced 2025-01-26 10:11:41 +03:00
DeliveryModuleBundle/Command/Traits/CommandOutputFormatterTrait.php
2022-08-01 12:56:48 +03:00

22 lines
525 B
PHP

<?php
namespace RetailCrm\DeliveryModuleBundle\Command\Traits;
trait CommandOutputFormatterTrait
{
public function getMessage(string $level, string $message): string
{
return sprintf('%s %s %s', date('Y-m-d H:i:s'), strtoupper($level), $message);
}
public function getInfoMessage(string $message): string
{
return $this->getMessage('INFO', $message);
}
public function getErrorMessage(string $message): string
{
return $this->getMessage('ERROR', $message);
}
}