Skip to content

Commit d99c922

Browse files
MC-19366: Fixes that tokenizer for GraphQL files could not be loaded due to PHP_CodeSniffer uppercasing tokenizer names
1 parent 01eee92 commit d99c922

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Magento2/Sniffs/GraphQL/AbstractGraphQLSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class AbstractGraphQLSniff implements Sniff
1717
*
1818
* @var array
1919
*/
20-
public $supportedTokenizers = ['GraphQL'];
20+
public $supportedTokenizers = ['GRAPHQL'];
2121

2222
/**
2323
* Returns whether <var>$name</var> starts with a lower case character and is written in camel case.

Magento2/Tests/GraphQL/AbstractGraphQLSniffUnitTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function setUp()
2323
$config->extensions = array_merge(
2424
$config->extensions,
2525
[
26-
'graphqls' => 'GraphQL'
26+
'graphqls' => 'GRAPHQL'
2727
]
2828
);
2929

PHP_CodeSniffer/Tokenizers/GraphQL.php renamed to PHP_CodeSniffer/Tokenizers/GRAPHQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Implements a tokenizer for GraphQL files.
1515
*/
16-
class GraphQL extends Tokenizer
16+
class GRAPHQL extends Tokenizer
1717
{
1818

1919
/**

0 commit comments

Comments
 (0)