Skip to content

Commit

Permalink
fix(counter): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thepercival committed May 26, 2024
1 parent 42017ad commit 1a2039f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions domain/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public function __construct(protected mixed $countedObject, protected int $count
{
}

/**
* @return self<T>
*/
public function reset2(): self
{
return new self($this->countedObject);
Expand All @@ -29,11 +32,17 @@ public function decrement(): self
return new self($this->countedObject, $this->count - 1 );
}

/**
* @return self<T>
*/
public function increment(): self
{
return new self($this->countedObject, $this->count + 1 );
}

/**
* @return self<T>
*/
public function increase(int $count): self
{
return new self($this->countedObject, $this->count + $count );
Expand Down

0 comments on commit 1a2039f

Please sign in to comment.