Skip to content

Commit

Permalink
Merge pull request #5 from phpsa/3-passwordlength-function-error
Browse files Browse the repository at this point in the history
fix: pasword methods are now chainable
  • Loading branch information
phpsa authored Jul 1, 2022
2 parents 02e623d + aa6f233 commit ce2f561
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 ce2f561

Please sign in to comment.