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 a50eae5

Browse filesBrowse files
authored
Merge branch 'develop' into 121_HelperInTemplateRule
2 parents 60c7d87 + fde7fc5 commit a50eae5
Copy full SHA for a50eae5

File tree

Expand file treeCollapse file tree

5 files changed

+19
-2
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+19
-2
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ php:
44
- 7.0
55
- 7.1
66
- 7.2
7+
- 7.3
78
install: composer install --no-interaction --prefer-source
89
script:
910
- vendor/bin/phpunit

‎Magento2/Sniffs/CodeAnalysis/EmptyBlockSniff.php

Copy file name to clipboardExpand all lines: Magento2/Sniffs/CodeAnalysis/EmptyBlockSniff.php
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento2\Sniffs\CodeAnalysis;
77

8+
use PHP_CodeSniffer\Files\File;
89
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff;
910

1011
/**
@@ -25,4 +26,17 @@ public function register()
2526
]
2627
);
2728
}
29+
/**
30+
* @inheritDoc
31+
*/
32+
public function process(File $phpcsFile, $stackPtr)
33+
{
34+
$tokens = $phpcsFile->getTokens();
35+
if ($tokens[$stackPtr]['code'] === T_FUNCTION &&
36+
strpos($phpcsFile->getDeclarationName($stackPtr), 'around') === 0) {
37+
return;
38+
}
39+
40+
parent::process($phpcsFile, $stackPtr);
41+
}//end process()
2842
}

‎Magento2/Tests/CodeAnalysis/EmptyBlockUnitTest.inc

Copy file name to clipboardExpand all lines: Magento2/Tests/CodeAnalysis/EmptyBlockUnitTest.inc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ if (true) {} elseif (false) {}
7474
function emptyFunction () { /*Empty function block*/ }
7575

7676
function nonEmptyFunction () { return true; }
77+
78+
function aroundEmptyFunction ($foo, $bar) { }

‎composer.json

Copy file name to clipboardExpand all lines: composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"AFL-3.0"
77
],
88
"type": "phpcodesniffer-standard",
9-
"version": "3",
9+
"version": "4",
1010
"require": {
1111
"php": ">=5.6.0",
1212
"squizlabs/php_codesniffer": "^3.4"

‎composer.lock

Copy file name to clipboardExpand all lines: composer.lock
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

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