1
0
mirror of synced 2025-01-25 01:31:41 +03:00

Merge pull request #13 from gridnevalex/add_command_output_formatting

Add CommandOutputFormatterTrait
This commit is contained in:
Kruglov Kirill 2020-12-16 13:11:20 +03:00 committed by GitHub
commit 18f8d918af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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);
}
}