1
0
mirror of synced 2025-01-27 02:31:40 +03:00
DeliveryModuleBundle/Command/Traits/CommandOutputFormatterTrait.php

22 lines
525 B
PHP
Raw Normal View History

2020-12-16 11:39:46 +03:00
<?php
namespace RetailCrm\DeliveryModuleBundle\Command\Traits;
trait CommandOutputFormatterTrait
{
public function getMessage(string $level, string $message): string
{
2022-08-01 12:56:48 +03:00
return sprintf('%s %s %s', date('Y-m-d H:i:s'), strtoupper($level), $message);
2020-12-16 11:39:46 +03:00
}
public function getInfoMessage(string $message): string
{
return $this->getMessage('INFO', $message);
}
public function getErrorMessage(string $message): string
{
return $this->getMessage('ERROR', $message);
}
2022-08-01 12:56:48 +03:00
}