Skip to content

Commit

Permalink
feat: create memento entry point command ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
thiiagoms committed Jun 13, 2023
1 parent 9e6ab8c commit 23dddb0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Commands/MementoMoriCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

declare(strict_types=1);

namespace MementoMori\Commands;

use MementoMori\Services\MementoMoriService;

/**
* Main command
*
* @package MementoMori\Commands
* @author Thiago <[email protected]>
* @version 1.0
*/
final class MementoMoriCommand
{
private MementoMoriService $mementoMoriService;

/**
* Init command with service
*
* @param MementoMoriService $mementoMoriService
*/
public function __construct(MementoMoriService $mementoMoriService)
{
$this->mementoMoriService = $mementoMoriService;
}

/**
* Generate a report about your lived days and how many still remain
*
* @param string $date The date for generating the report.
*
* @return void
*/
public function report(string $date): void
{
$this->mementoMoriService->report($date);
}
}

0 comments on commit 23dddb0

Please sign in to comment.