Skip to content

Commit 7d308b0

Browse files
committed
Creating a command for attachment files conversion.
1 parent fafc134 commit 7d308b0

File tree

12 files changed

+1010
-15
lines changed

12 files changed

+1010
-15
lines changed

app/commands/BaseCommand.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,39 @@ protected function prompt(string $text, string $default = '', bool $hidden = fal
145145
}
146146
return $helper->ask($this->input, $this->output, $question);
147147
}
148+
149+
protected function writeError(string $message): void
150+
{
151+
if ($this->output) {
152+
$this->output->writeln("<error>ERROR:</> $message", OutputInterface::VERBOSITY_QUIET);
153+
}
154+
}
155+
156+
protected function writeWarning(string $message): void
157+
{
158+
if ($this->output) {
159+
$this->output->writeln("<fg=yellow>WARNING:</> $message", OutputInterface::OUTPUT_NORMAL);
160+
}
161+
}
162+
163+
protected function writeVerbose(string $message): void
164+
{
165+
if ($this->output) {
166+
$this->output->writeln($message, OutputInterface::VERBOSITY_VERBOSE);
167+
}
168+
}
169+
170+
protected function writeComment(string $message): void
171+
{
172+
if ($this->output) {
173+
$this->output->writeln("<fg=bright-blue>$message</>", OutputInterface::VERBOSITY_VERY_VERBOSE);
174+
}
175+
}
176+
177+
protected function writeDebug(string $message): void
178+
{
179+
if ($this->output) {
180+
$this->output->writeln("<fg=gray>DEBUG: $message</>", OutputInterface::VERBOSITY_DEBUG);
181+
}
182+
}
148183
}

0 commit comments

Comments
 (0)