-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create memento entry point command ✨
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |