Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18bfbe7

Browse filesBrowse files
authored
Merge branch 'develop' into feature/typed_class_properties
2 parents ec3b1e4 + 372d4c6 commit 18bfbe7
Copy full SHA for 18bfbe7

File tree

Expand file treeCollapse file tree

72 files changed

+1310
-6068
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

72 files changed

+1310
-6068
lines changed

‎.github/workflows/php.yml

Copy file name to clipboardExpand all lines: .github/workflows/php.yml
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php-version:
16-
- "7.4"
17-
- "8.0"
1816
- "8.1"
17+
- "8.2"
1918
dependencies:
2019
- "lowest"
2120
- "highest"
22-
exclude:
23-
- php-version: "8.1"
24-
dependencies: "lowest"
2521
name: Tests with PHP ${{ matrix.php-version }} and ${{ matrix.dependencies }} dependencies
2622

2723
steps:
@@ -93,4 +89,4 @@ jobs:
9389
run: composer install
9490

9591
- name: Run rector
96-
run: vendor/bin/rector process Magento2 Magento2Framework PHP_CodeSniffer --dry-run --autoload-file vendor/squizlabs/php_codesniffer/autoload.php --autoload-file vendor/phpcompatibility/php-compatibility/PHPCSAliases.php
92+
run: vendor/bin/rector process Magento2 Magento2Framework PHP_CodeSniffer --dry-run --autoload-file vendor/squizlabs/php_codesniffer/autoload.php --autoload-file vendor/magento/php-compatibility-fork/PHPCSAliases.php

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010

1111
.phpunit.result.cache
1212
.DS_Store
13+
phpunit.xml

‎Magento2/Helpers/Assert.php

Copy file name to clipboard
+55Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 Magento2\Helpers;
9+
10+
use PHP_CodeSniffer\Files\File;
11+
use PHP_CodeSniffer\Util\Tokens;
12+
use PHPCSUtils\Tokens\Collections;
13+
14+
/**
15+
* phpcs:disable Magento2.Functions.StaticFunction.StaticFunction
16+
*/
17+
class Assert
18+
{
19+
/**
20+
* Checks whether it is a built-in function call.
21+
*
22+
* @param File $phpcsFile
23+
* @param int $stackPtr
24+
* @return bool
25+
*/
26+
public static function isBuiltinFunctionCall(File $phpcsFile, int $stackPtr): bool
27+
{
28+
$tokens = $phpcsFile->getTokens();
29+
$nextPtr = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);
30+
if ($nextPtr === false
31+
|| $tokens[$nextPtr]['code'] !== \T_OPEN_PARENTHESIS
32+
|| isset($tokens[$nextPtr]['parenthesis_owner'])
33+
) {
34+
return false;
35+
}
36+
37+
$prevPtr = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);
38+
if ($prevPtr !== false) {
39+
if (isset(Collections::objectOperators()[$tokens[$prevPtr]['code']])
40+
|| $tokens[$prevPtr]['code'] === \T_NEW
41+
) {
42+
return false;
43+
}
44+
45+
if ($tokens[$prevPtr]['code'] === \T_NS_SEPARATOR) {
46+
$prevPrevPr = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prevPtr - 1), null, true);
47+
if ($prevPrevPr !== false && \in_array($tokens[$prevPrevPr]['code'], [\T_STRING, \T_NAMESPACE], true)) {
48+
return false;
49+
}
50+
}
51+
}
52+
53+
return true;
54+
}
55+
}

‎Magento2/Helpers/PHPCSUtils/BackCompat/BCTokens.php

Copy file name to clipboardExpand all lines: Magento2/Helpers/PHPCSUtils/BackCompat/BCTokens.php
-109Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.