diff --git a/src/Fqsen.php b/src/Fqsen.php index 9fc0c64..e3633bd 100644 --- a/src/Fqsen.php +++ b/src/Fqsen.php @@ -48,9 +48,13 @@ public function __construct(string $fqsen) ); if ($result === 0) { - throw new InvalidArgumentException( - sprintf('"%s" is not a valid Fqsen.', $fqsen) - ); + if(strpos($fqsen, "\\class@anonymous") === 0) { + $matches=[null,null,$fqsen]; + } else { + throw new InvalidArgumentException( + sprintf('"%s" is not a valid Fqsen.', $fqsen) + ); + } } $this->fqsen = $fqsen;