Skip to content

Commit 2c20f71

Browse files
committed
ENGCOM-6317: Bump coding standard version
1 parent 491b373 commit 2c20f71

File tree

4 files changed

+38
-7
lines changed

4 files changed

+38
-7
lines changed

app/code/Magento/BundleGraphQl/etc/schema.graphqls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
type Mutation {
55
addBundleProductsToCart(input: AddBundleProductsToCartInput): AddBundleProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart")
6-
testStatic(invalid_argument): invalid_output
76
}
87

98
input AddBundleProductsToCartInput {
@@ -87,3 +86,5 @@ enum ShipBundleItemsEnum @doc(description: "This enumeration defines whether bun
8786
TOGETHER
8887
SEPARATELY
8988
}
89+
90+
type invalidCamelCaseType {}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\TestFramework\CodingStandard\Tool\CodeSniffer;
9+
10+
/**
11+
* Add GraphQl files extension to config.
12+
*/
13+
class GraphQlWrapper extends Wrapper
14+
{
15+
const FILE_EXTENSION = 'graphqls';
16+
17+
private const TOKENIZER = 'GraphQL';
18+
19+
/**
20+
* @inheritDoc
21+
*/
22+
public function init()
23+
{
24+
parent::init();
25+
26+
$this->config->extensions += [self::FILE_EXTENSION => self::TOKENIZER];
27+
}
28+
}

dev/tests/static/phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
<testsuite name="HTML Static Code Analysis">
2222
<file>testsuite/Magento/Test/Html/LiveCodeTest.php</file>
2323
</testsuite>
24-
<testsuite name="PHP Coding Standard Verification">
25-
<file>testsuite/Magento/Test/Php/LiveCodeTest.php</file>
26-
</testsuite>
2724
<testsuite name="GraphQL Static Code Analysis">
2825
<file>testsuite/Magento/Test/GraphQl/LiveCodeTest.php</file>
2926
</testsuite>
27+
<testsuite name="PHP Coding Standard Verification">
28+
<file>testsuite/Magento/Test/Php/LiveCodeTest.php</file>
29+
</testsuite>
3030
<testsuite name="Code Integrity Tests">
3131
<directory>testsuite/Magento/Test/Integrity</directory>
3232
</testsuite>

dev/tests/static/testsuite/Magento/Test/GraphQl/LiveCodeTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ public static function setUpBeforeClass(): void
3838
*/
3939
public function testCodeStyle(): void
4040
{
41-
$reportFile = self::$reportDir . '/graphql_phpcs_report.txt';
42-
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
43-
$result = $codeSniffer->run(PHPCodeTest::getWhitelist(['graphqls']));
41+
$reportFile = self::$reportDir . '/graphql_phpcs_report.txt';
42+
$codeSniffer = new CodeSniffer('Magento',
43+
$reportFile, new Wrapper());
44+
$codeSniffer->setExtensions([CodeSniffer\GraphQlWrapper::FILE_EXTENSION]);
45+
$result = $codeSniffer->run(PHPCodeTest::getWhitelist([CodeSniffer\GraphQlWrapper::FILE_EXTENSION]));
4446
$report = file_exists($reportFile) ? file_get_contents($reportFile) : '';
4547
$this->assertEquals(
4648
0,

0 commit comments

Comments
 (0)