Skip to content

Commit

Permalink
#31861: Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Mar 2, 2021
1 parent 478a69c commit 79e89c8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace Magento\CodeMessDetector\Rule\Design;

use Magento\Framework\Session\SessionManagerInterface;
use Magento\Framework\Stdlib\Cookie\CookieReaderInterface;
use PDepend\Source\AST\ASTClass;
use PHPMD\AbstractNode;
use PHPMD\AbstractRule;
Expand Down Expand Up @@ -171,10 +173,10 @@ private function doesUseRestrictedClasses(\ReflectionClass $class): bool
if ($class === null) {
continue;
}
if ($class->isSubclassOf(\Magento\Framework\Session\SessionManagerInterface::class)
|| $class->getName() === \Magento\Framework\Session\SessionManagerInterface::class
|| $class->isSubclassOf(\Magento\Framework\Stdlib\Cookie\CookieReaderInterface::class)
|| $class->getName() === \Magento\Framework\Stdlib\Cookie\CookieReaderInterface::class
if ($class->isSubclassOf(SessionManagerInterface::class)
|| $class->getName() === SessionManagerInterface::class
|| $class->isSubclassOf(CookieReaderInterface::class)
|| $class->getName() === CookieReaderInterface::class
) {
return true;
}
Expand Down

0 comments on commit 79e89c8

Please sign in to comment.