diff --git a/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php b/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php index aaaae37d..83e38ed5 100644 --- a/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php +++ b/Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php @@ -32,6 +32,9 @@ 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) { + /** + * @see \PHP_CodeSniffer\Tokenizers\GRAPHQL::tokenize Removing EOL character artificially added to token + */ $name .= rtrim($tokens[$i]['content']); }