🔧
This commit is contained in:
@@ -18,8 +18,10 @@ use Mockery\MockInterface;
|
||||
use Phake\IMock;
|
||||
use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\MockObject\Stub;
|
||||
use Prophecy\Prophecy\ProphecySubjectInterface;
|
||||
use ProxyManager\Proxy\ProxyInterface;
|
||||
use Symfony\Component\DependencyInjection\Argument\LazyClosure;
|
||||
use Symfony\Component\ErrorHandler\Internal\TentativeTypes;
|
||||
use Symfony\Component\VarExporter\LazyObjectInterface;
|
||||
|
||||
@@ -252,6 +254,7 @@ class DebugClassLoader
|
||||
|
||||
for (; $i < \count($symbols); ++$i) {
|
||||
if (!is_subclass_of($symbols[$i], MockObject::class)
|
||||
&& !is_subclass_of($symbols[$i], Stub::class)
|
||||
&& !is_subclass_of($symbols[$i], ProphecySubjectInterface::class)
|
||||
&& !is_subclass_of($symbols[$i], Proxy::class)
|
||||
&& !is_subclass_of($symbols[$i], ProxyInterface::class)
|
||||
@@ -259,6 +262,7 @@ class DebugClassLoader
|
||||
&& !is_subclass_of($symbols[$i], LegacyProxy::class)
|
||||
&& !is_subclass_of($symbols[$i], MockInterface::class)
|
||||
&& !is_subclass_of($symbols[$i], IMock::class)
|
||||
&& !(is_subclass_of($symbols[$i], LazyClosure::class) && str_contains($symbols[$i], "@anonymous\0"))
|
||||
) {
|
||||
$loader->checkClass($symbols[$i]);
|
||||
}
|
||||
@@ -307,7 +311,7 @@ class DebugClassLoader
|
||||
$this->checkClass($class, $file);
|
||||
}
|
||||
|
||||
private function checkClass(string $class, string $file = null): void
|
||||
private function checkClass(string $class, ?string $file = null): void
|
||||
{
|
||||
$exists = null === $file || class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false);
|
||||
|
||||
@@ -794,7 +798,7 @@ class DebugClassLoader
|
||||
return $ownInterfaces;
|
||||
}
|
||||
|
||||
private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, \ReflectionType $returnType = null): void
|
||||
private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, ?\ReflectionType $returnType = null): void
|
||||
{
|
||||
if ('__construct' === $method) {
|
||||
return;
|
||||
@@ -1133,7 +1137,7 @@ EOTXT;
|
||||
$braces = 0;
|
||||
for (; $i < $end; ++$i) {
|
||||
if (!$inClosure) {
|
||||
$inClosure = str_contains($code[$i], 'function (');
|
||||
$inClosure = false !== strpos($code[$i], 'function (');
|
||||
}
|
||||
|
||||
if ($inClosure) {
|
||||
|
||||
Reference in New Issue
Block a user