Skip to content

Commit

Permalink
fix: pasword methods are now chainable
Browse files Browse the repository at this point in the history
  • Loading branch information
phpsa authored Jun 22, 2022
1 parent 02e623d commit aa6f233
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Traits/CanGenerate.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,22 @@ public function isGeneratable(): bool
return (bool) $this->evaluate($this->generatable);
}

public function passwordLength(int $len)
public function passwordLength(int $len): static
{
$this->passwordMinLen = $len;
return $this;
}

public function passwordUsesNumbers(bool $use = true)
public function passwordUsesNumbers(bool $use = true): static
{
$this->passwordUsesNumbers = $use;
return $this;
}

public function passwordUsesSymbols(bool $use = true)
public function passwordUsesSymbols(bool $use = true): static
{
$this->passwordUsesSymbols = $use;
return $this;
}

public function getPasswLength(): int
Expand Down

0 comments on commit aa6f233

Please sign in to comment.