[web-php] master: Enhancement: Enable `unary_operator_spaces` fixer (#851)
| From: | Andreas Möller via GitHub | Date: | Wed, 06 Dec 2023 04:11:37 +0000 |
| Subject: | [web-php] master: Enhancement: Enable `unary_operator_spaces` fixer (#851) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-31156@lists.php.net to get a copy of this message | ||
Author: Andreas Möller (localheinz)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2023-12-06T03:57:58Z
Commit: https://github.com/php/web-php/commit/110813107f5122e96a8d6e4c1334f0ed5015d844
Raw diff: https://github.com/php/web-php/commit/110813107f5122e96a8d6e4c1334f0ed5015d844.diff
Enhancement: Enable
unary_operator_spaces fixer (#851)
* Enhancement: Enable unary_operator_spaces fixer
* Fix: Run 'make coding-standards'
Changed paths:
M .php-cs-fixer.php
M include/email-validation.inc
Diff:
diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index c3be35e958..542a8c71bd 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -48,6 +48,7 @@
'strict_param' => true,
'switch_case_space' => true,
'trim_array_spaces' => true,
+ 'unary_operator_spaces' => true,
'visibility_required' => true,
'void_return' => true,
'whitespace_after_comma_in_array' => true,
diff --git a/include/email-validation.inc b/include/email-validation.inc
index 4a8b6b98d4..a4045127b2 100644
--- a/include/email-validation.inc
+++ b/include/email-validation.inc
@@ -12,7 +12,7 @@ function is_emailable_address($email)
{
$email = filter_var($email, FILTER_VALIDATE_EMAIL);
// No email, no validation
- if (! $email) {
+ if (!$email) {
return false;
}