diff --git a/library/Rules/Domain.php b/library/Rules/Domain.php index 1b7bd5e2..427001b2 100644 --- a/library/Rules/Domain.php +++ b/library/Rules/Domain.php @@ -65,17 +65,13 @@ class Domain extends AbstractComposite public function tldCheck(bool $do = true): void { - if (true === $do) { - $this->tld = new Tld(); - } else { - $this->tld = new AllOf( - new Not( - new StartsWith('-') - ), - new NoWhitespace(), - new Length(2, null) - ); - } + $this->tld = $do ? new Tld() : new AllOf( + new Not( + new StartsWith('-') + ), + new NoWhitespace(), + new Length(2, null) + ); } /** diff --git a/library/Rules/Zend.php b/library/Rules/Zend.php index de220c46..bec54b71 100644 --- a/library/Rules/Zend.php +++ b/library/Rules/Zend.php @@ -59,11 +59,7 @@ class Zend extends AbstractRule */ private function createZendValidator(string $name, array $params): ZendValidator { - if (false === mb_stripos($name, 'Zend')) { - $name = "Zend\\Validator\\{$name}"; - } else { - $name = "\\{$name}"; - } + $name = false === mb_stripos($name, 'Zend') ? "Zend\\Validator\\{$name}" : "\\{$name}"; $reflection = new ReflectionClass($name); diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 4da4a4ef..cbae2d98 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -59,6 +59,7 @@ +