Skip to content

Commit

Permalink
Fix: CodeStyling..
Browse files Browse the repository at this point in the history
Signed-off-by: Yann 'Ze' Richard <[email protected]>
  • Loading branch information
Zeuh committed Jun 5, 2022
1 parent 267d013 commit 69542eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions src/StandfordLikePasswordPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,14 @@ public function setEncoding(string $encoding) : bool
if ($res1 && $res2) {
$this->encoding = $encoding;
return true;
} else {
if ($this->encoding !== '') {
// failback
mb_internal_encoding($this->encoding);
@mb_regex_encoding($this->encoding);
return false;
}
}
if ($this->encoding !== '') {
// failback
mb_internal_encoding($this->encoding);
@mb_regex_encoding($this->encoding);
return false;
}
return false;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions tests/units/StandfordLikePasswordPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ function () : void {
public function testConstructPHP8()
{
$this->assert(__METHOD__ . ' : test constructor with invalid param')
->exception(
function () : void {
$this->newTestedInstance('AZERTY');
}
);
->exception(
function () : void {
$this->newTestedInstance('AZERTY');
}
);
}

/**
Expand Down

0 comments on commit 69542eb

Please sign in to comment.