Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
n4ss1m authored and github-actions[bot] committed Oct 16, 2024
1 parent 5474433 commit ff4b492
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NicDz.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public function __construct(string $domain)

public function validate(string $domain): string
{
if(!preg_match('/^(www\.)?([a-z0-9-]+)((\.gov|\.com|\.org|\.net|\.edu|\.asso|\.art|\.pol|\.tm|\.soc)?\.dz)$/i', $domain)) {
if (! preg_match('/^(www\.)?([a-z0-9-]+)((\.gov|\.com|\.org|\.net|\.edu|\.asso|\.art|\.pol|\.tm|\.soc)?\.dz)$/i', $domain)) {
throw new \InvalidArgumentException('Invalid domain name');
}

return str_replace( ['www.'],'',strtolower($domain));
return str_replace(['www.'], '', strtolower($domain));
}

/**
Expand Down

0 comments on commit ff4b492

Please sign in to comment.