Skip to content

Commit 45023fd

Browse files
committed
[BUGFIX] magento#465 Trim tokens from graphql files to allow multiline type definitions
1 parent db2e2e7 commit 45023fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function process(File $phpcsFile, $stackPtr)
3232
//compose entity name by making use of the next strings that we find until we hit a non-string token
3333
$name = '';
3434
for ($i=$stackPtr+1; $tokens[$i]['code'] === T_STRING; ++$i) {
35-
$name .= $tokens[$i]['content'];
35+
$name .= rtrim($tokens[$i]['content']);
3636
}
3737

3838
$valid = Common::isCamelCaps($name, true, true, false);

0 commit comments

Comments
 (0)