Skip to content

Commit

Permalink
Fixed PHP 8.* issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Miu committed Apr 17, 2023
1 parent 725c48a commit 263e07c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ErrorMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __toString()
$result = $this->template;
foreach ($this->variables as $k => $v) {
if (strpos($result, "{{$k}}") !== false) {
$result = str_replace("{{$k}}", $v, $result);
$result = str_replace("{{$k}}", $v, (string) $result);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Rule/Alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Alpha extends AbstractRule
public function validate($value, string $valueIdentifier = null):bool
{
$this->value = $value;
$this->success = (bool) ctype_alpha((string) str_replace(' ', '', $value));
$this->success = (bool) ctype_alpha((string) str_replace(' ', '', (string) $value));

return $this->success;
}
Expand Down

0 comments on commit 263e07c

Please sign in to comment.