From 7bde8d7c1d5daf798b17d28f9478660f16263601 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 31 Mar 2023 17:27:09 +0300 Subject: [PATCH] Update StyleCI config (#94) * Update StyleCI config * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot --- .styleci.yml | 17 +++++++---------- src/Target.php | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.styleci.yml b/.styleci.yml index 63e26a59..1ab379b4 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,20 +1,12 @@ preset: psr12 risky: true -version: 8 +version: 8.1 finder: exclude: - docs - vendor - - resources - - views - - public - - templates - not-name: - - UnionCar.php - - TimerUnionTypes.php - - schema1.php enabled: - alpha_ordered_traits @@ -64,7 +56,6 @@ enabled: - phpdoc_order - phpdoc_property - phpdoc_scalar - - phpdoc_separation - phpdoc_singular_inheritdoc - phpdoc_trim - phpdoc_trim_consecutive_blank_line_separation @@ -86,3 +77,9 @@ enabled: - trailing_comma_in_multiline_array - unalign_double_arrow - unalign_equals + - empty_loop_body_braces + - integer_literal_case + - union_type_without_spaces + +disabled: + - function_declaration diff --git a/src/Target.php b/src/Target.php index b64ff265..1f7c402e 100644 --- a/src/Target.php +++ b/src/Target.php @@ -378,7 +378,7 @@ private function filterMessages(array $messages): void throw new InvalidArgumentException('You must provide an instance of \Yiisoft\Log\Message.'); } - if ((!empty($this->levels) && !in_array(($message->level()), $this->levels, true))) { + if (!empty($this->levels) && !in_array($message->level(), $this->levels, true)) { unset($messages[$i]); continue; }