Skip to content

Commit 98816b5

Browse files
committed
Symplify code
1 parent ff19097 commit 98816b5

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Symfony/Sniffs/Classes/PropertyDeclarationSniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ public function process(File $phpcsFile, $stackPtr)
5858
{
5959
$tokens = $phpcsFile->getTokens();
6060

61-
$end = null;
62-
if (isset($tokens[$stackPtr]['scope_closer'])) {
63-
$end = $tokens[$stackPtr]['scope_closer'];
64-
}
61+
$end = $tokens[$stackPtr]['scope_closer'] ?? null;
6562

6663
$scope = $phpcsFile->findNext(
6764
T_FUNCTION,

Symfony/Sniffs/Functions/ScopeOrderSniff.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ public function process(File $phpcsFile, $stackPtr)
7373
);
7474

7575
while ($function) {
76-
$end = null;
77-
78-
if (isset($tokens[$stackPtr]['scope_closer'])) {
79-
$end = $tokens[$stackPtr]['scope_closer'];
80-
}
76+
$end = $tokens[$stackPtr]['scope_closer'] ?? null;
8177

8278
$function = $phpcsFile->findNext(
8379
array(

0 commit comments

Comments
 (0)