fix: add PHPDoc blocks and remove unused import in nerve service/commands

This commit is contained in:
Doar Mihai
2026-06-28 16:18:06 +03:00
parent 6e2ea7bcc7
commit 0e8ece64c3
2 changed files with 12 additions and 0 deletions
+9
View File
@@ -6,6 +6,9 @@ use App\Models\Character;
class NerveService
{
/**
* Consume nerve if character can act
*/
public function consume(Character $character, int $amount): bool
{
if (!$character->canAct()) {
@@ -15,6 +18,9 @@ class NerveService
return $character->consumeNerve($amount);
}
/**
* Regenerate nerve for a character
*/
public function regenerate(Character $character): void
{
$regenRate = config('game.nerve.regen_rate', 1);
@@ -26,6 +32,9 @@ class NerveService
$character->addNerve($regenRate);
}
/**
* Refill nerve to max for all active characters
*/
public function refillAll(): int
{
return Character::where('nerve', '<', \DB::raw('max_nerve'))