Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare (strict_types=1); namespace Rector\Symfony\NodeAnalyzer; use PhpParser\Nod..
Decoded Output download
<?php
declare (strict_types=1);
namespace Rector\Symfony\NodeAnalyzer;
use PhpParser\Node;
use PHPStan\Reflection\ClassReflection;
use Rector\Reflection\ReflectionResolver;
final class SymfonyTestCaseAnalyzer
{
/**
* @readonly
* @var \Rector\Reflection\ReflectionResolver
*/
private $reflectionResolver;
public function __construct(ReflectionResolver $reflectionResolver)
{
$this->reflectionResolver = $reflectionResolver;
}
public function isInWebTestCase(Node $node) : bool
{
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase');
}
public function isInKernelTestCase(Node $node) : bool
{
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase');
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare (strict_types=1);
namespace Rector\Symfony\NodeAnalyzer;
use PhpParser\Node;
use PHPStan\Reflection\ClassReflection;
use Rector\Reflection\ReflectionResolver;
final class SymfonyTestCaseAnalyzer
{
/**
* @readonly
* @var \Rector\Reflection\ReflectionResolver
*/
private $reflectionResolver;
public function __construct(ReflectionResolver $reflectionResolver)
{
$this->reflectionResolver = $reflectionResolver;
}
public function isInWebTestCase(Node $node) : bool
{
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase');
}
public function isInKernelTestCase(Node $node) : bool
{
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase');
}
}
Function Calls
None |
Stats
MD5 | b0901bf9043e18dc5a96249e9547a247 |
Eval Count | 0 |
Decode Time | 144 ms |