Skip to content

Commit f8bc493

Browse files
committed
Cleanup
1 parent eb3037b commit f8bc493

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ public function process(\PHP_CodeSniffer\Files\File $phpcsFile, $classPointer):
156156
return;
157157
}
158158

159-
if (!isset($reportedProperties[$propertyName])) {
160-
return;
161-
}
162-
163159
unset($reportedProperties[$propertyName]);
164160
};
165161

@@ -205,17 +201,13 @@ public function process(\PHP_CodeSniffer\Files\File $phpcsFile, $classPointer):
205201
// self::string or static::string not followed by ( - possible constant access
206202

207203
$name = $nextToken['content'];
208-
if (isset($reportedConstants[$name])) {
209-
unset($reportedConstants[$name]);
210-
}
204+
unset($reportedConstants[$name]);
211205

212206
return $tokenPointerAfterNextToken + 1;
213207
}
214208

215209
$name = $this->getNormalizedMethodName($nextToken['content']);
216-
if (isset($reportedMethods[$name])) {
217-
unset($reportedMethods[$name]);
218-
}
210+
unset($reportedMethods[$name]);
219211

220212
return $tokenPointerAfterNextToken + 1;
221213
};

0 commit comments

Comments
 (0)