Skip to content

Commit e2c2d07

Browse files
committed
AC-666: Create phpcs static check for CopyrightTest
1 parent 8b2cd90 commit e2c2d07

File tree

107 files changed

+116
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+116
-105
lines changed

Magento2/Helpers/Commenting/PHPDocFormattingValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright © Magento. All rights reserved.
4+
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
77
namespace Magento2\Helpers\Commenting;

Magento2/Sniffs/Classes/AbstractApiSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Classes;

Magento2/Sniffs/Classes/DiscouragedDependenciesSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Classes;

Magento2/Sniffs/CodeAnalysis/EmptyBlockSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\CodeAnalysis;

Magento2/Sniffs/Commenting/ClassAndInterfacePHPDocFormattingSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright © Magento. All rights reserved.
4+
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
77
namespace Magento2\Sniffs\Commenting;

Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
26
namespace Magento2\Sniffs\Commenting;
37

48
use PHP_CodeSniffer\Files\File;

Magento2/Sniffs/Commenting/ConstantsPHPDocFormattingSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Commenting;

Magento2/Sniffs/Exceptions/DirectThrowSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Exceptions;

Magento2/Sniffs/Exceptions/ThrowCatchSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

Magento2/Sniffs/Exceptions/TryProcessSystemResourcesSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Exceptions;

Magento2/Sniffs/Functions/DiscouragedFunctionSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Functions;

Magento2/Sniffs/Functions/StaticFunctionSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Functions;

Magento2/Sniffs/GraphQL/AbstractGraphQLSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\GraphQL;

Magento2/Sniffs/GraphQL/ValidArgumentNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

Magento2/Sniffs/GraphQL/ValidEnumValueSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

Magento2/Sniffs/GraphQL/ValidFieldNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\GraphQL;

Magento2/Sniffs/GraphQL/ValidTopLevelFieldNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\GraphQL;

Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\GraphQL;

Magento2/Sniffs/Legacy/AbstractBlockSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
declare(strict_types = 1);

Magento2/Sniffs/Legacy/CopyrightSniff.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ public function register()
2525
return [T_OPEN_TAG];
2626
}
2727

28+
/**
29+
* @inheritDoc
30+
*/
2831
public function process(File $phpcsFile, $stackPtr)
2932
{
3033
$positionOpenTag = $phpcsFile->findPrevious(T_OPEN_TAG, $stackPtr - 1);
3134

32-
if ($positionOpenTag === false){
35+
if ($positionOpenTag === false) {
3336
$positionComment = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $stackPtr);
3437
$contentFile = $phpcsFile->getTokens()[$positionComment]['content'];
3538
$adobeCopyrightFound = preg_match(self::COPYRIGHT_ADOBE, $contentFile);

Magento2/Sniffs/Legacy/MageEntitySniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Legacy;

Magento2/Sniffs/Methods/DeprecatedModelMethodSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Methods;

Magento2/Sniffs/Namespaces/ImportsFromTestNamespaceSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Namespaces;

Magento2/Sniffs/NamingConvention/InterfaceNameSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\NamingConvention;

Magento2/Sniffs/PHP/FinalImplementationSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\PHP;

Magento2/Sniffs/PHP/GotoSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\PHP;

Magento2/Sniffs/PHP/ReturnValueCheckSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\PHP;

Magento2/Sniffs/PHP/VarSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\PHP;

Magento2/Sniffs/Performance/ForeachArrayMergeSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Performance;

Magento2/Sniffs/SQL/RawQuerySniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\SQL;

Magento2/Sniffs/Security/IncludeFileSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Security;

Magento2/Sniffs/Security/InsecureFunctionSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Security;

Magento2/Sniffs/Security/LanguageConstructSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Security;

Magento2/Sniffs/Security/SuperglobalSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Security;

Magento2/Sniffs/Security/XssTemplateSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Security;

Magento2/Sniffs/Strings/ExecutableRegExSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Strings;

Magento2/Sniffs/Strings/StringConcatSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Strings;

Magento2/Sniffs/Templates/ThisInTemplateSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Templates;

Magento2/Sniffs/Whitespace/MultipleEmptyLinesSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Sniffs\Whitespace;

Magento2/Tests/Classes/AbstractApiUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Classes;

Magento2/Tests/Classes/DiscouragedDependenciesUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Classes;

Magento2/Tests/CodeAnalysis/EmptyBlockUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\CodeAnalysis;

Magento2/Tests/Commenting/ClassAndInterfacePHPDocFormattingUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright © Magento. All rights reserved.
4+
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
77
namespace Magento2\Tests\Commenting;

Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Commenting;

Magento2/Tests/Commenting/ConstantsPHPDocFormattingUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Commenting;

Magento2/Tests/Exceptions/DirectThrowUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Exceptions;

Magento2/Tests/Exceptions/ThrowCatchUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

Magento2/Tests/Exceptions/TryProcessSystemResourcesUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento2\Tests\Exceptions;

0 commit comments

Comments
 (0)