diff --git a/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php b/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php index 602225fe..aaaae37d 100644 --- a/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php +++ b/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php @@ -32,7 +32,7 @@ public function process(File $phpcsFile, $stackPtr) //compose entity name by making use of the next strings that we find until we hit a non-string token $name = ''; for ($i=$stackPtr+1; $tokens[$i]['code'] === T_STRING; ++$i) { - $name .= $tokens[$i]['content']; + $name .= rtrim($tokens[$i]['content']); } $valid = Common::isCamelCaps($name, true, true, false);