Skip to content

Commit

Permalink
[BUGFIX] magento#465 Trim tokens from graphql files to allow multilin…
Browse files Browse the repository at this point in the history
…e type definitions
  • Loading branch information
p-makowski committed Sep 13, 2023
1 parent db2e2e7 commit 45023fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 45023fd

Please sign in to comment.