From acca8ede3c5df9af42cf63a8a360c37846eafad3 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 5 Apr 2020 12:32:46 +0200 Subject: [PATCH] :lipstick: Improve ruleset --- SymfonyCustom/Helpers/SniffHelper.php | 2 +- SymfonyCustom/ruleset.xml | 227 ++++++++++++++++++-------- 2 files changed, 164 insertions(+), 65 deletions(-) diff --git a/SymfonyCustom/Helpers/SniffHelper.php b/SymfonyCustom/Helpers/SniffHelper.php index ee5e305..e2f92e2 100644 --- a/SymfonyCustom/Helpers/SniffHelper.php +++ b/SymfonyCustom/Helpers/SniffHelper.php @@ -195,7 +195,7 @@ public static function isGlobalUse(File $phpcsFile, int $stackPtr): bool public static function parseTypeHint(string $content): array { preg_match( - '{^'.SniffHelper::REGEX_TYPES.'(?[\s\t]*)?(?.*)?$}six', + '{^'.self::REGEX_TYPES.'(?[\s\t]*)?(?.*)?$}six', $content, $matches ); diff --git a/SymfonyCustom/ruleset.xml b/SymfonyCustom/ruleset.xml index ce93360..2f93875 100755 --- a/SymfonyCustom/ruleset.xml +++ b/SymfonyCustom/ruleset.xml @@ -6,9 +6,9 @@ */vendor/* - + - + @@ -18,118 +18,217 @@ - + - - - - error + + + + + + + + - + + - - - - - - - + + + + error + + + + + + + + - + + + + + + + error + + + + error + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - - - - - - error - - - error - - + - - - - - - - - error - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + error + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +