[
  {
    "path": ".doctrine-project.json",
    "content": "{\n    \"active\": false,\n    \"name\": \"Annotations\",\n    \"slug\": \"annotations\",\n    \"docsSlug\": \"doctrine-annotations\",\n    \"versions\": [\n        {\n            \"name\": \"2.0\",\n            \"branchName\": \"2.0.x\",\n            \"aliases\": [\n                \"current\",\n                \"stable\"\n            ],\n            \"current\": true,\n            \"maintained\": true\n        },\n        {\n            \"name\": \"1.14\",\n            \"branchName\": \"1.14.x\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.13\",\n            \"branchName\": \"1.13.x\",\n            \"slug\": \"1.13\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.12\",\n            \"branchName\": \"1.12.x\",\n            \"slug\": \"1.12\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.11\",\n            \"branchName\": \"1.11.x\",\n            \"slug\": \"1.11\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.10\",\n            \"branchName\": \"1.10.x\",\n            \"slug\": \"1.10\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.9\",\n            \"branchName\": \"1.9.x\",\n            \"slug\": \"1.9\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.8\",\n            \"branchName\": \"1.8\",\n            \"slug\": \"1.8\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.7\",\n            \"branchName\": \"1.7\",\n            \"slug\": \"1.7\",\n            \"maintained\": false\n        },\n        {\n            \"name\": \"1.6\",\n            \"branchName\": \"1.6\",\n            \"slug\": \"1.6\",\n            \"maintained\": false\n        }\n    ]\n}\n"
  },
  {
    "path": ".gitattributes",
    "content": "/.* export-ignore\n/tests export-ignore\n/phpbench.json.dist export-ignore\n/phpcs.xml.dist export-ignore\n/phpstan.neon export-ignore\n/phpunit.xml.dist export-ignore\n/psalm.xml export-ignore\n"
  },
  {
    "path": ".github/workflows/coding-standards.yml",
    "content": "\nname: \"Coding Standards\"\n\non:\n  pull_request:\n    branches:\n      - \"*.x\"\n  push:\n    branches:\n      - \"*.x\"\n\njobs:\n  coding-standards:\n    name: \"Coding Standards\"\n    uses: \"doctrine/.github/.github/workflows/coding-standards.yml@13.1.0\"\n"
  },
  {
    "path": ".github/workflows/composer-lint.yml",
    "content": "name: \"Composer Lint\"\n\non:\n  pull_request:\n    branches:\n      - \"*.x\"\n    paths:\n      - \"composer.json\"\n  push:\n    branches:\n      - \"*.x\"\n    paths:\n      - \"composer.json\"\n\njobs:\n  composer-lint:\n    name: \"Composer Lint\"\n    uses: \"doctrine/.github/.github/workflows/composer-lint.yml@13.1.0\"\n"
  },
  {
    "path": ".github/workflows/continuous-integration.yml",
    "content": "name: \"Continuous Integration\"\n\non:\n  pull_request:\n    branches:\n      - \"*.x\"\n  push:\n    branches:\n      - \"*.x\"\n\nenv:\n  fail-fast: true\n\njobs:\n  phpunit:\n    name: \"PHPUnit\"\n    uses: \"doctrine/.github/.github/workflows/continuous-integration.yml@13.1.0\"\n    with:\n      php-versions: '[\"7.2\", \"7.3\", \"7.4\", \"8.0\", \"8.1\", \"8.2\", \"8.3\", \"8.4\", \"8.5\"]'\n    secrets:\n      CODECOV_TOKEN: \"${{ secrets.CODECOV_TOKEN }}\"\n"
  },
  {
    "path": ".github/workflows/documentation.yml",
    "content": "name: \"Documentation\"\n\non:\n  pull_request:\n    branches:\n      - \"*.x\"\n    paths:\n      - \".github/workflows/documentation.yml\"\n      - \"docs/**\"\n  push:\n    branches:\n      - \"*.x\"\n    paths:\n      - \".github/workflows/documentation.yml\"\n      - \"docs/**\"\n\njobs:\n  documentation:\n    name: \"Documentation\"\n    uses: \"doctrine/.github/.github/workflows/documentation.yml@13.1.0\"\n"
  },
  {
    "path": ".github/workflows/release-on-milestone-closed.yml",
    "content": "name: \"Automatic Releases\"\n\non:\n  milestone:\n    types:\n      - \"closed\"\n\njobs:\n  release:\n    name: \"Git tag, release & create merge-up PR\"\n    uses: \"doctrine/.github/.github/workflows/release-on-milestone-closed.yml@13.1.0\"\n    secrets:\n      GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}\n      GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}\n      ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}\n      SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}\n"
  },
  {
    "path": ".github/workflows/static-analysis.yml",
    "content": "\nname: \"Static Analysis\"\n\non:\n  pull_request:\n    branches:\n      - \"*.x\"\n  push:\n    branches:\n      - \"*.x\"\n\njobs:\n  phpstan:\n    name: \"Static Analysis\"\n    uses: \"doctrine/.github/.github/workflows/phpstan.yml@13.1.0\"\n\n  psalm:\n    name: \"Psalm (PHP: 8.2)\"\n    runs-on: \"ubuntu-22.04\"\n\n    steps:\n      - name: \"Checkout code\"\n        uses: \"actions/checkout@v6\"\n\n      - name: \"Install PHP\"\n        uses: \"shivammathur/setup-php@v2\"\n        with:\n          coverage: \"none\"\n          php-version: \"8.2\"\n\n      - name: \"Install dependencies with Composer\"\n        uses: \"ramsey/composer-install@v3\"\n        with:\n          dependency-versions: \"highest\"\n\n      - name: \"Run a static analysis with vimeo/psalm\"\n        run: \"vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)\"\n"
  },
  {
    "path": ".gitignore",
    "content": "/vendor/\n/composer.lock\n/composer.phar\n/phpbench.json\n/phpunit.xml\n/.phpcs-cache\n/.phpunit.result.cache\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2006-2013 Doctrine Project\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "⚠️ PHP 8 introduced\n[attributes](https://www.php.net/manual/en/language.attributes.overview.php),\nwhich are a native replacement for annotations. As such, this library is\nconsidered feature complete, and should receive exclusively bugfixes and\nsecurity fixes.\n\nWe do not recommend using this library in new projects and encourage authors\nof downstream libraries to offer support for attributes as an alternative to\nDoctrine Annotations.\n\nHave a look at [our blog](https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html)\nto learn more.\n\n# Doctrine Annotations\n\n[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions)\n[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations)\n[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references)\n[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations)\n[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations)\n\nDocblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)).\n\n## Documentation\n\nSee the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/stable/index.html).\n\n## Contributing\n\nWhen making a pull request, make sure your changes follow the\n[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction).\n"
  },
  {
    "path": "UPGRADE.md",
    "content": "# Upgrade from 1.0.x to 2.0.x\n\n- The `NamedArgumentConstructorAnnotation` has been removed. Use the `@NamedArgumentConstructor`\n  annotation instead.\n- `SimpleAnnotationReader` has been removed.\n- `DocLexer::peek()` and `DocLexer::glimpse` now return\n`Doctrine\\Common\\Lexer\\Token` objects. When using `doctrine/lexer` 2, these\nimplement `ArrayAccess` as a way for you to still be able to treat them as\narrays in some ways.\n- `CachedReader` and `FileCacheReader` have been removed use `PsrCachedReader` instead.\n- `AnnotationRegistry` methods related to registering annotations instead of\n  using autoloading have been removed.\n- Parameter type declarations have been added to all methods of all classes. If\nyou have classes inheriting from classes inside this package, you should add\nparameter and return type declarations.\n- Support for PHP < 7.2 has been removed\n- `PhpParser::parseClass()` has been removed. Use\n  `PhpParser::parseUseStatements()` instead.\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"doctrine/annotations\",\n    \"description\": \"Docblock Annotations Parser\",\n    \"license\": \"MIT\",\n    \"type\": \"library\",\n    \"abandoned\": true,\n    \"keywords\": [\n        \"annotations\",\n        \"docblock\",\n        \"parser\"\n    ],\n    \"authors\": [\n        {\n            \"name\": \"Guilherme Blanco\",\n            \"email\": \"guilhermeblanco@gmail.com\"\n        },\n        {\n            \"name\": \"Roman Borschel\",\n            \"email\": \"roman@code-factory.org\"\n        },\n        {\n            \"name\": \"Benjamin Eberlei\",\n            \"email\": \"kontakt@beberlei.de\"\n        },\n        {\n            \"name\": \"Jonathan Wage\",\n            \"email\": \"jonwage@gmail.com\"\n        },\n        {\n            \"name\": \"Johannes Schmitt\",\n            \"email\": \"schmittjoh@gmail.com\"\n        }\n    ],\n    \"homepage\": \"https://www.doctrine-project.org/projects/annotations.html\",\n    \"require\": {\n        \"php\": \"^7.2 || ^8.0\",\n        \"ext-tokenizer\": \"*\",\n        \"doctrine/lexer\": \"^2 || ^3\",\n        \"psr/cache\": \"^1 || ^2 || ^3\"\n    },\n    \"require-dev\": {\n        \"doctrine/coding-standard\": \"^11.1 || ^14\",\n        \"phpstan/phpstan\": \"^1.11 || ^2.1\",\n        \"phpunit/phpunit\": \"^7.5 || ^8.5 || ^9.5\",\n        \"symfony/cache\": \"^5.4 || ^6.4 || ^7.4 || ^8\",\n        \"vimeo/psalm\": \"^4.30 || ^5.14\"\n    },\n    \"suggest\": {\n        \"php\": \"PHP 8.0 or higher comes with attributes, a native replacement for annotations\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Doctrine\\\\Common\\\\Annotations\\\\\": \"lib/Doctrine/Common/Annotations\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Doctrine\\\\Performance\\\\Common\\\\Annotations\\\\\": \"tests/Doctrine/Performance/Common/Annotations\",\n            \"Doctrine\\\\Tests\\\\Common\\\\Annotations\\\\\": \"tests/Doctrine/Tests/Common/Annotations\"\n        },\n        \"files\": [\n            \"tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php\",\n            \"tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php\"\n        ]\n    },\n    \"config\": {\n        \"allow-plugins\": {\n            \"dealerdirect/phpcodesniffer-composer-installer\": true\n        },\n        \"sort-packages\": true\n    }\n}\n"
  },
  {
    "path": "docs/composer.json",
    "content": "{\n    \"require\": {\n        \"doctrine/docs-builder\": \"^1.0\"\n    }\n}\n"
  },
  {
    "path": "docs/en/annotations.rst",
    "content": "Handling Annotations\n====================\n\nThere are several different approaches to handling annotations in PHP.\nDoctrine Annotations maps docblock annotations to PHP classes. Because\nnot all docblock annotations are used for metadata purposes a filter is\napplied to ignore or skip classes that are not Doctrine annotations.\n\nTake a look at the following code snippet:\n\n.. code-block:: php\n\n    namespace MyProject\\Entities;\n\n    use Doctrine\\ORM\\Mapping AS ORM;\n    use Symfony\\Component\\Validator\\Constraints AS Assert;\n\n    /**\n     * @author Benjamin Eberlei\n     * @ORM\\Entity\n     * @MyProject\\Annotations\\Foobarable\n     */\n    class User\n    {\n        /**\n         * @ORM\\Id @ORM\\Column @ORM\\GeneratedValue\n         * @dummy\n         * @var int\n         */\n        private $id;\n\n        /**\n         * @ORM\\Column(type=\"string\")\n         * @Assert\\NotEmpty\n         * @Assert\\Email\n         * @var string\n         */\n        private $email;\n    }\n\nIn this snippet you can see a variety of different docblock annotations:\n\n- Documentation annotations such as ``@var`` and ``@author``. These\n  annotations are ignored and never considered for throwing an\n  exception due to wrongly used annotations.\n- Annotations imported through use statements. The statement ``use\n  Doctrine\\ORM\\Mapping AS ORM`` makes all classes under that namespace\n  available as ``@ORM\\ClassName``. Same goes for the import of\n  ``@Assert``.\n- The ``@dummy`` annotation. It is not a documentation annotation and\n  not ignored. For Doctrine Annotations it is not entirely clear how\n  to handle this annotation. Depending on the configuration an exception\n  (unknown annotation) will be thrown when parsing this annotation.\n- The fully qualified annotation ``@MyProject\\Annotations\\Foobarable``.\n  This is transformed directly into the given class name.\n\nHow are these annotations loaded? From looking at the code you could\nguess that the ORM Mapping, Assert Validation and the fully qualified\nannotation can just be loaded using\nthe defined PHP autoloaders. This is not the case however: For error\nhandling reasons every check for class existence inside the\n``AnnotationReader`` sets the second parameter $autoload\nof ``class_exists($name, $autoload)`` to false. To work flawlessly the\n``AnnotationReader`` requires silent autoloaders which many autoloaders are\nnot. Silent autoloading is NOT part of the `PSR-0 specification\n<https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md>`_\nfor autoloading.\n\nThis is why Doctrine Annotations uses its own autoloading mechanism\nthrough a global registry. If you are wondering about the annotation\nregistry being global, there is no other way to solve the architectural\nproblems of autoloading annotation classes in a straightforward fashion.\nAdditionally if you think about PHP autoloading then you recognize it is\na global as well.\n\nTo anticipate the configuration section, making the above PHP class work\nwith Doctrine Annotations requires this setup:\n\n.. code-block:: php\n\n    use Doctrine\\Common\\Annotations\\AnnotationReader;\n\n    $reader = new AnnotationReader();\n    AnnotationReader::addGlobalIgnoredName('dummy');\n\nWe create the actual ``AnnotationReader`` instance.\nNote that we also add ``dummy`` to the global list of ignored\nannotations for which we do not throw exceptions. Setting this is\nnecessary in our example case, otherwise ``@dummy`` would trigger an\nexception to be thrown during the parsing of the docblock of\n``MyProject\\Entities\\User#id``.\n\nSetup and Configuration\n-----------------------\n\nTo use the annotations library is simple, you just need to create a new\n``AnnotationReader`` instance:\n\n.. code-block:: php\n\n    $reader = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n\nThis creates a simple annotation reader with no caching other than in\nmemory (in php arrays). Since parsing docblocks can be expensive you\nshould cache this process by using a caching reader.\n\nTo cache annotations, you can create a ``Doctrine\\Common\\Annotations\\PsrCachedReader``.\nThis reader decorates the original reader and stores all annotations in a PSR-6\ncache:\n\n.. code-block:: php\n\n    use Doctrine\\Common\\Annotations\\AnnotationReader;\n    use Doctrine\\Common\\Annotations\\PsrCachedReader;\n\n    $cache = ... // instantiate a PSR-6 Cache pool\n\n    $reader = new PsrCachedReader(\n        new AnnotationReader(),\n        $cache,\n        $debug = true\n    );\n\nThe ``debug`` flag is used here as well to invalidate the cache files\nwhen the PHP class with annotations changed and should be used during\ndevelopment.\n\n.. warning ::\n\n    The ``AnnotationReader`` works and caches under the\n    assumption that all annotations of a doc-block are processed at\n    once. That means that annotation classes that do not exist and\n    aren't loaded and cannot be autoloaded (using the\n    AnnotationRegistry) would never be visible and not accessible if a\n    cache is used unless the cache is cleared and the annotations\n    requested again, this time with all annotations defined.\n\nBy default the annotation reader returns a list of annotations with\nnumeric indexes. If you want your annotations to be indexed by their\nclass name you can wrap the reader in an ``IndexedReader``:\n\n.. code-block:: php\n\n    use Doctrine\\Common\\Annotations\\AnnotationReader;\n    use Doctrine\\Common\\Annotations\\IndexedReader;\n\n    $reader = new IndexedReader(new AnnotationReader());\n\n.. warning::\n\n    You should never wrap the indexed reader inside a cached reader,\n    only the other way around. This way you can re-use the cache with\n    indexed or numeric keys, otherwise your code may experience failures\n    due to caching in a numerical or indexed format.\n\nIgnoring missing exceptions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBy default an exception is thrown from the ``AnnotationReader`` if an\nannotation was found that:\n\n- is not part of the list of ignored \"documentation annotations\";\n- was not imported through a use statement;\n- is not a fully qualified class that exists.\n\nYou can disable this behavior for specific names if your docblocks do\nnot follow strict requirements:\n\n.. code-block:: php\n\n    $reader = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n    AnnotationReader::addGlobalIgnoredName('foo');\n\nPHP Imports\n~~~~~~~~~~~\n\nBy default the annotation reader parses the use-statement of a php file\nto gain access to the import rules and register them for the annotation\nprocessing. Only if you are using PHP Imports can you validate the\ncorrect usage of annotations and throw exceptions if you misspelled an\nannotation. This mechanism is enabled by default.\n\nTo ease the upgrade path, we still allow you to disable this mechanism.\nNote however that we will remove this in future versions:\n\n.. code-block:: php\n\n    $reader = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n    $reader->setEnabledPhpImports(false);\n"
  },
  {
    "path": "docs/en/custom.rst",
    "content": "Custom Annotation Classes\n=========================\n\nIf you want to define your own annotations, you just have to group them\nin a namespace.\nAnnotation classes have to contain a class-level docblock with the text\n``@Annotation``:\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /** @Annotation */\n    class Bar\n    {\n        // some code\n    }\n\nInject annotation values\n------------------------\n\nThe annotation parser checks if the annotation constructor has arguments,\nif so then it will pass the value array, otherwise it will try to inject\nvalues into public properties directly:\n\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /**\n     * @Annotation\n     *\n     * Some Annotation using a constructor\n     */\n    class Bar\n    {\n        private $foo;\n\n        public function __construct(array $values)\n        {\n            $this->foo = $values['foo'];\n        }\n    }\n\n    /**\n     * @Annotation\n     *\n     * Some Annotation without a constructor\n     */\n    class Foo\n    {\n        public $bar;\n    }\n\nOptional: Constructors with Named Parameters\n--------------------------------------------\n\nStarting with Annotations v1.11 a new annotation instantiation strategy\nis available that aims at compatibility of Annotation classes with the PHP 8\nattribute feature. You need to declare a constructor with regular parameter\nnames that match the named arguments in the annotation syntax.\n\nTo enable this feature, you can tag your annotation class with\n``@NamedArgumentConstructor`` (available from v1.12) or implement the\n``Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation`` interface\n(available from v1.11 and deprecated as of v1.12).\nWhen using the ``@NamedArgumentConstructor`` tag, the first argument of the\nconstructor is considered as the default one.\n\n\nUsage with the ``@NamedArgumentConstructor`` tag\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /**\n     * @Annotation\n     * @NamedArgumentConstructor\n     */\n    class Bar implements NamedArgumentConstructorAnnotation\n    {\n        private $foo;\n\n        public function __construct(string $foo)\n        {\n            $this->foo = $foo;\n        }\n    }\n\n    /** Usable with @Bar(foo=\"baz\") */\n    /** Usable with @Bar(\"baz\") */\n\nIn combination with PHP 8's constructor property promotion feature\nyou can simplify this to:\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /**\n     * @Annotation\n     * @NamedArgumentConstructor\n     */\n    class Bar implements NamedArgumentConstructorAnnotation\n    {\n        public function __construct(private string $foo) {}\n    }\n\n\nUsage with the\n``Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation``\ninterface (v1.11, deprecated as of v1.12):\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    use Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation;\n\n    /** @Annotation */\n    class Bar implements NamedArgumentConstructorAnnotation\n    {\n        private $foo;\n\n        public function __construct(private string $foo) {}\n    }\n\n    /** Usable with @Bar(foo=\"baz\") */\n\nAnnotation Target\n-----------------\n\n``@Target`` indicates the kinds of class elements to which an annotation\ntype is applicable. Then you could define one or more targets:\n\n-  ``CLASS`` Allowed in class docblocks\n-  ``PROPERTY`` Allowed in property docblocks\n-  ``METHOD`` Allowed in the method docblocks\n-  ``FUNCTION`` Allowed in function docblocks\n-  ``ALL`` Allowed in class, property, method and function docblocks\n-  ``ANNOTATION`` Allowed inside other annotations\n\nIf the annotations is not allowed in the current context, an\n``AnnotationException`` is thrown.\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /**\n     * @Annotation\n     * @Target({\"METHOD\",\"PROPERTY\"})\n     */\n    class Bar\n    {\n        // some code\n    }\n\n    /**\n     * @Annotation\n     * @Target(\"CLASS\")\n     */\n    class Foo\n    {\n        // some code\n    }\n\nAttribute types\n---------------\n\nThe annotation parser checks the given parameters using the phpdoc\nannotation ``@var``, The data type could be validated using the ``@var``\nannotation on the annotation properties or using the ``@Attributes`` and\n``@Attribute`` annotations.\n\nIf the data type does not match you get an ``AnnotationException``\n\n.. code-block:: php\n\n    namespace MyCompany\\Annotations;\n\n    /**\n     * @Annotation\n     * @Target({\"METHOD\",\"PROPERTY\"})\n     */\n    class Bar\n    {\n        /** @var mixed */\n        public $mixed;\n\n        /** @var boolean */\n        public $boolean;\n\n        /** @var bool */\n        public $bool;\n\n        /** @var float */\n        public $float;\n\n        /** @var string */\n        public $string;\n\n        /** @var integer */\n        public $integer;\n\n        /** @var array */\n        public $array;\n\n        /** @var SomeAnnotationClass */\n        public $annotation;\n\n        /** @var array<integer> */\n        public $arrayOfIntegers;\n\n        /** @var array<SomeAnnotationClass> */\n        public $arrayOfAnnotations;\n    }\n\n    /**\n     * @Annotation\n     * @Target({\"METHOD\",\"PROPERTY\"})\n     * @Attributes({\n     *   @Attribute(\"stringProperty\", type = \"string\"),\n     *   @Attribute(\"annotProperty\",  type = \"SomeAnnotationClass\"),\n     * })\n     */\n    class Foo\n    {\n        public function __construct(array $values)\n        {\n            $this->stringProperty = $values['stringProperty'];\n            $this->annotProperty = $values['annotProperty'];\n        }\n\n        // some code\n    }\n\nAnnotation Required\n-------------------\n\n``@Required`` indicates that the field must be specified when the\nannotation is used. If it is not used you get an ``AnnotationException``\nstating that this value can not be null.\n\nDeclaring a required field:\n\n.. code-block:: php\n\n    /**\n     * @Annotation\n     * @Target(\"ALL\")\n     */\n    class Foo\n    {\n        /** @Required */\n        public $requiredField;\n    }\n\nUsage:\n\n.. code-block:: php\n\n    /** @Foo(requiredField=\"value\") */\n    public $direction;                  // Valid\n\n     /** @Foo */\n    public $direction;                  // Required field missing, throws an AnnotationException\n\n\nEnumerated values\n-----------------\n\n- An annotation property marked with ``@Enum`` is a field that accepts a\n  fixed set of scalar values.\n- You should use ``@Enum`` fields any time you need to represent fixed\n  values.\n- The annotation parser checks the given value and throws an\n  ``AnnotationException`` if the value does not match.\n\n\nDeclaring an enumerated property:\n\n.. code-block:: php\n\n    /**\n     * @Annotation\n     * @Target(\"ALL\")\n     */\n    class Direction\n    {\n        /**\n         * @Enum({\"NORTH\", \"SOUTH\", \"EAST\", \"WEST\"})\n         */\n        public $value;\n    }\n\nAnnotation usage:\n\n.. code-block:: php\n\n    /** @Direction(\"NORTH\") */\n    public $direction;                  // Valid value\n\n     /** @Direction(\"NORTHEAST\") */\n    public $direction;                  // Invalid value, throws an AnnotationException\n\n\nConstants\n---------\n\nThe use of constants and class constants is available on the annotations\nparser.\n\nThe following usages are allowed:\n\n.. code-block:: php\n\n    namespace MyCompany\\Entity;\n\n    use MyCompany\\Annotations\\Foo;\n    use MyCompany\\Annotations\\Bar;\n    use MyCompany\\Entity\\SomeClass;\n\n    /**\n     * @Foo(PHP_EOL)\n     * @Bar(Bar::FOO)\n     * @Foo({SomeClass::FOO, SomeClass::BAR})\n     * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE})\n     */\n    class User\n    {\n    }\n\n\nBe careful with constants and the cache !\n\n.. note::\n\n    The cached reader will not re-evaluate each time an annotation is\n    loaded from cache. When a constant is changed the cache must be\n    cleaned.\n\n\nUsage\n-----\n\nUsing the library API is simple. Using the annotations described in the\nprevious section, you can now annotate other classes with your\nannotations:\n\n.. code-block:: php\n\n    namespace MyCompany\\Entity;\n\n    use MyCompany\\Annotations\\Foo;\n    use MyCompany\\Annotations\\Bar;\n\n    /**\n     * @Foo(bar=\"foo\")\n     * @Bar(foo=\"bar\")\n     */\n    class User\n    {\n    }\n\nNow we can write a script to get the annotations above:\n\n.. code-block:: php\n\n    $reflClass = new ReflectionClass('MyCompany\\Entity\\User');\n    $classAnnotations = $reader->getClassAnnotations($reflClass);\n\n    foreach ($classAnnotations AS $annot) {\n        if ($annot instanceof \\MyCompany\\Annotations\\Foo) {\n            echo $annot->bar; // prints \"foo\";\n        } else if ($annot instanceof \\MyCompany\\Annotations\\Bar) {\n            echo $annot->foo; // prints \"bar\";\n        }\n    }\n\nYou have a complete API for retrieving annotation class instances from a\nclass, property or method docblock:\n\n\nReader API\n~~~~~~~~~~\n\nAccess all annotations of a class\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getClassAnnotations(\\ReflectionClass $class);\n\nAccess one annotation of a class\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getClassAnnotation(\\ReflectionClass $class, $annotationName);\n\nAccess all annotations of a method\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getMethodAnnotations(\\ReflectionMethod $method);\n\nAccess one annotation of a method\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getMethodAnnotation(\\ReflectionMethod $method, $annotationName);\n\nAccess all annotations of a property\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getPropertyAnnotations(\\ReflectionProperty $property);\n\nAccess one annotation of a property\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getPropertyAnnotation(\\ReflectionProperty $property, $annotationName);\n\nAccess all annotations of a function\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getFunctionAnnotations(\\ReflectionFunction $property);\n\nAccess one annotation of a function\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: php\n\n    public function getFunctionAnnotation(\\ReflectionFunction $property, $annotationName);\n"
  },
  {
    "path": "docs/en/index.rst",
    "content": "Getting Started\n===============\n\nDeprecation notice\n------------------\n\nPHP 8 introduced `attributes\n<https://www.php.net/manual/en/language.attributes.overview.php>`_,\nwhich are a native replacement for annotations. As such, this library is\nconsidered feature complete, and should receive exclusively bugfixes and\nsecurity fixes.\n\nWe do not recommend using this library in new projects and encourage authors\nof downstream libraries to offer support for attributes as an alternative to\nDoctrine Annotations.\n\nHave a look at `our blog <https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html>`_\nto learn more.\n\nIntroduction\n------------\n\nDoctrine Annotations allows to implement custom annotation\nfunctionality for PHP classes and functions.\n\n.. code-block:: php\n\n    class Foo\n    {\n        /**\n         * @MyAnnotation(myProperty=\"value\")\n         */\n        private $bar;\n    }\n\nAnnotations aren't implemented in PHP itself which is why this component\noffers a way to use the PHP doc-blocks as a place for the well known\nannotation syntax using the ``@`` char.\n\nAnnotations in Doctrine are used for the ORM configuration to build the\nclass mapping, but it can be used in other projects for other purposes\ntoo.\n\nInstallation\n------------\n\nYou can install the Annotation component with composer:\n\n.. code-block::\n\n    $ composer require doctrine/annotations\n\nCreate an annotation class\n--------------------------\n\nAn annotation class is a representation of the later used annotation\nconfiguration in classes. The annotation class of the previous example\nlooks like this:\n\n.. code-block:: php\n\n    /**\n     * @Annotation\n     */\n    final class MyAnnotation\n    {\n        public $myProperty;\n    }\n\nThe annotation class is declared as an annotation by ``@Annotation``.\n\n:doc:`Read more about custom annotations. <custom>`\n\nReading annotations\n-------------------\n\nThe access to the annotations happens by reflection of the class or function\ncontaining them. There are multiple reader-classes implementing the\n``Doctrine\\Common\\Annotations\\Reader`` interface, that can access the\nannotations of a class. A common one is\n``Doctrine\\Common\\Annotations\\AnnotationReader``:\n\n.. code-block:: php\n\n    use Doctrine\\Common\\Annotations\\AnnotationReader;\n\n    $reflectionClass = new ReflectionClass(Foo::class);\n    $property = $reflectionClass->getProperty('bar');\n\n    $reader = new AnnotationReader();\n    $myAnnotation = $reader->getPropertyAnnotation(\n        $property,\n        MyAnnotation::class\n    );\n\n    echo $myAnnotation->myProperty; // result: \"value\"\n\nA reader has multiple methods to access the annotations of a class or\nfunction.\n\n:doc:`Read more about handling annotations. <annotations>`\n\nIDE Support\n^^^^^^^^^^^\n\nSome IDEs already provide support for annotations:\n\n- Eclipse via the `Symfony2 Plugin <https://github.com/pulse00/Symfony-2-Eclipse-Plugin>`_\n- PhpStorm via the `PHP Annotations Plugin <https://plugins.jetbrains.com/plugin/7320-php-annotations>`_ or the `Symfony Plugin <https://plugins.jetbrains.com/plugin/7219-symfony-support>`_\n"
  },
  {
    "path": "docs/en/sidebar.rst",
    "content": ":orphan:\n\n.. toctree::\n    :depth: 3\n\n    index\n    annotations\n    custom\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/Attribute.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\n/**\n * Annotation that can be used to signal to the parser\n * to check the attribute type during the parsing process.\n *\n * @Annotation\n */\nfinal class Attribute\n{\n    /** @var string */\n    public $name;\n\n    /** @var string */\n    public $type;\n\n    /** @var bool */\n    public $required = false;\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/Attributes.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\n/**\n * Annotation that can be used to signal to the parser\n * to check the types of all declared attributes during the parsing process.\n *\n * @Annotation\n */\nfinal class Attributes\n{\n    /** @var array<Attribute> */\n    public $value;\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/Enum.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\nuse InvalidArgumentException;\n\nuse function get_class;\nuse function gettype;\nuse function in_array;\nuse function is_object;\nuse function is_scalar;\nuse function sprintf;\n\n/**\n * Annotation that can be used to signal to the parser\n * to check the available values during the parsing process.\n *\n * @Annotation\n * @Attributes({\n *    @Attribute(\"value\",   required = true,  type = \"array\"),\n *    @Attribute(\"literal\", required = false, type = \"array\")\n * })\n */\nfinal class Enum\n{\n    /** @phpstan-var list<scalar> */\n    public $value;\n\n    /**\n     * Literal target declaration.\n     *\n     * @var mixed[]\n     */\n    public $literal;\n\n    /**\n     * @phpstan-param array{literal?: mixed[], value: list<scalar>} $values\n     *\n     * @throws InvalidArgumentException\n     */\n    public function __construct(array $values)\n    {\n        if (! isset($values['literal'])) {\n            $values['literal'] = [];\n        }\n\n        foreach ($values['value'] as $var) {\n            if (! is_scalar($var)) {\n                throw new InvalidArgumentException(sprintf(\n                    '@Enum supports only scalar values \"%s\" given.',\n                    is_object($var) ? get_class($var) : gettype($var)\n                ));\n            }\n        }\n\n        foreach ($values['literal'] as $key => $var) {\n            if (! in_array($key, $values['value'])) {\n                throw new InvalidArgumentException(sprintf(\n                    'Undefined enumerator value \"%s\" for literal \"%s\".',\n                    $key,\n                    $var\n                ));\n            }\n        }\n\n        $this->value   = $values['value'];\n        $this->literal = $values['literal'];\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\nuse RuntimeException;\n\nuse function is_array;\nuse function is_string;\nuse function json_encode;\nuse function sprintf;\n\n/**\n * Annotation that can be used to signal to the parser to ignore specific\n * annotations during the parsing process.\n *\n * @Annotation\n */\nfinal class IgnoreAnnotation\n{\n    /** @phpstan-var list<string> */\n    public $names;\n\n    /**\n     * @phpstan-param array{value: string|list<string>} $values\n     *\n     * @throws RuntimeException\n     */\n    public function __construct(array $values)\n    {\n        if (is_string($values['value'])) {\n            $values['value'] = [$values['value']];\n        }\n\n        if (! is_array($values['value'])) {\n            throw new RuntimeException(sprintf(\n                '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.',\n                json_encode($values['value'])\n            ));\n        }\n\n        $this->names = $values['value'];\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\n/**\n * Annotation that indicates that the annotated class should be constructed with a named argument call.\n *\n * @Annotation\n * @Target(\"CLASS\")\n */\nfinal class NamedArgumentConstructor\n{\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/Required.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\n/**\n * Annotation that can be used to signal to the parser\n * to check if that attribute is required during the parsing process.\n *\n * @Annotation\n */\nfinal class Required\n{\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation/Target.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations\\Annotation;\n\nuse InvalidArgumentException;\n\nuse function array_keys;\nuse function get_class;\nuse function gettype;\nuse function implode;\nuse function is_array;\nuse function is_object;\nuse function is_string;\nuse function sprintf;\n\n/**\n * Annotation that can be used to signal to the parser\n * to check the annotation target during the parsing process.\n *\n * @Annotation\n */\nfinal class Target\n{\n    public const TARGET_CLASS      = 1;\n    public const TARGET_METHOD     = 2;\n    public const TARGET_PROPERTY   = 4;\n    public const TARGET_ANNOTATION = 8;\n    public const TARGET_FUNCTION   = 16;\n    public const TARGET_ALL        = 31;\n\n    /** @var array<string, int> */\n    private static $map = [\n        'ALL'        => self::TARGET_ALL,\n        'CLASS'      => self::TARGET_CLASS,\n        'METHOD'     => self::TARGET_METHOD,\n        'PROPERTY'   => self::TARGET_PROPERTY,\n        'FUNCTION'   => self::TARGET_FUNCTION,\n        'ANNOTATION' => self::TARGET_ANNOTATION,\n    ];\n\n    /** @phpstan-var list<string> */\n    public $value;\n\n    /**\n     * Targets as bitmask.\n     *\n     * @var int\n     */\n    public $targets;\n\n    /**\n     * Literal target declaration.\n     *\n     * @var string\n     */\n    public $literal;\n\n    /**\n     * @phpstan-param array{value?: string|list<string>} $values\n     *\n     * @throws InvalidArgumentException\n     */\n    public function __construct(array $values)\n    {\n        if (! isset($values['value'])) {\n            $values['value'] = null;\n        }\n\n        if (is_string($values['value'])) {\n            $values['value'] = [$values['value']];\n        }\n\n        if (! is_array($values['value'])) {\n            throw new InvalidArgumentException(\n                sprintf(\n                    '@Target expects either a string value, or an array of strings, \"%s\" given.',\n                    is_object($values['value']) ? get_class($values['value']) : gettype($values['value'])\n                )\n            );\n        }\n\n        $bitmask = 0;\n        foreach ($values['value'] as $literal) {\n            if (! isset(self::$map[$literal])) {\n                throw new InvalidArgumentException(\n                    sprintf(\n                        'Invalid Target \"%s\". Available targets: [%s]',\n                        $literal,\n                        implode(', ', array_keys(self::$map))\n                    )\n                );\n            }\n\n            $bitmask |= self::$map[$literal];\n        }\n\n        $this->targets = $bitmask;\n        $this->value   = $values['value'];\n        $this->literal = implode(', ', $this->value);\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Annotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse BadMethodCallException;\n\nuse function sprintf;\n\n/**\n * Annotations class.\n */\nclass Annotation\n{\n    /**\n     * Value property. Common among all derived classes.\n     *\n     * @var mixed\n     */\n    public $value;\n\n    /** @param array<string, mixed> $data Key-value for properties to be defined in this class. */\n    final public function __construct(array $data)\n    {\n        foreach ($data as $key => $value) {\n            $this->$key = $value;\n        }\n    }\n\n    /**\n     * Error handler for unknown property accessor in Annotation class.\n     *\n     * @throws BadMethodCallException\n     */\n    public function __get(string $name)\n    {\n        throw new BadMethodCallException(\n            sprintf(\"Unknown property '%s' on annotation '%s'.\", $name, static::class)\n        );\n    }\n\n    /**\n     * Error handler for unknown property mutator in Annotation class.\n     *\n     * @param mixed $value Property value.\n     *\n     * @throws BadMethodCallException\n     */\n    public function __set(string $name, $value)\n    {\n        throw new BadMethodCallException(\n            sprintf(\"Unknown property '%s' on annotation '%s'.\", $name, static::class)\n        );\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/AnnotationException.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse Exception;\nuse Throwable;\n\nuse function get_class;\nuse function gettype;\nuse function implode;\nuse function is_object;\nuse function sprintf;\n\n/**\n * Description of AnnotationException\n */\nclass AnnotationException extends Exception\n{\n    /**\n     * Creates a new AnnotationException describing a Syntax error.\n     *\n     * @return AnnotationException\n     */\n    public static function syntaxError(string $message)\n    {\n        return new self('[Syntax Error] ' . $message);\n    }\n\n    /**\n     * Creates a new AnnotationException describing a Semantical error.\n     *\n     * @return AnnotationException\n     */\n    public static function semanticalError(string $message)\n    {\n        return new self('[Semantical Error] ' . $message);\n    }\n\n    /**\n     * Creates a new AnnotationException describing an error which occurred during\n     * the creation of the annotation.\n     *\n     * @return AnnotationException\n     */\n    public static function creationError(string $message, ?Throwable $previous = null)\n    {\n        return new self('[Creation Error] ' . $message, 0, $previous);\n    }\n\n    /**\n     * Creates a new AnnotationException describing a type error.\n     *\n     * @return AnnotationException\n     */\n    public static function typeError(string $message)\n    {\n        return new self('[Type Error] ' . $message);\n    }\n\n    /**\n     * Creates a new AnnotationException describing a constant semantical error.\n     *\n     * @return AnnotationException\n     */\n    public static function semanticalErrorConstants(string $identifier, ?string $context = null)\n    {\n        return self::semanticalError(sprintf(\n            \"Couldn't find constant %s%s.\",\n            $identifier,\n            $context ? ', ' . $context : ''\n        ));\n    }\n\n    /**\n     * Creates a new AnnotationException describing an type error of an attribute.\n     *\n     * @param mixed $actual\n     *\n     * @return AnnotationException\n     */\n    public static function attributeTypeError(\n        string $attributeName,\n        string $annotationName,\n        string $context,\n        string $expected,\n        $actual\n    ) {\n        return self::typeError(sprintf(\n            'Attribute \"%s\" of @%s declared on %s expects %s, but got %s.',\n            $attributeName,\n            $annotationName,\n            $context,\n            $expected,\n            is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual)\n        ));\n    }\n\n    /**\n     * Creates a new AnnotationException describing an required error of an attribute.\n     *\n     * @return AnnotationException\n     */\n    public static function requiredError(\n        string $attributeName,\n        string $annotationName,\n        string $context,\n        string $expected\n    ) {\n        return self::typeError(sprintf(\n            'Attribute \"%s\" of @%s declared on %s expects %s. This value should not be null.',\n            $attributeName,\n            $annotationName,\n            $context,\n            $expected\n        ));\n    }\n\n    /**\n     * Creates a new AnnotationException describing a invalid enummerator.\n     *\n     * @param mixed $given\n     * @phpstan-param list<string> $available\n     *\n     * @return AnnotationException\n     */\n    public static function enumeratorError(\n        string $attributeName,\n        string $annotationName,\n        string $context,\n        array $available,\n        $given\n    ) {\n        return new self(sprintf(\n            '[Enum Error] Attribute \"%s\" of @%s declared on %s accepts only [%s], but got %s.',\n            $attributeName,\n            $annotationName,\n            $context,\n            implode(', ', $available),\n            is_object($given) ? get_class($given) : $given\n        ));\n    }\n\n    /** @return AnnotationException */\n    public static function optimizerPlusSaveComments()\n    {\n        return new self(\n            'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.'\n        );\n    }\n\n    /** @return AnnotationException */\n    public static function optimizerPlusLoadComments()\n    {\n        return new self(\n            'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.'\n        );\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/AnnotationReader.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation;\nuse Doctrine\\Common\\Annotations\\Annotation\\Target;\nuse ReflectionClass;\nuse ReflectionFunction;\nuse ReflectionMethod;\nuse ReflectionProperty;\n\nuse function array_merge;\nuse function class_exists;\nuse function extension_loaded;\nuse function filter_var;\nuse function ini_get;\n\nuse const FILTER_VALIDATE_BOOLEAN;\n\n/**\n * A reader for docblock annotations.\n */\nclass AnnotationReader implements Reader\n{\n    /**\n     * Global map for imports.\n     *\n     * @var array<string, class-string>\n     */\n    private static $globalImports = [\n        'ignoreannotation' => Annotation\\IgnoreAnnotation::class,\n    ];\n\n    /**\n     * A list with annotations that are not causing exceptions when not resolved to an annotation class.\n     *\n     * The names are case sensitive.\n     *\n     * @var array<string, true>\n     */\n    private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST;\n\n    /**\n     * A list with annotations that are not causing exceptions when not resolved to an annotation class.\n     *\n     * The names are case sensitive.\n     *\n     * @var array<string, true>\n     */\n    private static $globalIgnoredNamespaces = [];\n\n    /**\n     * Add a new annotation to the globally ignored annotation names with regard to exception handling.\n     */\n    public static function addGlobalIgnoredName(string $name)\n    {\n        self::$globalIgnoredNames[$name] = true;\n    }\n\n    /**\n     * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling.\n     */\n    public static function addGlobalIgnoredNamespace(string $namespace)\n    {\n        self::$globalIgnoredNamespaces[$namespace] = true;\n    }\n\n    /**\n     * Annotations parser.\n     *\n     * @var DocParser\n     */\n    private $parser;\n\n    /**\n     * Annotations parser used to collect parsing metadata.\n     *\n     * @var DocParser\n     */\n    private $preParser;\n\n    /**\n     * PHP parser used to collect imports.\n     *\n     * @var PhpParser\n     */\n    private $phpParser;\n\n    /**\n     * In-memory cache mechanism to store imported annotations per class.\n     *\n     * @psalm-var array<'class'|'function', array<string, array<string, class-string>>>\n     */\n    private $imports = [];\n\n    /**\n     * In-memory cache mechanism to store ignored annotations per class.\n     *\n     * @psalm-var array<'class'|'function', array<string, array<string, true>>>\n     */\n    private $ignoredAnnotationNames = [];\n\n    /**\n     * Initializes a new AnnotationReader.\n     *\n     * @throws AnnotationException\n     */\n    public function __construct(?DocParser $parser = null)\n    {\n        if (\n            extension_loaded('Zend Optimizer+') &&\n            (filter_var(ini_get('zend_optimizerplus.save_comments'), FILTER_VALIDATE_BOOLEAN)  === false ||\n            filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false)\n        ) {\n            throw AnnotationException::optimizerPlusSaveComments();\n        }\n\n        if (\n            extension_loaded('Zend OPcache') &&\n            filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false\n        ) {\n            throw AnnotationException::optimizerPlusSaveComments();\n        }\n\n        // Make sure that the IgnoreAnnotation annotation is loaded\n        class_exists(IgnoreAnnotation::class);\n\n        $this->parser = $parser ?: new DocParser();\n\n        $this->preParser = new DocParser();\n\n        $this->preParser->setImports(self::$globalImports);\n        $this->preParser->setIgnoreNotImportedAnnotations(true);\n        $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames);\n\n        $this->phpParser = new PhpParser();\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotations(ReflectionClass $class)\n    {\n        $this->parser->setTarget(Target::TARGET_CLASS);\n        $this->parser->setImports($this->getImports($class));\n        $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));\n        $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);\n\n        return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotation(ReflectionClass $class, $annotationName)\n    {\n        $annotations = $this->getClassAnnotations($class);\n\n        foreach ($annotations as $annotation) {\n            if ($annotation instanceof $annotationName) {\n                return $annotation;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotations(ReflectionProperty $property)\n    {\n        $class   = $property->getDeclaringClass();\n        $context = 'property ' . $class->getName() . '::$' . $property->getName();\n\n        $this->parser->setTarget(Target::TARGET_PROPERTY);\n        $this->parser->setImports($this->getPropertyImports($property));\n        $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));\n        $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);\n\n        return $this->parser->parse($property->getDocComment(), $context);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)\n    {\n        $annotations = $this->getPropertyAnnotations($property);\n\n        foreach ($annotations as $annotation) {\n            if ($annotation instanceof $annotationName) {\n                return $annotation;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotations(ReflectionMethod $method)\n    {\n        $class   = $method->getDeclaringClass();\n        $context = 'method ' . $class->getName() . '::' . $method->getName() . '()';\n\n        $this->parser->setTarget(Target::TARGET_METHOD);\n        $this->parser->setImports($this->getMethodImports($method));\n        $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));\n        $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);\n\n        return $this->parser->parse($method->getDocComment(), $context);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotation(ReflectionMethod $method, $annotationName)\n    {\n        $annotations = $this->getMethodAnnotations($method);\n\n        foreach ($annotations as $annotation) {\n            if ($annotation instanceof $annotationName) {\n                return $annotation;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Gets the annotations applied to a function.\n     *\n     * @phpstan-return list<object> An array of Annotations.\n     */\n    public function getFunctionAnnotations(ReflectionFunction $function): array\n    {\n        $context = 'function ' . $function->getName();\n\n        $this->parser->setTarget(Target::TARGET_FUNCTION);\n        $this->parser->setImports($this->getImports($function));\n        $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function));\n        $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);\n\n        return $this->parser->parse($function->getDocComment(), $context);\n    }\n\n    /**\n     * Gets a function annotation.\n     *\n     * @return object|null The Annotation or NULL, if the requested annotation does not exist.\n     */\n    public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName)\n    {\n        $annotations = $this->getFunctionAnnotations($function);\n\n        foreach ($annotations as $annotation) {\n            if ($annotation instanceof $annotationName) {\n                return $annotation;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Returns the ignored annotations for the given class or function.\n     *\n     * @param ReflectionClass|ReflectionFunction $reflection\n     *\n     * @return array<string, true>\n     */\n    private function getIgnoredAnnotationNames($reflection): array\n    {\n        $type = $reflection instanceof ReflectionClass ? 'class' : 'function';\n        $name = $reflection->getName();\n\n        if (isset($this->ignoredAnnotationNames[$type][$name])) {\n            return $this->ignoredAnnotationNames[$type][$name];\n        }\n\n        $this->collectParsingMetadata($reflection);\n\n        return $this->ignoredAnnotationNames[$type][$name];\n    }\n\n    /**\n     * Retrieves imports for a class or a function.\n     *\n     * @param ReflectionClass|ReflectionFunction $reflection\n     *\n     * @return array<string, class-string>\n     */\n    private function getImports($reflection): array\n    {\n        $type = $reflection instanceof ReflectionClass ? 'class' : 'function';\n        $name = $reflection->getName();\n\n        if (isset($this->imports[$type][$name])) {\n            return $this->imports[$type][$name];\n        }\n\n        $this->collectParsingMetadata($reflection);\n\n        return $this->imports[$type][$name];\n    }\n\n    /**\n     * Retrieves imports for methods.\n     *\n     * @return array<string, class-string>\n     */\n    private function getMethodImports(ReflectionMethod $method)\n    {\n        $class        = $method->getDeclaringClass();\n        $classImports = $this->getImports($class);\n\n        $traitImports = [];\n\n        foreach ($class->getTraits() as $trait) {\n            if (\n                ! $trait->hasMethod($method->getName())\n                || $trait->getFileName() !== $method->getFileName()\n            ) {\n                continue;\n            }\n\n            $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait));\n        }\n\n        return array_merge($classImports, $traitImports);\n    }\n\n    /**\n     * Retrieves imports for properties.\n     *\n     * @return array<string, class-string>\n     */\n    private function getPropertyImports(ReflectionProperty $property)\n    {\n        $class        = $property->getDeclaringClass();\n        $classImports = $this->getImports($class);\n\n        $traitImports = [];\n\n        foreach ($class->getTraits() as $trait) {\n            if (! $trait->hasProperty($property->getName())) {\n                continue;\n            }\n\n            $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait));\n        }\n\n        return array_merge($classImports, $traitImports);\n    }\n\n    /**\n     * Collects parsing metadata for a given class or function.\n     *\n     * @param ReflectionClass|ReflectionFunction $reflection\n     */\n    private function collectParsingMetadata($reflection): void\n    {\n        $type = $reflection instanceof ReflectionClass ? 'class' : 'function';\n        $name = $reflection->getName();\n\n        $ignoredAnnotationNames = self::$globalIgnoredNames;\n        $annotations            = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name);\n\n        foreach ($annotations as $annotation) {\n            if (! ($annotation instanceof IgnoreAnnotation)) {\n                continue;\n            }\n\n            foreach ($annotation->names as $annot) {\n                $ignoredAnnotationNames[$annot] = true;\n            }\n        }\n\n        $this->imports[$type][$name] = array_merge(\n            self::$globalImports,\n            $this->phpParser->parseUseStatements($reflection),\n            [\n                '__NAMESPACE__' => $reflection->getNamespaceName(),\n                'self' => $name,\n            ]\n        );\n\n        $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames;\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/AnnotationRegistry.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse function array_key_exists;\nuse function class_exists;\n\nfinal class AnnotationRegistry\n{\n    /**\n     * An array of classes which cannot be found\n     *\n     * @var null[] indexed by class name\n     */\n    private static $failedToAutoload = [];\n\n    public static function reset(): void\n    {\n        self::$failedToAutoload = [];\n    }\n\n    /**\n     * Autoloads an annotation class silently.\n     */\n    public static function loadAnnotationClass(string $class): bool\n    {\n        if (class_exists($class, false)) {\n            return true;\n        }\n\n        if (array_key_exists($class, self::$failedToAutoload)) {\n            return false;\n        }\n\n        if (class_exists($class)) {\n            return true;\n        }\n\n        self::$failedToAutoload[$class] = null;\n\n        return false;\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/DocLexer.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse Doctrine\\Common\\Lexer\\AbstractLexer;\n\nuse function ctype_alpha;\nuse function is_numeric;\nuse function str_replace;\nuse function stripos;\nuse function strlen;\nuse function strpos;\nuse function strtolower;\nuse function substr;\n\n/**\n * Simple lexer for docblock annotations.\n *\n * @template-extends AbstractLexer<DocLexer::T_*, string>\n */\nfinal class DocLexer extends AbstractLexer\n{\n    public const T_NONE    = 1;\n    public const T_INTEGER = 2;\n    public const T_STRING  = 3;\n    public const T_FLOAT   = 4;\n\n    // All tokens that are also identifiers should be >= 100\n    public const T_IDENTIFIER          = 100;\n    public const T_AT                  = 101;\n    public const T_CLOSE_CURLY_BRACES  = 102;\n    public const T_CLOSE_PARENTHESIS   = 103;\n    public const T_COMMA               = 104;\n    public const T_EQUALS              = 105;\n    public const T_FALSE               = 106;\n    public const T_NAMESPACE_SEPARATOR = 107;\n    public const T_OPEN_CURLY_BRACES   = 108;\n    public const T_OPEN_PARENTHESIS    = 109;\n    public const T_TRUE                = 110;\n    public const T_NULL                = 111;\n    public const T_COLON               = 112;\n    public const T_MINUS               = 113;\n\n    /** @var array<string, self::T*> */\n    protected $noCase = [\n        '@'  => self::T_AT,\n        ','  => self::T_COMMA,\n        '('  => self::T_OPEN_PARENTHESIS,\n        ')'  => self::T_CLOSE_PARENTHESIS,\n        '{'  => self::T_OPEN_CURLY_BRACES,\n        '}'  => self::T_CLOSE_CURLY_BRACES,\n        '='  => self::T_EQUALS,\n        ':'  => self::T_COLON,\n        '-'  => self::T_MINUS,\n        '\\\\' => self::T_NAMESPACE_SEPARATOR,\n    ];\n\n    /** @var array<string, self::T*> */\n    protected $withCase = [\n        'true'  => self::T_TRUE,\n        'false' => self::T_FALSE,\n        'null'  => self::T_NULL,\n    ];\n\n    /**\n     * Whether the next token starts immediately, or if there were\n     * non-captured symbols before that\n     */\n    public function nextTokenIsAdjacent(): bool\n    {\n        return $this->token === null\n            || ($this->lookahead !== null\n                && ($this->lookahead->position - $this->token->position) === strlen($this->token->value));\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    protected function getCatchablePatterns()\n    {\n        return [\n            '[a-z_\\\\\\][a-z0-9_\\:\\\\\\]*[a-z_][a-z0-9_]*',\n            '(?:[+-]?[0-9]+(?:[\\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?',\n            '\"(?:\"\"|[^\"])*+\"',\n        ];\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    protected function getNonCatchablePatterns()\n    {\n        return ['\\s+', '\\*+', '(.)'];\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    protected function getType(&$value)\n    {\n        $type = self::T_NONE;\n\n        if ($value[0] === '\"') {\n            $value = str_replace('\"\"', '\"', substr($value, 1, strlen($value) - 2));\n\n            return self::T_STRING;\n        }\n\n        if (isset($this->noCase[$value])) {\n            return $this->noCase[$value];\n        }\n\n        if ($value[0] === '_' || $value[0] === '\\\\' || ctype_alpha($value[0])) {\n            return self::T_IDENTIFIER;\n        }\n\n        $lowerValue = strtolower($value);\n\n        if (isset($this->withCase[$lowerValue])) {\n            return $this->withCase[$lowerValue];\n        }\n\n        // Checking numeric value\n        if (is_numeric($value)) {\n            return strpos($value, '.') !== false || stripos($value, 'e') !== false\n                ? self::T_FLOAT : self::T_INTEGER;\n        }\n\n        return $type;\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/DocParser.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\Annotation\\Attribute;\nuse Doctrine\\Common\\Annotations\\Annotation\\Attributes;\nuse Doctrine\\Common\\Annotations\\Annotation\\Enum;\nuse Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor;\nuse Doctrine\\Common\\Annotations\\Annotation\\Target;\nuse ReflectionClass;\nuse ReflectionException;\nuse ReflectionProperty;\nuse RuntimeException;\nuse stdClass;\nuse Throwable;\n\nuse function array_keys;\nuse function array_map;\nuse function array_pop;\nuse function array_values;\nuse function class_exists;\nuse function constant;\nuse function count;\nuse function defined;\nuse function explode;\nuse function gettype;\nuse function implode;\nuse function in_array;\nuse function interface_exists;\nuse function is_array;\nuse function is_object;\nuse function json_encode;\nuse function ltrim;\nuse function preg_match;\nuse function reset;\nuse function rtrim;\nuse function sprintf;\nuse function stripos;\nuse function strlen;\nuse function strpos;\nuse function strrpos;\nuse function strtolower;\nuse function substr;\nuse function trim;\n\nuse const PHP_VERSION_ID;\n\n/**\n * A parser for docblock annotations.\n *\n * It is strongly discouraged to change the default annotation parsing process.\n *\n * @psalm-type Arguments = array{positional_arguments?: array<int, mixed>, named_arguments?: array<string, mixed>}\n */\nfinal class DocParser\n{\n    /**\n     * An array of all valid tokens for a class name.\n     *\n     * @phpstan-var list<int>\n     */\n    private static $classIdentifiers = [\n        DocLexer::T_IDENTIFIER,\n        DocLexer::T_TRUE,\n        DocLexer::T_FALSE,\n        DocLexer::T_NULL,\n    ];\n\n    /**\n     * The lexer.\n     *\n     * @var DocLexer\n     */\n    private $lexer;\n\n    /**\n     * Current target context.\n     *\n     * @var int\n     */\n    private $target;\n\n    /**\n     * Doc parser used to collect annotation target.\n     *\n     * @var DocParser\n     */\n    private static $metadataParser;\n\n    /**\n     * Flag to control if the current annotation is nested or not.\n     *\n     * @var bool\n     */\n    private $isNestedAnnotation = false;\n\n    /**\n     * Hashmap containing all use-statements that are to be used when parsing\n     * the given doc block.\n     *\n     * @var array<string, class-string>\n     */\n    private $imports = [];\n\n    /**\n     * This hashmap is used internally to cache results of class_exists()\n     * look-ups.\n     *\n     * @var array<class-string, bool>\n     */\n    private $classExists = [];\n\n    /**\n     * Whether annotations that have not been imported should be ignored.\n     *\n     * @var bool\n     */\n    private $ignoreNotImportedAnnotations = false;\n\n    /**\n     * An array of default namespaces if operating in simple mode.\n     *\n     * @var string[]\n     */\n    private $namespaces = [];\n\n    /**\n     * A list with annotations that are not causing exceptions when not resolved to an annotation class.\n     *\n     * The names must be the raw names as used in the class, not the fully qualified\n     *\n     * @var bool[] indexed by annotation name\n     */\n    private $ignoredAnnotationNames = [];\n\n    /**\n     * A list with annotations in namespaced format\n     * that are not causing exceptions when not resolved to an annotation class.\n     *\n     * @var bool[] indexed by namespace name\n     */\n    private $ignoredAnnotationNamespaces = [];\n\n    /** @var string */\n    private $context = '';\n\n    /**\n     * Hash-map for caching annotation metadata.\n     *\n     * @var array<class-string, mixed[]>\n     */\n    private static $annotationMetadata = [\n        Annotation\\Target::class => [\n            'is_annotation'                  => true,\n            'has_constructor'                => true,\n            'has_named_argument_constructor' => false,\n            'properties'                     => [],\n            'targets_literal'                => 'ANNOTATION_CLASS',\n            'targets'                        => Target::TARGET_CLASS,\n            'default_property'               => 'value',\n            'attribute_types'                => [\n                'value'  => [\n                    'required'   => false,\n                    'type'       => 'array',\n                    'array_type' => 'string',\n                    'value'      => 'array<string>',\n                ],\n            ],\n        ],\n        Annotation\\Attribute::class => [\n            'is_annotation'                  => true,\n            'has_constructor'                => false,\n            'has_named_argument_constructor' => false,\n            'targets_literal'                => 'ANNOTATION_ANNOTATION',\n            'targets'                        => Target::TARGET_ANNOTATION,\n            'default_property'               => 'name',\n            'properties'                     => [\n                'name'      => 'name',\n                'type'      => 'type',\n                'required'  => 'required',\n            ],\n            'attribute_types'                => [\n                'value'  => [\n                    'required'  => true,\n                    'type'      => 'string',\n                    'value'     => 'string',\n                ],\n                'type'  => [\n                    'required'  => true,\n                    'type'      => 'string',\n                    'value'     => 'string',\n                ],\n                'required'  => [\n                    'required'  => false,\n                    'type'      => 'boolean',\n                    'value'     => 'boolean',\n                ],\n            ],\n        ],\n        Annotation\\Attributes::class => [\n            'is_annotation'                  => true,\n            'has_constructor'                => false,\n            'has_named_argument_constructor' => false,\n            'targets_literal'                => 'ANNOTATION_CLASS',\n            'targets'                        => Target::TARGET_CLASS,\n            'default_property'               => 'value',\n            'properties'                     => ['value' => 'value'],\n            'attribute_types'                => [\n                'value' => [\n                    'type'      => 'array',\n                    'required'  => true,\n                    'array_type' => Annotation\\Attribute::class,\n                    'value'     => 'array<' . Annotation\\Attribute::class . '>',\n                ],\n            ],\n        ],\n        Annotation\\Enum::class => [\n            'is_annotation'                  => true,\n            'has_constructor'                => true,\n            'has_named_argument_constructor' => false,\n            'targets_literal'                => 'ANNOTATION_PROPERTY',\n            'targets'                        => Target::TARGET_PROPERTY,\n            'default_property'               => 'value',\n            'properties'                     => ['value' => 'value'],\n            'attribute_types'                => [\n                'value' => [\n                    'type'      => 'array',\n                    'required'  => true,\n                ],\n                'literal' => [\n                    'type'      => 'array',\n                    'required'  => false,\n                ],\n            ],\n        ],\n        Annotation\\NamedArgumentConstructor::class => [\n            'is_annotation'                  => true,\n            'has_constructor'                => false,\n            'has_named_argument_constructor' => false,\n            'targets_literal'                => 'ANNOTATION_CLASS',\n            'targets'                        => Target::TARGET_CLASS,\n            'default_property'               => null,\n            'properties'                     => [],\n            'attribute_types'                => [],\n        ],\n    ];\n\n    /**\n     * Hash-map for handle types declaration.\n     *\n     * @var array<string, string>\n     */\n    private static $typeMap = [\n        'float'     => 'double',\n        'bool'      => 'boolean',\n        // allow uppercase Boolean in honor of George Boole\n        'Boolean'   => 'boolean',\n        'int'       => 'integer',\n    ];\n\n    /**\n     * Constructs a new DocParser.\n     */\n    public function __construct()\n    {\n        $this->lexer = new DocLexer();\n    }\n\n    /**\n     * Sets the annotation names that are ignored during the parsing process.\n     *\n     * The names are supposed to be the raw names as used in the class, not the\n     * fully qualified class names.\n     *\n     * @param bool[] $names indexed by annotation name\n     *\n     * @return void\n     */\n    public function setIgnoredAnnotationNames(array $names)\n    {\n        $this->ignoredAnnotationNames = $names;\n    }\n\n    /**\n     * Sets the annotation namespaces that are ignored during the parsing process.\n     *\n     * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name\n     *\n     * @return void\n     */\n    public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces)\n    {\n        $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces;\n    }\n\n    /**\n     * Sets ignore on not-imported annotations.\n     *\n     * @return void\n     */\n    public function setIgnoreNotImportedAnnotations(bool $bool)\n    {\n        $this->ignoreNotImportedAnnotations = $bool;\n    }\n\n    /**\n     * Sets the default namespaces.\n     *\n     * @return void\n     *\n     * @throws RuntimeException\n     */\n    public function addNamespace(string $namespace)\n    {\n        if ($this->imports) {\n            throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.');\n        }\n\n        $this->namespaces[] = $namespace;\n    }\n\n    /**\n     * Sets the imports.\n     *\n     * @param array<string, class-string> $imports\n     *\n     * @return void\n     *\n     * @throws RuntimeException\n     */\n    public function setImports(array $imports)\n    {\n        if ($this->namespaces) {\n            throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.');\n        }\n\n        $this->imports = $imports;\n    }\n\n    /**\n     * Sets current target context as bitmask.\n     *\n     * @return void\n     */\n    public function setTarget(int $target)\n    {\n        $this->target = $target;\n    }\n\n    /**\n     * Parses the given docblock string for annotations.\n     *\n     * @phpstan-return list<object> Array of annotations. If no annotations are found, an empty array is returned.\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    public function parse(string $input, string $context = '')\n    {\n        $pos = $this->findInitialTokenPosition($input);\n        if ($pos === null) {\n            return [];\n        }\n\n        $this->context = $context;\n\n        $this->lexer->setInput(trim(substr($input, $pos), '* /'));\n        $this->lexer->moveNext();\n\n        return $this->Annotations();\n    }\n\n    /**\n     * Finds the first valid annotation\n     */\n    private function findInitialTokenPosition(string $input): ?int\n    {\n        $pos = 0;\n\n        // search for first valid annotation\n        while (($pos = strpos($input, '@', $pos)) !== false) {\n            $preceding = substr($input, $pos - 1, 1);\n\n            // if the @ is preceded by a space, a tab or * it is valid\n            if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === \"\\t\") {\n                return $pos;\n            }\n\n            $pos++;\n        }\n\n        return null;\n    }\n\n    /**\n     * Attempts to match the given token with the current lookahead token.\n     * If they match, updates the lookahead token; otherwise raises a syntax error.\n     *\n     * @param int $token Type of token.\n     *\n     * @return bool True if tokens match; false otherwise.\n     *\n     * @throws AnnotationException\n     */\n    private function match(int $token): bool\n    {\n        if (! $this->lexer->isNextToken($token)) {\n            throw $this->syntaxError($this->lexer->getLiteral($token));\n        }\n\n        return $this->lexer->moveNext();\n    }\n\n    /**\n     * Attempts to match the current lookahead token with any of the given tokens.\n     *\n     * If any of them matches, this method updates the lookahead token; otherwise\n     * a syntax error is raised.\n     *\n     * @phpstan-param list<mixed[]> $tokens\n     *\n     * @throws AnnotationException\n     */\n    private function matchAny(array $tokens): bool\n    {\n        if (! $this->lexer->isNextTokenAny($tokens)) {\n            throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens)));\n        }\n\n        return $this->lexer->moveNext();\n    }\n\n    /**\n     * Generates a new syntax error.\n     *\n     * @param string       $expected Expected string.\n     * @param mixed[]|null $token    Optional token.\n     */\n    private function syntaxError(string $expected, ?array $token = null): AnnotationException\n    {\n        if ($token === null) {\n            $token = $this->lexer->lookahead;\n        }\n\n        $message  = sprintf('Expected %s, got ', $expected);\n        $message .= $this->lexer->lookahead === null\n            ? 'end of string'\n            : sprintf(\"'%s' at position %s\", $token->value, $token->position);\n\n        if (strlen($this->context)) {\n            $message .= ' in ' . $this->context;\n        }\n\n        $message .= '.';\n\n        return AnnotationException::syntaxError($message);\n    }\n\n    /**\n     * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism\n     * but uses the {@link AnnotationRegistry} to load classes.\n     *\n     * @param class-string $fqcn\n     */\n    private function classExists(string $fqcn): bool\n    {\n        if (isset($this->classExists[$fqcn])) {\n            return $this->classExists[$fqcn];\n        }\n\n        // first check if the class already exists, maybe loaded through another AnnotationReader\n        if (class_exists($fqcn, false)) {\n            return $this->classExists[$fqcn] = true;\n        }\n\n        // final check, does this class exist?\n        return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn);\n    }\n\n    /**\n     * Collects parsing metadata for a given annotation class\n     *\n     * @param class-string $name The annotation name\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function collectAnnotationMetadata(string $name): void\n    {\n        if (self::$metadataParser === null) {\n            self::$metadataParser = new self();\n\n            self::$metadataParser->setIgnoreNotImportedAnnotations(true);\n            self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames);\n            self::$metadataParser->setImports([\n                'enum'                     => Enum::class,\n                'target'                   => Target::class,\n                'attribute'                => Attribute::class,\n                'attributes'               => Attributes::class,\n                'namedargumentconstructor' => NamedArgumentConstructor::class,\n            ]);\n\n            // Make sure that annotations from metadata are loaded\n            class_exists(Enum::class);\n            class_exists(Target::class);\n            class_exists(Attribute::class);\n            class_exists(Attributes::class);\n            class_exists(NamedArgumentConstructor::class);\n        }\n\n        $class      = new ReflectionClass($name);\n        $docComment = $class->getDocComment();\n\n        // Sets default values for annotation metadata\n        $constructor = $class->getConstructor();\n        $metadata    = [\n            'default_property' => null,\n            'has_constructor'  => $constructor !== null && $constructor->getNumberOfParameters() > 0,\n            'constructor_args' => [],\n            'properties'       => [],\n            'property_types'   => [],\n            'attribute_types'  => [],\n            'targets_literal'  => null,\n            'targets'          => Target::TARGET_ALL,\n            'is_annotation'    => strpos($docComment, '@Annotation') !== false,\n        ];\n\n        $metadata['has_named_argument_constructor'] = false;\n\n        // verify that the class is really meant to be an annotation\n        if ($metadata['is_annotation']) {\n            self::$metadataParser->setTarget(Target::TARGET_CLASS);\n\n            foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) {\n                if ($annotation instanceof Target) {\n                    $metadata['targets']         = $annotation->targets;\n                    $metadata['targets_literal'] = $annotation->literal;\n\n                    continue;\n                }\n\n                if ($annotation instanceof NamedArgumentConstructor) {\n                    $metadata['has_named_argument_constructor'] = $metadata['has_constructor'];\n                    if ($metadata['has_named_argument_constructor']) {\n                        // choose the first argument as the default property\n                        $metadata['default_property'] = $constructor->getParameters()[0]->getName();\n                    }\n                }\n\n                if (! ($annotation instanceof Attributes)) {\n                    continue;\n                }\n\n                foreach ($annotation->value as $attribute) {\n                    $this->collectAttributeTypeMetadata($metadata, $attribute);\n                }\n            }\n\n            // if not has a constructor will inject values into public properties\n            if ($metadata['has_constructor'] === false) {\n                // collect all public properties\n                foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {\n                    $metadata['properties'][$property->name] = $property->name;\n\n                    $propertyComment = $property->getDocComment();\n                    if ($propertyComment === false) {\n                        continue;\n                    }\n\n                    $attribute = new Attribute();\n\n                    $attribute->required = (strpos($propertyComment, '@Required') !== false);\n                    $attribute->name     = $property->name;\n                    $attribute->type     = (strpos($propertyComment, '@var') !== false &&\n                        preg_match('/@var\\s+([^\\s]+)/', $propertyComment, $matches))\n                        ? $matches[1]\n                        : 'mixed';\n\n                    $this->collectAttributeTypeMetadata($metadata, $attribute);\n\n                    // checks if the property has @Enum\n                    if (strpos($propertyComment, '@Enum') === false) {\n                        continue;\n                    }\n\n                    $context = 'property ' . $class->name . '::$' . $property->name;\n\n                    self::$metadataParser->setTarget(Target::TARGET_PROPERTY);\n\n                    foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) {\n                        if (! $annotation instanceof Enum) {\n                            continue;\n                        }\n\n                        $metadata['enum'][$property->name]['value']   = $annotation->value;\n                        $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal))\n                            ? $annotation->literal\n                            : $annotation->value;\n                    }\n                }\n\n                // choose the first property as default property\n                $metadata['default_property'] = reset($metadata['properties']);\n            } elseif ($metadata['has_named_argument_constructor']) {\n                foreach ($constructor->getParameters() as $parameter) {\n                    if ($parameter->isVariadic()) {\n                        break;\n                    }\n\n                    $metadata['constructor_args'][$parameter->getName()] = [\n                        'position' => $parameter->getPosition(),\n                        'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null,\n                    ];\n                }\n            }\n        }\n\n        self::$annotationMetadata[$name] = $metadata;\n    }\n\n    /**\n     * Collects parsing metadata for a given attribute.\n     *\n     * @param mixed[] $metadata\n     */\n    private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void\n    {\n        // handle internal type declaration\n        $type = self::$typeMap[$attribute->type] ?? $attribute->type;\n\n        // handle the case if the property type is mixed\n        if ($type === 'mixed') {\n            return;\n        }\n\n        // Evaluate type\n        $pos = strpos($type, '<');\n        if ($pos !== false) {\n            // Checks if the property has array<type>\n            $arrayType = substr($type, $pos + 1, -1);\n            $type      = 'array';\n\n            if (isset(self::$typeMap[$arrayType])) {\n                $arrayType = self::$typeMap[$arrayType];\n            }\n\n            $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType;\n        } else {\n            // Checks if the property has type[]\n            $pos = strrpos($type, '[');\n            if ($pos !== false) {\n                $arrayType = substr($type, 0, $pos);\n                $type      = 'array';\n\n                if (isset(self::$typeMap[$arrayType])) {\n                    $arrayType = self::$typeMap[$arrayType];\n                }\n\n                $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType;\n            }\n        }\n\n        $metadata['attribute_types'][$attribute->name]['type']     = $type;\n        $metadata['attribute_types'][$attribute->name]['value']    = $attribute->type;\n        $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required;\n    }\n\n    /**\n     * Annotations ::= Annotation {[ \"*\" ]* [Annotation]}*\n     *\n     * @phpstan-return list<object>\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function Annotations(): array\n    {\n        $annotations = [];\n\n        while ($this->lexer->lookahead !== null) {\n            if ($this->lexer->lookahead->type !== DocLexer::T_AT) {\n                $this->lexer->moveNext();\n                continue;\n            }\n\n            // make sure the @ is preceded by non-catchable pattern\n            if (\n                $this->lexer->token !== null &&\n                $this->lexer->lookahead->position === $this->lexer->token->position + strlen(\n                    $this->lexer->token->value\n                )\n            ) {\n                $this->lexer->moveNext();\n                continue;\n            }\n\n            // make sure the @ is followed by either a namespace separator, or\n            // an identifier token\n            $peek = $this->lexer->glimpse();\n            if (\n                ($peek === null)\n                || ($peek->type !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array(\n                    $peek->type,\n                    self::$classIdentifiers,\n                    true\n                ))\n                || $peek->position !== $this->lexer->lookahead->position + 1\n            ) {\n                $this->lexer->moveNext();\n                continue;\n            }\n\n            $this->isNestedAnnotation = false;\n            $annot                    = $this->Annotation();\n            if ($annot === false) {\n                continue;\n            }\n\n            $annotations[] = $annot;\n        }\n\n        return $annotations;\n    }\n\n    /**\n     * Annotation     ::= \"@\" AnnotationName MethodCall\n     * AnnotationName ::= QualifiedName | SimpleName\n     * QualifiedName  ::= NameSpacePart \"\\\" {NameSpacePart \"\\\"}* SimpleName\n     * NameSpacePart  ::= identifier | null | false | true\n     * SimpleName     ::= identifier | null | false | true\n     *\n     * @return object|false False if it is not a valid annotation.\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function Annotation()\n    {\n        $this->match(DocLexer::T_AT);\n\n        // check if we have an annotation\n        $name = $this->Identifier();\n\n        if (\n            $this->lexer->isNextToken(DocLexer::T_MINUS)\n            && $this->lexer->nextTokenIsAdjacent()\n        ) {\n            // Annotations with dashes, such as \"@foo-\" or \"@foo-bar\", are to be discarded\n            return false;\n        }\n\n        // only process names which are not fully qualified, yet\n        // fully qualified names must start with a \\\n        $originalName = $name;\n\n        if ($name[0] !== '\\\\') {\n            $pos          = strpos($name, '\\\\');\n            $alias        = ($pos === false) ? $name : substr($name, 0, $pos);\n            $found        = false;\n            $loweredAlias = strtolower($alias);\n\n            if ($this->namespaces) {\n                foreach ($this->namespaces as $namespace) {\n                    if ($this->classExists($namespace . '\\\\' . $name)) {\n                        $name  = $namespace . '\\\\' . $name;\n                        $found = true;\n                        break;\n                    }\n                }\n            } elseif (isset($this->imports[$loweredAlias])) {\n                $namespace = ltrim($this->imports[$loweredAlias], '\\\\');\n                $name      = ($pos !== false)\n                    ? $namespace . substr($name, $pos)\n                    : $namespace;\n                $found     = $this->classExists($name);\n            } elseif (\n                ! isset($this->ignoredAnnotationNames[$name])\n                && isset($this->imports['__NAMESPACE__'])\n                && $this->classExists($this->imports['__NAMESPACE__'] . '\\\\' . $name)\n            ) {\n                $name  = $this->imports['__NAMESPACE__'] . '\\\\' . $name;\n                $found = true;\n            } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) {\n                $found = true;\n            }\n\n            if (! $found) {\n                if ($this->isIgnoredAnnotation($name)) {\n                    return false;\n                }\n\n                throw AnnotationException::semanticalError(sprintf(\n                    <<<'EXCEPTION'\nThe annotation \"@%s\" in %s was never imported. Did you maybe forget to add a \"use\" statement for this annotation?\nEXCEPTION\n                    ,\n                    $name,\n                    $this->context\n                ));\n            }\n        }\n\n        $name = ltrim($name, '\\\\');\n\n        if (! $this->classExists($name)) {\n            throw AnnotationException::semanticalError(sprintf(\n                'The annotation \"@%s\" in %s does not exist, or could not be auto-loaded.',\n                $name,\n                $this->context\n            ));\n        }\n\n        // at this point, $name contains the fully qualified class name of the\n        // annotation, and it is also guaranteed that this class exists, and\n        // that it is loaded\n\n        // collects the metadata annotation only if there is not yet\n        if (! isset(self::$annotationMetadata[$name])) {\n            $this->collectAnnotationMetadata($name);\n        }\n\n        // verify that the class is really meant to be an annotation and not just any ordinary class\n        if (self::$annotationMetadata[$name]['is_annotation'] === false) {\n            if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) {\n                return false;\n            }\n\n            throw AnnotationException::semanticalError(sprintf(\n                <<<'EXCEPTION'\nThe class \"%s\" is not annotated with @Annotation.\nAre you sure this class can be used as annotation?\nIf so, then you need to add @Annotation to the _class_ doc comment of \"%s\".\nIf it is indeed no annotation, then you need to add @IgnoreAnnotation(\"%s\") to the _class_ doc comment of %s.\nEXCEPTION\n                ,\n                $name,\n                $name,\n                $originalName,\n                $this->context\n            ));\n        }\n\n        //if target is nested annotation\n        $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target;\n\n        // Next will be nested\n        $this->isNestedAnnotation = true;\n\n        //if annotation does not support current target\n        if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) {\n            throw AnnotationException::semanticalError(\n                sprintf(\n                    <<<'EXCEPTION'\nAnnotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.\nEXCEPTION\n                    ,\n                    $originalName,\n                    $this->context,\n                    self::$annotationMetadata[$name]['targets_literal']\n                )\n            );\n        }\n\n        $arguments = $this->MethodCall();\n        $values    = $this->resolvePositionalValues($arguments, $name);\n\n        if (isset(self::$annotationMetadata[$name]['enum'])) {\n            // checks all declared attributes\n            foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) {\n                // checks if the attribute is a valid enumerator\n                if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) {\n                    throw AnnotationException::enumeratorError(\n                        $property,\n                        $name,\n                        $this->context,\n                        $enum['literal'],\n                        $values[$property]\n                    );\n                }\n            }\n        }\n\n        // checks all declared attributes\n        foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) {\n            if (\n                $property === self::$annotationMetadata[$name]['default_property']\n                && ! isset($values[$property]) && isset($values['value'])\n            ) {\n                $property = 'value';\n            }\n\n            // handle a not given attribute or null value\n            if (! isset($values[$property])) {\n                if ($type['required']) {\n                    throw AnnotationException::requiredError(\n                        $property,\n                        $originalName,\n                        $this->context,\n                        'a(n) ' . $type['value']\n                    );\n                }\n\n                continue;\n            }\n\n            if ($type['type'] === 'array') {\n                // handle the case of a single value\n                if (! is_array($values[$property])) {\n                    $values[$property] = [$values[$property]];\n                }\n\n                // checks if the attribute has array type declaration, such as \"array<string>\"\n                if (isset($type['array_type'])) {\n                    foreach ($values[$property] as $item) {\n                        if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) {\n                            throw AnnotationException::attributeTypeError(\n                                $property,\n                                $originalName,\n                                $this->context,\n                                'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's',\n                                $item\n                            );\n                        }\n                    }\n                }\n            } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) {\n                throw AnnotationException::attributeTypeError(\n                    $property,\n                    $originalName,\n                    $this->context,\n                    'a(n) ' . $type['value'],\n                    $values[$property]\n                );\n            }\n        }\n\n        if (self::$annotationMetadata[$name]['has_named_argument_constructor']) {\n            if (PHP_VERSION_ID >= 80000) {\n                foreach ($values as $property => $value) {\n                    if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) {\n                        throw AnnotationException::creationError(sprintf(\n                            <<<'EXCEPTION'\nThe annotation @%s declared on %s does not have a property named \"%s\"\nthat can be set through its named arguments constructor.\nAvailable named arguments: %s\nEXCEPTION\n                            ,\n                            $originalName,\n                            $this->context,\n                            $property,\n                            implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args']))\n                        ));\n                    }\n                }\n\n                return $this->instantiateAnnotiation($originalName, $this->context, $name, $values);\n            }\n\n            $positionalValues = [];\n            foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) {\n                $positionalValues[$parameter['position']] = $parameter['default'];\n            }\n\n            foreach ($values as $property => $value) {\n                if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) {\n                    throw AnnotationException::creationError(sprintf(\n                        <<<'EXCEPTION'\nThe annotation @%s declared on %s does not have a property named \"%s\"\nthat can be set through its named arguments constructor.\nAvailable named arguments: %s\nEXCEPTION\n                        ,\n                        $originalName,\n                        $this->context,\n                        $property,\n                        implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args']))\n                    ));\n                }\n\n                $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value;\n            }\n\n            return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues);\n        }\n\n        // check if the annotation expects values via the constructor,\n        // or directly injected into public properties\n        if (self::$annotationMetadata[$name]['has_constructor'] === true) {\n            return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]);\n        }\n\n        $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []);\n\n        foreach ($values as $property => $value) {\n            if (! isset(self::$annotationMetadata[$name]['properties'][$property])) {\n                if ($property !== 'value') {\n                    throw AnnotationException::creationError(sprintf(\n                        <<<'EXCEPTION'\nThe annotation @%s declared on %s does not have a property named \"%s\".\nAvailable properties: %s\nEXCEPTION\n                        ,\n                        $originalName,\n                        $this->context,\n                        $property,\n                        implode(', ', self::$annotationMetadata[$name]['properties'])\n                    ));\n                }\n\n                // handle the case if the property has no annotations\n                $property = self::$annotationMetadata[$name]['default_property'];\n                if (! $property) {\n                    throw AnnotationException::creationError(sprintf(\n                        'The annotation @%s declared on %s does not accept any values, but got %s.',\n                        $originalName,\n                        $this->context,\n                        json_encode($values)\n                    ));\n                }\n            }\n\n            $instance->{$property} = $value;\n        }\n\n        return $instance;\n    }\n\n    /**\n     * MethodCall ::= [\"(\" [Values] \")\"]\n     *\n     * @psalm-return Arguments\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function MethodCall(): array\n    {\n        $values = [];\n\n        if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {\n            return $values;\n        }\n\n        $this->match(DocLexer::T_OPEN_PARENTHESIS);\n\n        if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {\n            $values = $this->Values();\n        }\n\n        $this->match(DocLexer::T_CLOSE_PARENTHESIS);\n\n        return $values;\n    }\n\n    /**\n     * Values ::= Array | Value {\",\" Value}* [\",\"]\n     *\n     * @psalm-return Arguments\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function Values(): array\n    {\n        $values = [$this->Value()];\n\n        while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {\n            $this->match(DocLexer::T_COMMA);\n\n            if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {\n                break;\n            }\n\n            $token = $this->lexer->lookahead;\n            $value = $this->Value();\n\n            $values[] = $value;\n        }\n\n        $namedArguments      = [];\n        $positionalArguments = [];\n        foreach ($values as $k => $value) {\n            if (is_object($value) && $value instanceof stdClass) {\n                $namedArguments[$value->name] = $value->value;\n            } else {\n                $positionalArguments[$k] = $value;\n            }\n        }\n\n        return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments];\n    }\n\n    /**\n     * Constant ::= integer | string | float | boolean\n     *\n     * @return mixed\n     *\n     * @throws AnnotationException\n     */\n    private function Constant()\n    {\n        $identifier = $this->Identifier();\n\n        if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\\\') {\n            [$className, $const] = explode('::', $identifier);\n\n            $pos          = strpos($className, '\\\\');\n            $alias        = ($pos === false) ? $className : substr($className, 0, $pos);\n            $found        = false;\n            $loweredAlias = strtolower($alias);\n\n            switch (true) {\n                case ! empty($this->namespaces):\n                    foreach ($this->namespaces as $ns) {\n                        if (class_exists($ns . '\\\\' . $className) || interface_exists($ns . '\\\\' . $className)) {\n                            $className = $ns . '\\\\' . $className;\n                            $found     = true;\n                            break;\n                        }\n                    }\n\n                    break;\n\n                case isset($this->imports[$loweredAlias]):\n                    $found     = true;\n                    $className = ($pos !== false)\n                        ? $this->imports[$loweredAlias] . substr($className, $pos)\n                        : $this->imports[$loweredAlias];\n                    break;\n\n                default:\n                    if (isset($this->imports['__NAMESPACE__'])) {\n                        $ns = $this->imports['__NAMESPACE__'];\n\n                        if (class_exists($ns . '\\\\' . $className) || interface_exists($ns . '\\\\' . $className)) {\n                            $className = $ns . '\\\\' . $className;\n                            $found     = true;\n                        }\n                    }\n\n                    break;\n            }\n\n            if ($found) {\n                $identifier = $className . '::' . $const;\n            }\n        }\n\n        /**\n         * Checks if identifier ends with ::class and remove the leading backslash if it exists.\n         */\n        if (\n            $this->identifierEndsWithClassConstant($identifier) &&\n            ! $this->identifierStartsWithBackslash($identifier)\n        ) {\n            return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier));\n        }\n\n        if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) {\n            return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1);\n        }\n\n        if (! defined($identifier)) {\n            throw AnnotationException::semanticalErrorConstants($identifier, $this->context);\n        }\n\n        return constant($identifier);\n    }\n\n    private function identifierStartsWithBackslash(string $identifier): bool\n    {\n        return $identifier[0] === '\\\\';\n    }\n\n    private function identifierEndsWithClassConstant(string $identifier): bool\n    {\n        return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class');\n    }\n\n    /** @return int|false */\n    private function getClassConstantPositionInIdentifier(string $identifier)\n    {\n        return stripos($identifier, '::class');\n    }\n\n    /**\n     * Identifier ::= string\n     *\n     * @throws AnnotationException\n     */\n    private function Identifier(): string\n    {\n        // check if we have an annotation\n        if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) {\n            throw $this->syntaxError('namespace separator or identifier');\n        }\n\n        $this->lexer->moveNext();\n\n        $className = $this->lexer->token->value;\n\n        while (\n            $this->lexer->lookahead !== null &&\n            $this->lexer->lookahead->position === ($this->lexer->token->position +\n            strlen($this->lexer->token->value)) &&\n            $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)\n        ) {\n            $this->match(DocLexer::T_NAMESPACE_SEPARATOR);\n            $this->matchAny(self::$classIdentifiers);\n\n            $className .= '\\\\' . $this->lexer->token->value;\n        }\n\n        return $className;\n    }\n\n    /**\n     * Value ::= PlainValue | FieldAssignment\n     *\n     * @return mixed\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function Value()\n    {\n        $peek = $this->lexer->glimpse();\n\n        if ($peek->type === DocLexer::T_EQUALS) {\n            return $this->FieldAssignment();\n        }\n\n        return $this->PlainValue();\n    }\n\n    /**\n     * PlainValue ::= integer | string | float | boolean | Array | Annotation\n     *\n     * @return mixed\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function PlainValue()\n    {\n        if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {\n            return $this->Arrayx();\n        }\n\n        if ($this->lexer->isNextToken(DocLexer::T_AT)) {\n            return $this->Annotation();\n        }\n\n        if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) {\n            return $this->Constant();\n        }\n\n        switch ($this->lexer->lookahead->type) {\n            case DocLexer::T_STRING:\n                $this->match(DocLexer::T_STRING);\n\n                return $this->lexer->token->value;\n\n            case DocLexer::T_INTEGER:\n                $this->match(DocLexer::T_INTEGER);\n\n                return (int) $this->lexer->token->value;\n\n            case DocLexer::T_FLOAT:\n                $this->match(DocLexer::T_FLOAT);\n\n                return (float) $this->lexer->token->value;\n\n            case DocLexer::T_TRUE:\n                $this->match(DocLexer::T_TRUE);\n\n                return true;\n\n            case DocLexer::T_FALSE:\n                $this->match(DocLexer::T_FALSE);\n\n                return false;\n\n            case DocLexer::T_NULL:\n                $this->match(DocLexer::T_NULL);\n\n                return null;\n\n            default:\n                throw $this->syntaxError('PlainValue');\n        }\n    }\n\n    /**\n     * FieldAssignment ::= FieldName \"=\" PlainValue\n     * FieldName ::= identifier\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function FieldAssignment(): stdClass\n    {\n        $this->match(DocLexer::T_IDENTIFIER);\n        $fieldName = $this->lexer->token->value;\n\n        $this->match(DocLexer::T_EQUALS);\n\n        $item        = new stdClass();\n        $item->name  = $fieldName;\n        $item->value = $this->PlainValue();\n\n        return $item;\n    }\n\n    /**\n     * Array ::= \"{\" ArrayEntry {\",\" ArrayEntry}* [\",\"] \"}\"\n     *\n     * @return mixed[]\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function Arrayx(): array\n    {\n        $array = $values = [];\n\n        $this->match(DocLexer::T_OPEN_CURLY_BRACES);\n\n        // If the array is empty, stop parsing and return.\n        if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {\n            $this->match(DocLexer::T_CLOSE_CURLY_BRACES);\n\n            return $array;\n        }\n\n        $values[] = $this->ArrayEntry();\n\n        while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {\n            $this->match(DocLexer::T_COMMA);\n\n            // optional trailing comma\n            if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {\n                break;\n            }\n\n            $values[] = $this->ArrayEntry();\n        }\n\n        $this->match(DocLexer::T_CLOSE_CURLY_BRACES);\n\n        foreach ($values as $value) {\n            [$key, $val] = $value;\n\n            if ($key !== null) {\n                $array[$key] = $val;\n            } else {\n                $array[] = $val;\n            }\n        }\n\n        return $array;\n    }\n\n    /**\n     * ArrayEntry ::= Value | KeyValuePair\n     * KeyValuePair ::= Key (\"=\" | \":\") PlainValue | Constant\n     * Key ::= string | integer | Constant\n     *\n     * @phpstan-return array{mixed, mixed}\n     *\n     * @throws AnnotationException\n     * @throws ReflectionException\n     */\n    private function ArrayEntry(): array\n    {\n        $peek = $this->lexer->glimpse();\n\n        if (\n            $peek->type === DocLexer::T_EQUALS\n                || $peek->type === DocLexer::T_COLON\n        ) {\n            if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) {\n                $key = $this->Constant();\n            } else {\n                $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]);\n                $key = $this->lexer->token->value;\n            }\n\n            $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]);\n\n            return [$key, $this->PlainValue()];\n        }\n\n        return [null, $this->Value()];\n    }\n\n    /**\n     * Checks whether the given $name matches any ignored annotation name or namespace\n     */\n    private function isIgnoredAnnotation(string $name): bool\n    {\n        if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) {\n            return true;\n        }\n\n        foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) {\n            $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\\\') . '\\\\';\n\n            if (stripos(rtrim($name, '\\\\') . '\\\\', $ignoredAnnotationNamespace) === 0) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Resolve positional arguments (without name) to named ones\n     *\n     * @psalm-param Arguments $arguments\n     *\n     * @return array<string,mixed>\n     */\n    private function resolvePositionalValues(array $arguments, string $name): array\n    {\n        $positionalArguments = $arguments['positional_arguments'] ?? [];\n        $values              = $arguments['named_arguments'] ?? [];\n\n        if (\n            self::$annotationMetadata[$name]['has_named_argument_constructor']\n            && self::$annotationMetadata[$name]['default_property'] !== null\n        ) {\n            // We must ensure that we don't have positional arguments after named ones\n            $positions    = array_keys($positionalArguments);\n            $lastPosition = null;\n            foreach ($positions as $position) {\n                if (\n                    ($lastPosition === null && $position !== 0) ||\n                    ($lastPosition !== null && $position !== $lastPosition + 1)\n                ) {\n                    throw $this->syntaxError('Positional arguments after named arguments is not allowed');\n                }\n\n                $lastPosition = $position;\n            }\n\n            foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) {\n                $position = $parameter['position'];\n                if (isset($values[$property]) || ! isset($positionalArguments[$position])) {\n                    continue;\n                }\n\n                $values[$property] = $positionalArguments[$position];\n            }\n        } else {\n            if (count($positionalArguments) > 0 && ! isset($values['value'])) {\n                if (count($positionalArguments) === 1) {\n                    $value = array_pop($positionalArguments);\n                } else {\n                    $value = array_values($positionalArguments);\n                }\n\n                $values['value'] = $value;\n            }\n        }\n\n        return $values;\n    }\n\n    /**\n     * Try to instantiate the annotation and catch and process any exceptions related to failure\n     *\n     * @param class-string        $name\n     * @param array<string,mixed> $arguments\n     *\n     * @return object\n     *\n     * @throws AnnotationException\n     */\n    private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments)\n    {\n        try {\n            return new $name(...$arguments);\n        } catch (Throwable $exception) {\n            throw AnnotationException::creationError(\n                sprintf(\n                    'An error occurred while instantiating the annotation @%s declared on %s: \"%s\".',\n                    $originalName,\n                    $context,\n                    $exception->getMessage()\n                ),\n                $exception\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Common\\Annotations;\n\n/**\n *  A list of annotations that are implicitly ignored during the parsing process.\n *\n *  All names are case sensitive.\n */\nfinal class ImplicitlyIgnoredAnnotationNames\n{\n    private const Reserved = [\n        'Annotation'               => true,\n        'Attribute'                => true,\n        'Attributes'               => true,\n        /* Can we enable this? 'Enum' => true, */\n        'Required'                 => true,\n        'Target'                   => true,\n        'NamedArgumentConstructor' => true,\n    ];\n\n    private const WidelyUsedNonStandard = [\n        'fix'      => true,\n        'fixme'    => true,\n        'override' => true,\n    ];\n\n    private const PhpDocumentor1 = [\n        'abstract'   => true,\n        'access'     => true,\n        'code'       => true,\n        'deprec'     => true,\n        'endcode'    => true,\n        'exception'  => true,\n        'final'      => true,\n        'ingroup'    => true,\n        'inheritdoc' => true,\n        'inheritDoc' => true,\n        'magic'      => true,\n        'name'       => true,\n        'private'    => true,\n        'static'     => true,\n        'staticvar'  => true,\n        'staticVar'  => true,\n        'toc'        => true,\n        'tutorial'   => true,\n        'throw'      => true,\n    ];\n\n    private const PhpDocumentor2 = [\n        'api'            => true,\n        'author'         => true,\n        'category'       => true,\n        'copyright'      => true,\n        'deprecated'     => true,\n        'example'        => true,\n        'filesource'     => true,\n        'global'         => true,\n        'ignore'         => true,\n        /* Can we enable this? 'index' => true, */\n        'internal'       => true,\n        'license'        => true,\n        'link'           => true,\n        'method'         => true,\n        'package'        => true,\n        'param'          => true,\n        'property'       => true,\n        'property-read'  => true,\n        'property-write' => true,\n        'return'         => true,\n        'see'            => true,\n        'since'          => true,\n        'source'         => true,\n        'subpackage'     => true,\n        'throws'         => true,\n        'todo'           => true,\n        'TODO'           => true,\n        'usedby'         => true,\n        'uses'           => true,\n        'var'            => true,\n        'version'        => true,\n    ];\n\n    private const PHPUnit = [\n        'author'                         => true,\n        'after'                          => true,\n        'afterClass'                     => true,\n        'backupGlobals'                  => true,\n        'backupStaticAttributes'         => true,\n        'before'                         => true,\n        'beforeClass'                    => true,\n        'codeCoverageIgnore'             => true,\n        'codeCoverageIgnoreStart'        => true,\n        'codeCoverageIgnoreEnd'          => true,\n        'covers'                         => true,\n        'coversDefaultClass'             => true,\n        'coversNothing'                  => true,\n        'dataProvider'                   => true,\n        'depends'                        => true,\n        'doesNotPerformAssertions'       => true,\n        'expectedException'              => true,\n        'expectedExceptionCode'          => true,\n        'expectedExceptionMessage'       => true,\n        'expectedExceptionMessageRegExp' => true,\n        'group'                          => true,\n        'large'                          => true,\n        'medium'                         => true,\n        'preserveGlobalState'            => true,\n        'requires'                       => true,\n        'runTestsInSeparateProcesses'    => true,\n        'runInSeparateProcess'           => true,\n        'small'                          => true,\n        'test'                           => true,\n        'testdox'                        => true,\n        'testWith'                       => true,\n        'ticket'                         => true,\n        'uses'                           => true,\n    ];\n\n    private const PhpCheckStyle = ['SuppressWarnings' => true];\n\n    private const PhpStorm = ['noinspection' => true];\n\n    private const PEAR = ['package_version' => true];\n\n    private const PlainUML = [\n        'startuml' => true,\n        'enduml'   => true,\n    ];\n\n    private const Symfony = ['experimental' => true];\n\n    private const PhpCodeSniffer = [\n        'codingStandardsIgnoreStart' => true,\n        'codingStandardsIgnoreEnd'   => true,\n    ];\n\n    private const SlevomatCodingStandard = ['phpcsSuppress' => true];\n\n    private const Phan = ['suppress' => true];\n\n    private const Rector = ['noRector' => true];\n\n    private const StaticAnalysis = [\n        // PHPStan, Psalm\n        'extends' => true,\n        'implements' => true,\n        'readonly' => true,\n        'template' => true,\n        'use' => true,\n\n        // Psalm\n        'pure' => true,\n        'immutable' => true,\n    ];\n\n    public const LIST = self::Reserved\n        + self::WidelyUsedNonStandard\n        + self::PhpDocumentor1\n        + self::PhpDocumentor2\n        + self::PHPUnit\n        + self::PhpCheckStyle\n        + self::PhpStorm\n        + self::PEAR\n        + self::PlainUML\n        + self::Symfony\n        + self::SlevomatCodingStandard\n        + self::PhpCodeSniffer\n        + self::Phan\n        + self::Rector\n        + self::StaticAnalysis;\n\n    private function __construct()\n    {\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/IndexedReader.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse ReflectionClass;\nuse ReflectionMethod;\nuse ReflectionProperty;\n\nuse function call_user_func_array;\nuse function get_class;\n\n/**\n * Allows the reader to be used in-place of Doctrine's reader.\n */\nclass IndexedReader implements Reader\n{\n    /** @var Reader */\n    private $delegate;\n\n    public function __construct(Reader $reader)\n    {\n        $this->delegate = $reader;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotations(ReflectionClass $class)\n    {\n        $annotations = [];\n        foreach ($this->delegate->getClassAnnotations($class) as $annot) {\n            $annotations[get_class($annot)] = $annot;\n        }\n\n        return $annotations;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotation(ReflectionClass $class, $annotationName)\n    {\n        return $this->delegate->getClassAnnotation($class, $annotationName);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotations(ReflectionMethod $method)\n    {\n        $annotations = [];\n        foreach ($this->delegate->getMethodAnnotations($method) as $annot) {\n            $annotations[get_class($annot)] = $annot;\n        }\n\n        return $annotations;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotation(ReflectionMethod $method, $annotationName)\n    {\n        return $this->delegate->getMethodAnnotation($method, $annotationName);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotations(ReflectionProperty $property)\n    {\n        $annotations = [];\n        foreach ($this->delegate->getPropertyAnnotations($property) as $annot) {\n            $annotations[get_class($annot)] = $annot;\n        }\n\n        return $annotations;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)\n    {\n        return $this->delegate->getPropertyAnnotation($property, $annotationName);\n    }\n\n    /**\n     * Proxies all methods to the delegate.\n     *\n     * @param mixed[] $args\n     *\n     * @return mixed\n     */\n    public function __call(string $method, array $args)\n    {\n        return call_user_func_array([$this->delegate, $method], $args);\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/PhpParser.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse ReflectionClass;\nuse ReflectionFunction;\nuse SplFileObject;\n\nuse function is_file;\nuse function method_exists;\nuse function preg_quote;\nuse function preg_replace;\n\n/**\n * Parses a file for namespaces/use/class declarations.\n */\nfinal class PhpParser\n{\n    /**\n     * Parse a class or function for use statements.\n     *\n     * @param ReflectionClass|ReflectionFunction $reflection\n     *\n     * @psalm-return array<string, string> a list with use statements in the form (Alias => FQN).\n     */\n    public function parseUseStatements($reflection): array\n    {\n        if (method_exists($reflection, 'getUseStatements')) {\n            return $reflection->getUseStatements();\n        }\n\n        $filename = $reflection->getFileName();\n\n        if ($filename === false) {\n            return [];\n        }\n\n        $content = $this->getFileContent($filename, $reflection->getStartLine());\n\n        if ($content === null) {\n            return [];\n        }\n\n        $namespace = preg_quote($reflection->getNamespaceName());\n        $content   = preg_replace('/^.*?(\\bnamespace\\s+' . $namespace . '\\s*[;{].*)$/s', '\\\\1', $content);\n        $tokenizer = new TokenParser('<?php ' . $content);\n\n        return $tokenizer->parseUseStatements($reflection->getNamespaceName());\n    }\n\n    /**\n     * Gets the content of the file right up to the given line number.\n     *\n     * @param string $filename   The name of the file to load.\n     * @param int    $lineNumber The number of lines to read from file.\n     *\n     * @return string|null The content of the file or null if the file does not exist.\n     */\n    private function getFileContent(string $filename, $lineNumber)\n    {\n        if (! is_file($filename)) {\n            return null;\n        }\n\n        $content = '';\n        $lineCnt = 0;\n        $file    = new SplFileObject($filename);\n        while (! $file->eof()) {\n            if ($lineCnt++ === $lineNumber) {\n                break;\n            }\n\n            $content .= $file->fgets();\n        }\n\n        return $content;\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/PsrCachedReader.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse Psr\\Cache\\CacheItemPoolInterface;\nuse ReflectionClass;\nuse ReflectionMethod;\nuse ReflectionProperty;\nuse Reflector;\n\nuse function array_map;\nuse function array_merge;\nuse function assert;\nuse function filemtime;\nuse function is_file;\nuse function max;\nuse function rawurlencode;\nuse function time;\n\n/**\n * A cache aware annotation reader.\n */\nfinal class PsrCachedReader implements Reader\n{\n    /** @var Reader */\n    private $delegate;\n\n    /** @var CacheItemPoolInterface */\n    private $cache;\n\n    /** @var bool */\n    private $debug;\n\n    /** @var array<string, array<object>> */\n    private $loadedAnnotations = [];\n\n    /** @var int[] */\n    private $loadedFilemtimes = [];\n\n    public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false)\n    {\n        $this->delegate = $reader;\n        $this->cache    = $cache;\n        $this->debug    = (bool) $debug;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotations(ReflectionClass $class)\n    {\n        $cacheKey = $class->getName();\n\n        if (isset($this->loadedAnnotations[$cacheKey])) {\n            return $this->loadedAnnotations[$cacheKey];\n        }\n\n        $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class);\n\n        return $this->loadedAnnotations[$cacheKey] = $annots;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getClassAnnotation(ReflectionClass $class, $annotationName)\n    {\n        foreach ($this->getClassAnnotations($class) as $annot) {\n            if ($annot instanceof $annotationName) {\n                return $annot;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotations(ReflectionProperty $property)\n    {\n        $class    = $property->getDeclaringClass();\n        $cacheKey = $class->getName() . '$' . $property->getName();\n\n        if (isset($this->loadedAnnotations[$cacheKey])) {\n            return $this->loadedAnnotations[$cacheKey];\n        }\n\n        $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property);\n\n        return $this->loadedAnnotations[$cacheKey] = $annots;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)\n    {\n        foreach ($this->getPropertyAnnotations($property) as $annot) {\n            if ($annot instanceof $annotationName) {\n                return $annot;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotations(ReflectionMethod $method)\n    {\n        $class    = $method->getDeclaringClass();\n        $cacheKey = $class->getName() . '#' . $method->getName();\n\n        if (isset($this->loadedAnnotations[$cacheKey])) {\n            return $this->loadedAnnotations[$cacheKey];\n        }\n\n        $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method);\n\n        return $this->loadedAnnotations[$cacheKey] = $annots;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function getMethodAnnotation(ReflectionMethod $method, $annotationName)\n    {\n        foreach ($this->getMethodAnnotations($method) as $annot) {\n            if ($annot instanceof $annotationName) {\n                return $annot;\n            }\n        }\n\n        return null;\n    }\n\n    public function clearLoadedAnnotations(): void\n    {\n        $this->loadedAnnotations = [];\n        $this->loadedFilemtimes  = [];\n    }\n\n    /** @return mixed[] */\n    private function fetchFromCache(\n        string $cacheKey,\n        ReflectionClass $class,\n        string $method,\n        Reflector $reflector\n    ): array {\n        $cacheKey = rawurlencode($cacheKey);\n\n        $item = $this->cache->getItem($cacheKey);\n        if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) {\n            $this->cache->save($item->set($this->delegate->{$method}($reflector)));\n        }\n\n        return $item->get();\n    }\n\n    /**\n     * Used in debug mode to check if the cache is fresh.\n     *\n     * @return bool Returns true if the cache was fresh, or false if the class\n     * being read was modified since writing to the cache.\n     */\n    private function refresh(string $cacheKey, ReflectionClass $class): bool\n    {\n        $lastModification = $this->getLastModification($class);\n        if ($lastModification === 0) {\n            return true;\n        }\n\n        $item = $this->cache->getItem('[C]' . $cacheKey);\n        if ($item->isHit() && $item->get() >= $lastModification) {\n            return true;\n        }\n\n        $this->cache->save($item->set(time()));\n\n        return false;\n    }\n\n    /**\n     * Returns the time the class was last modified, testing traits and parents\n     */\n    private function getLastModification(ReflectionClass $class): int\n    {\n        $filename = $class->getFileName();\n\n        if (isset($this->loadedFilemtimes[$filename])) {\n            return $this->loadedFilemtimes[$filename];\n        }\n\n        $parent = $class->getParentClass();\n\n        $lastModification =  max(array_merge(\n            [$filename !== false && is_file($filename) ? filemtime($filename) : 0],\n            array_map(function (ReflectionClass $reflectionTrait): int {\n                return $this->getTraitLastModificationTime($reflectionTrait);\n            }, $class->getTraits()),\n            array_map(function (ReflectionClass $class): int {\n                return $this->getLastModification($class);\n            }, $class->getInterfaces()),\n            $parent ? [$this->getLastModification($parent)] : []\n        ));\n\n        assert($lastModification !== false);\n\n        return $this->loadedFilemtimes[$filename] = $lastModification;\n    }\n\n    private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int\n    {\n        $fileName = $reflectionTrait->getFileName();\n\n        if (isset($this->loadedFilemtimes[$fileName])) {\n            return $this->loadedFilemtimes[$fileName];\n        }\n\n        $lastModificationTime = max(array_merge(\n            [$fileName !== false && is_file($fileName) ? filemtime($fileName) : 0],\n            array_map(function (ReflectionClass $reflectionTrait): int {\n                return $this->getTraitLastModificationTime($reflectionTrait);\n            }, $reflectionTrait->getTraits())\n        ));\n\n        assert($lastModificationTime !== false);\n\n        return $this->loadedFilemtimes[$fileName] = $lastModificationTime;\n    }\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/Reader.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse ReflectionClass;\nuse ReflectionMethod;\nuse ReflectionProperty;\n\n/**\n * Interface for annotation readers.\n */\ninterface Reader\n{\n    /**\n     * Gets the annotations applied to a class.\n     *\n     * @param ReflectionClass $class The ReflectionClass of the class from which\n     * the class annotations should be read.\n     *\n     * @return array<object> An array of Annotations.\n     */\n    public function getClassAnnotations(ReflectionClass $class);\n\n    /**\n     * Gets a class annotation.\n     *\n     * @param ReflectionClass $class          The ReflectionClass of the class from which\n     *          the class annotations should be read.\n     * @param class-string<T> $annotationName The name of the annotation.\n     *\n     * @return T|null The Annotation or NULL, if the requested annotation does not exist.\n     *\n     * @template T\n     */\n    public function getClassAnnotation(ReflectionClass $class, $annotationName);\n\n    /**\n     * Gets the annotations applied to a method.\n     *\n     * @param ReflectionMethod $method The ReflectionMethod of the method from which\n     * the annotations should be read.\n     *\n     * @return array<object> An array of Annotations.\n     */\n    public function getMethodAnnotations(ReflectionMethod $method);\n\n    /**\n     * Gets a method annotation.\n     *\n     * @param ReflectionMethod $method         The ReflectionMethod to read the annotations from.\n     * @param class-string<T>  $annotationName The name of the annotation.\n     *\n     * @return T|null The Annotation or NULL, if the requested annotation does not exist.\n     *\n     * @template T\n     */\n    public function getMethodAnnotation(ReflectionMethod $method, $annotationName);\n\n    /**\n     * Gets the annotations applied to a property.\n     *\n     * @param ReflectionProperty $property The ReflectionProperty of the property\n     * from which the annotations should be read.\n     *\n     * @return array<object> An array of Annotations.\n     */\n    public function getPropertyAnnotations(ReflectionProperty $property);\n\n    /**\n     * Gets a property annotation.\n     *\n     * @param ReflectionProperty $property       The ReflectionProperty to read the annotations from.\n     * @param class-string<T>    $annotationName The name of the annotation.\n     *\n     * @return T|null The Annotation or NULL, if the requested annotation does not exist.\n     *\n     * @template T\n     */\n    public function getPropertyAnnotation(ReflectionProperty $property, $annotationName);\n}\n"
  },
  {
    "path": "lib/Doctrine/Common/Annotations/TokenParser.php",
    "content": "<?php\n\nnamespace Doctrine\\Common\\Annotations;\n\nuse function array_merge;\nuse function count;\nuse function explode;\nuse function strtolower;\nuse function token_get_all;\n\nuse const PHP_VERSION_ID;\nuse const T_AS;\nuse const T_COMMENT;\nuse const T_DOC_COMMENT;\nuse const T_NAME_FULLY_QUALIFIED;\nuse const T_NAME_QUALIFIED;\nuse const T_NAMESPACE;\nuse const T_NS_SEPARATOR;\nuse const T_STRING;\nuse const T_USE;\nuse const T_WHITESPACE;\n\n/**\n * Parses a file for namespaces/use/class declarations.\n */\nclass TokenParser\n{\n    /**\n     * The token list.\n     *\n     * @phpstan-var list<mixed[]>\n     */\n    private $tokens;\n\n    /**\n     * The number of tokens.\n     *\n     * @var int\n     */\n    private $numTokens;\n\n    /**\n     * The current array pointer.\n     *\n     * @var int\n     */\n    private $pointer = 0;\n\n    public function __construct(string $contents)\n    {\n        $this->tokens = token_get_all($contents);\n\n        // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it\n        // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored\n        // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a\n        // docblock. If the first thing in the file is a class without a doc block this would cause calls to\n        // getDocBlock() on said class to return our long lost doc_comment. Argh.\n        // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least\n        // it's harmless to us.\n        token_get_all(\"<?php\\n/**\\n *\\n */\");\n\n        $this->numTokens = count($this->tokens);\n    }\n\n    /**\n     * Gets the next non whitespace and non comment token.\n     *\n     * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped.\n     * If FALSE then only whitespace and normal comments are skipped.\n     *\n     * @return mixed[]|string|null The token if exists, null otherwise.\n     */\n    public function next(bool $docCommentIsComment = true)\n    {\n        for ($i = $this->pointer; $i < $this->numTokens; $i++) {\n            $this->pointer++;\n            if (\n                $this->tokens[$i][0] === T_WHITESPACE ||\n                $this->tokens[$i][0] === T_COMMENT ||\n                ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)\n            ) {\n                continue;\n            }\n\n            return $this->tokens[$i];\n        }\n\n        return null;\n    }\n\n    /**\n     * Parses a single use statement.\n     *\n     * @return array<string, string> A list with all found class names for a use statement.\n     */\n    public function parseUseStatement()\n    {\n        $groupRoot     = '';\n        $class         = '';\n        $alias         = '';\n        $statements    = [];\n        $explicitAlias = false;\n        while (($token = $this->next())) {\n            if (! $explicitAlias && $token[0] === T_STRING) {\n                $class .= $token[1];\n                $alias  = $token[1];\n            } elseif ($explicitAlias && $token[0] === T_STRING) {\n                $alias = $token[1];\n            } elseif (\n                PHP_VERSION_ID >= 80000 &&\n                ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED)\n            ) {\n                $class .= $token[1];\n\n                $classSplit = explode('\\\\', $token[1]);\n                $alias      = $classSplit[count($classSplit) - 1];\n            } elseif ($token[0] === T_NS_SEPARATOR) {\n                $class .= '\\\\';\n                $alias  = '';\n            } elseif ($token[0] === T_AS) {\n                $explicitAlias = true;\n                $alias         = '';\n            } elseif ($token === ',') {\n                $statements[strtolower($alias)] = $groupRoot . $class;\n                $class                          = '';\n                $alias                          = '';\n                $explicitAlias                  = false;\n            } elseif ($token === ';') {\n                $statements[strtolower($alias)] = $groupRoot . $class;\n                break;\n            } elseif ($token === '{') {\n                $groupRoot = $class;\n                $class     = '';\n            } elseif ($token === '}') {\n                continue;\n            } else {\n                break;\n            }\n        }\n\n        return $statements;\n    }\n\n    /**\n     * Gets all use statements.\n     *\n     * @param string $namespaceName The namespace name of the reflected class.\n     *\n     * @return array<string, string> A list with all found use statements.\n     */\n    public function parseUseStatements(string $namespaceName)\n    {\n        $statements = [];\n        while (($token = $this->next())) {\n            if ($token[0] === T_USE) {\n                $statements = array_merge($statements, $this->parseUseStatement());\n                continue;\n            }\n\n            if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) {\n                continue;\n            }\n\n            // Get fresh array for new namespace. This is to prevent the parser to collect the use statements\n            // for a previous namespace with the same name. This is the case if a namespace is defined twice\n            // or if a namespace with the same name is commented out.\n            $statements = [];\n        }\n\n        return $statements;\n    }\n\n    /**\n     * Gets the namespace.\n     *\n     * @return string The found namespace.\n     */\n    public function parseNamespace()\n    {\n        $name = '';\n        while (\n            ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || (\n            PHP_VERSION_ID >= 80000 &&\n            ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED)\n            ))\n        ) {\n            $name .= $token[1];\n        }\n\n        return $name;\n    }\n\n    /**\n     * Gets the class name.\n     *\n     * @return string The found class name.\n     */\n    public function parseClass()\n    {\n        // Namespaces and class names are tokenized the same: T_STRINGs\n        // separated by T_NS_SEPARATOR so we can use one function to provide\n        // both.\n        return $this->parseNamespace();\n    }\n}\n"
  },
  {
    "path": "phpbench.json.dist",
    "content": "{\n    \"bootstrap\": \"tests/Doctrine/Performance/Common/bootstrap.php\",\n    \"path\": \"tests/Doctrine/Performance/Common/Annotations\"\n}\n"
  },
  {
    "path": "phpcs.xml.dist",
    "content": "<?xml version=\"1.0\"?>\n<ruleset\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:noNamespaceSchemaLocation=\"vendor/squizlabs/php_codesniffer/phpcs.xsd\"\n>\n    <arg name=\"basepath\" value=\".\"/>\n    <arg name=\"extensions\" value=\"php\"/>\n    <arg name=\"parallel\" value=\"80\"/>\n    <arg name=\"cache\" value=\".phpcs-cache\"/>\n    <arg name=\"colors\"/>\n\n    <!-- Show progress of the run and show sniff names -->\n    <arg value=\"ps\"/>\n\n    <config name=\"php_version\" value=\"70100\"/>\n\n    <file>lib</file>\n    <file>tests</file>\n\n    <rule ref=\"Doctrine\">\n        <exclude name=\"SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint\"/>\n        <exclude name=\"SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint\"/>\n        <exclude name=\"SlevomatCodingStandard.TypeHints.DeclareStrictTypes\"/>\n        <exclude name=\"SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming\"/>\n        <exclude name=\"SlevomatCodingStandard.Classes.SuperfluousExceptionNaming\"/>\n        <exclude name=\"SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix\"/>\n        <exclude name=\"SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants.DisallowedLateStaticBindingForConstant\"/>\n        <exclude name=\"SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterLastControlStructure\"/>\n\n        <exclude name=\"PSR2.Methods.MethodDeclaration.Underscore\"/>\n        <!-- https://github.com/slevomat/coding-standard/issues/867 -->\n        <exclude name=\"SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing.IncorrectLinesCountAfterLastControlStructure\"/>\n        <!-- See https://github.com/squizlabs/PHP_CodeSniffer/issues/2937 -->\n        <exclude name=\"Squiz.Arrays.ArrayDeclaration.ValueNoNewline\"/>\n        <exclude name=\"Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore\"/>\n    </rule>\n\n    <!-- Disable the rules that will require PHP 7.4 -->\n    <rule ref=\"SlevomatCodingStandard.TypeHints.PropertyTypeHint\">\n        <properties>\n            <property name=\"enableNativeTypeHint\" value=\"false\"/>\n        </properties>\n    </rule>\n\n    <rule ref=\"PSR1.Methods.CamelCapsMethodName.NotCamelCaps\">\n        <exclude-pattern>*/lib/Doctrine/Common/Annotations/DocParser.php</exclude-pattern>\n    </rule>\n    <rule ref=\"Squiz.Classes.ValidClassName.NotCamelCaps\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassNoNamespaceNoComment.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Commenting.DocCommentSpacing\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash.UseStartsWithBackslash\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"PSR12.Files.ImportStatement.LeadingSlash\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.TypeHints.LongTypeHints.UsedLongTypeHint\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.UseFromSameNamespace.UseFromSameNamespace\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash.UseStartsWithBackslash\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.UseSpacing.IncorrectLinesCountBetweenSameTypeOfUse\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.Namespaces.MultipleUsesPerLine.MultipleUsesPerLine\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"Generic.WhiteSpace.LanguageConstructSpacing\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"Squiz.Classes.ValidClassName\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.TypeHints.ReturnTypeHint\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>\n    </rule>\n\n    <!-- https://github.com/slevomat/coding-standard/issues/1066 -->\n    <rule ref=\"SlevomatCodingStandard.PHP.UselessParentheses\">\n        <exclude-pattern>*/lib/Doctrine/Common/Annotations/DocParser.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM141Test.php</exclude-pattern>\n    </rule>\n\n    <!-- It is easier to understand tests that involve annotations if you can\n        declare several dummy classes with annotations in the same file -->\n    <rule ref=\"PSR1.Classes.ClassDeclaration.MultipleClasses\">\n        <exclude-pattern>*/tests/*</exclude-pattern>\n    </rule>\n    <rule ref=\"Squiz.Classes.ClassFileName.NoMatch\">\n        <exclude-pattern>*/tests/*</exclude-pattern>\n    </rule>\n\n    <rule ref=\"PSR1.Files.SideEffects.FoundWithSymbols\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Test.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithRequire.php</exclude-pattern>\n    </rule>\n\n    <!-- these classes do not have a namespace on purpose -->\n    <rule ref=\"PSR1.Classes.ClassDeclaration.MissingNamespace\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassNoNamespaceNoComment.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint\">\n        <!-- there is a class property with an empty var annotation on purpose -->\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/DummyClass.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.Namespaces.DisallowGroupUse.DisallowedGroupUse\">\n        <!-- The name of the file alone explains this -->\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/GroupUseStatement.php</exclude-pattern>\n    </rule>\n    <rule ref=\"SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/EmptyInterface.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/InterfaceThatExtendsAnInterface.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousPrefix\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/InterfaceThatExtendsAnInterface.php</exclude-pattern>\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/InterfaceWithConstants.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase\">\n        <!-- Usage of mixed case constants seems pretty deliberate here -->\n        <exclude-pattern>*/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php</exclude-pattern>\n    </rule>\n\n    <rule ref=\"Squiz.Functions.GlobalFunction.Found\">\n        <exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php</exclude-pattern>\n    </rule>\n\n    <!-- Single-line PHPDoc blocks will confuse PHPUnit 7.5 -->\n    <rule ref=\"SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment\">\n        <exclude-pattern>*/tests</exclude-pattern>\n    </rule>\n</ruleset>\n"
  },
  {
    "path": "phpstan.neon",
    "content": "parameters:\n    level: 3\n    phpVersion: 80500\n    paths:\n        - lib\n        - tests\n    scanFiles:\n        - tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php\n        - tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php\n        - tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php\n        - tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php\n    excludePaths:\n        - tests/*/Fixtures/*\n        - tests/Doctrine/Tests/Common/Annotations/ReservedKeywordsClasses.php\n        - tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php\n        - tests/Doctrine/Tests/DoctrineTestCase.php\n    polluteScopeWithLoopInitialAssignments: true\n    ignoreErrors:\n        - '#Instantiated class Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment not found#'\n        - '#Property Doctrine\\\\Tests\\\\Common\\\\Annotations\\\\DummyClassNonAnnotationProblem::\\$foo has unknown class#'\n        - '#Call to an undefined static method PHPUnit\\\\Framework\\\\TestCase::expectExceptionMessageRegExp\\(\\)#'\n\n        -\n            identifier: phpDoc.parseError\n            path: tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php\n"
  },
  {
    "path": "phpunit.xml.dist",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor/phpunit/phpunit/phpunit.xsd\"\n         colors=\"true\"\n         beStrictAboutOutputDuringTests=\"true\"\n         beStrictAboutTodoAnnotatedTests=\"true\"\n         failOnRisky=\"true\"\n         failOnWarning=\"true\"\n         bootstrap=\"./tests/Doctrine/Tests/TestInit.php\"\n>\n    <php>\n        <ini name=\"error_reporting\" value=\"-1\" />\n    </php>\n\n    <testsuites>\n        <testsuite name=\"Doctrine Annotations Test Suite\">\n            <directory>./tests/Doctrine/</directory>\n        </testsuite>\n    </testsuites>\n\n    <filter>\n        <whitelist>\n            <directory suffix=\".php\">./lib/Doctrine/</directory>\n        </whitelist>\n    </filter>\n</phpunit>\n"
  },
  {
    "path": "psalm.xml",
    "content": "<?xml version=\"1.0\"?>\n<psalm\n    errorLevel=\"7\"\n    phpVersion=\"8.2\"\n    resolveFromConfigFile=\"true\"\n    findUnusedBaselineEntry=\"true\"\n    findUnusedCode=\"false\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns=\"https://getpsalm.org/schema/config\"\n    xsi:schemaLocation=\"https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd\"\n>\n    <projectFiles>\n        <directory name=\"lib/Doctrine/Common/Annotations\" />\n        <ignoreFiles>\n            <directory name=\"vendor\" />\n        </ignoreFiles>\n    </projectFiles>\n    <issueHandlers>\n        <NoValue>\n            <errorLevel type=\"suppress\">\n                <file name=\"lib/Doctrine/Common/Annotations/Annotation/Enum.php\" />\n                <file name=\"lib/Doctrine/Common/Annotations/Annotation/Target.php\" />\n            </errorLevel>\n        </NoValue>\n    </issueHandlers>\n</psalm>\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/CachedReadPerformanceWithInMemoryBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Doctrine\\Common\\Annotations\\PsrCachedReader;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Controller;\nuse ReflectionMethod;\nuse Symfony\\Component\\Cache\\Adapter\\ArrayAdapter;\n\n/**\n * @BeforeMethods({\"initialize\"})\n */\nfinal class CachedReadPerformanceWithInMemoryBench\n{\n    /** @var PsrCachedReader */\n    private $reader;\n\n    /** @var ReflectionMethod */\n    private $method;\n\n    public function initialize(): void\n    {\n        $this->reader = new PsrCachedReader(new AnnotationReader(), new ArrayAdapter());\n        $this->method = new ReflectionMethod(Controller::class, 'helloAction');\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function bench(): void\n    {\n        $this->reader->getMethodAnnotations($this->method);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/DocLexerPerformanceBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\DocLexer;\n\n/**\n * @BeforeMethods({\"initializeMethod\", \"initialize\"})\n */\nfinal class DocLexerPerformanceBench\n{\n    use MethodInitializer;\n\n    /** @var DocLexer */\n    private $lexer;\n\n    public function initialize(): void\n    {\n        $this->lexer = new DocLexer();\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function benchMethod(): void\n    {\n        $this->lexer->setInput($this->methodDocBlock);\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function benchClass(): void\n    {\n        $this->lexer->setInput($this->classDocBlock);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/DocParserPerformanceBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\DocParser;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\nuse function array_fill_keys;\n\n/**\n * @BeforeMethods({\"initializeMethod\", \"initialize\"})\n */\nfinal class DocParserPerformanceBench\n{\n    use MethodInitializer;\n\n    private const IMPORTS = [\n        'ignorephpdoc'     => 'Annotations\\Annotation\\IgnorePhpDoc',\n        'ignoreannotation' => 'Annotations\\Annotation\\IgnoreAnnotation',\n        'route'            => Route::class,\n        'template'         => Template::class,\n        '__NAMESPACE__'    => 'Doctrine\\Tests\\Common\\Annotations\\Fixtures',\n    ];\n\n    private const IGNORED = [\n        'access', 'author', 'copyright', 'deprecated', 'example', 'ignore',\n        'internal', 'link', 'see', 'since', 'tutorial', 'version', 'package',\n        'subpackage', 'name', 'global', 'param', 'return', 'staticvar',\n        'static', 'var', 'throws', 'inheritdoc',\n    ];\n\n    /** @var DocParser */\n    private $parser;\n\n    public function initialize(): void\n    {\n        $this->parser = new DocParser();\n\n        $this->parser->setImports(self::IMPORTS);\n        $this->parser->setIgnoredAnnotationNames(array_fill_keys(self::IGNORED, true));\n        $this->parser->setIgnoreNotImportedAnnotations(true);\n    }\n\n    /**\n     * @Revs(200)\n     * @Iterations(5)\n     */\n    public function benchMethodParsing(): void\n    {\n        $this->parser->parse($this->methodDocBlock);\n    }\n\n    /**\n     * @Revs(200)\n     * @Iterations(5)\n     */\n    public function benchClassParsing(): void\n    {\n        $this->parser->parse($this->classDocBlock);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/MethodInitializer.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Controller;\nuse ReflectionMethod;\n\ntrait MethodInitializer\n{\n    /** @var ReflectionMethod */\n    private $method;\n\n    /** @var string */\n    private $methodDocBlock;\n\n    /** @var string */\n    private $classDocBlock;\n\n    public function initializeMethod(): void\n    {\n        $this->method         = new ReflectionMethod(Controller::class, 'helloAction');\n        $this->methodDocBlock = $this->method->getDocComment();\n        $this->classDocBlock  = $this->method->getDeclaringClass()->getDocComment();\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/PhpParserPerformanceWithShortCutBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\PhpParser;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\NamespacedSingleClassLOC1000;\nuse ReflectionClass;\n\n/**\n * @BeforeMethods({\"initialize\"})\n */\nfinal class PhpParserPerformanceWithShortCutBench\n{\n    /** @var ReflectionClass */\n    private $class;\n\n    /** @var PhpParser */\n    private $parser;\n\n    public function initialize(): void\n    {\n        $this->class  = new ReflectionClass(NamespacedSingleClassLOC1000::class);\n        $this->parser = new PhpParser();\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function bench(): void\n    {\n        $this->parser->parseUseStatements($this->class);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/PhpParserPerformanceWithoutShortCutBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\PhpParser;\nuse ReflectionClass;\nuse SingleClassLOC1000;\n\n/**\n * @BeforeMethods({\"initialize\"})\n */\nfinal class PhpParserPerformanceWithoutShortCutBench\n{\n    /** @var ReflectionClass */\n    private $class;\n\n    /** @var PhpParser */\n    private $parser;\n\n    public function initialize(): void\n    {\n        $this->class  = new ReflectionClass(SingleClassLOC1000::class);\n        $this->parser = new PhpParser();\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function bench(): void\n    {\n        $this->parser->parseUseStatements($this->class);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/Annotations/ReadPerformanceBench.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Performance\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\n\n/**\n * @BeforeMethods({\"initializeMethod\", \"initialize\"})\n */\nfinal class ReadPerformanceBench\n{\n    use MethodInitializer;\n\n    /** @var AnnotationReader */\n    private $reader;\n\n    public function initialize(): void\n    {\n        $this->reader = new AnnotationReader();\n    }\n\n    /**\n     * @Revs(500)\n     * @Iterations(5)\n     */\n    public function bench(): void\n    {\n        $this->reader->getMethodAnnotations($this->method);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Performance/Common/bootstrap.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nrequire_once __DIR__ . '/../../../../vendor/autoload.php';\nrequire_once __DIR__ . '/../../Tests/Common/Annotations/Fixtures/Annotation/Route.php';\nrequire_once __DIR__ . '/../../Tests/Common/Annotations/Fixtures/Annotation/Secure.php';\nrequire_once __DIR__ . '/../../Tests/Common/Annotations/Fixtures/Annotation/Template.php';\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\Annotation;\nuse Doctrine\\Common\\Annotations\\AnnotationException;\nuse Doctrine\\Common\\Annotations\\Reader;\nuse Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\nuse ReflectionMethod;\nuse ReflectionProperty;\nuse Test;\nuse TopLevelAnnotation;\n\nuse function class_exists;\nuse function reset;\n\nrequire_once __DIR__ . '/TopLevelAnnotation.php';\n\nabstract class AbstractReaderTest extends TestCase\n{\n    /** @var bool */\n    private $expectException = true;\n\n    final protected function ignoreIssues(): void\n    {\n        $this->expectException = false;\n    }\n\n    public function getReflectionClass(): ReflectionClass\n    {\n        return new ReflectionClass(DummyClass::class);\n    }\n\n    public function testAnnotations(): void\n    {\n        $class  = $this->getReflectionClass();\n        $reader = $this->getReader();\n\n        self::assertCount(1, $reader->getClassAnnotations($class));\n        self::assertInstanceOf(\n            $annotName = DummyAnnotation::class,\n            $annot     = $reader->getClassAnnotation($class, $annotName)\n        );\n        self::assertEquals('hello', $annot->dummyValue);\n\n        $field1Prop = $class->getProperty('field1');\n        $propAnnots = $reader->getPropertyAnnotations($field1Prop);\n        self::assertCount(1, $propAnnots);\n        self::assertInstanceOf($annotName, $annot = $reader->getPropertyAnnotation($field1Prop, $annotName));\n        self::assertEquals('fieldHello', $annot->dummyValue);\n\n        $getField1Method = $class->getMethod('getField1');\n        $methodAnnots    = $reader->getMethodAnnotations($getField1Method);\n        self::assertCount(1, $methodAnnots);\n        self::assertInstanceOf($annotName, $annot = $reader->getMethodAnnotation($getField1Method, $annotName));\n        self::assertEquals([1, 2, 'three'], $annot->value);\n\n        $field2Prop = $class->getProperty('field2');\n        $propAnnots = $reader->getPropertyAnnotations($field2Prop);\n        self::assertCount(1, $propAnnots);\n        self::assertInstanceOf(\n            $annotName      = DummyJoinTable::class,\n            $joinTableAnnot = $reader->getPropertyAnnotation($field2Prop, $annotName)\n        );\n        self::assertCount(1, $joinTableAnnot->joinColumns);\n        self::assertCount(1, $joinTableAnnot->inverseJoinColumns);\n        self::assertInstanceOf(DummyJoinColumn::class, $joinTableAnnot->joinColumns[0]);\n        self::assertInstanceOf(DummyJoinColumn::class, $joinTableAnnot->inverseJoinColumns[0]);\n        self::assertEquals('col1', $joinTableAnnot->joinColumns[0]->name);\n        self::assertEquals('col2', $joinTableAnnot->joinColumns[0]->referencedColumnName);\n        self::assertEquals('col3', $joinTableAnnot->inverseJoinColumns[0]->name);\n        self::assertEquals('col4', $joinTableAnnot->inverseJoinColumns[0]->referencedColumnName);\n\n        $dummyAnnot = $reader->getMethodAnnotation($class->getMethod('getField1'), DummyAnnotation::class);\n        self::assertEquals('', $dummyAnnot->dummyValue);\n        self::assertEquals([1, 2, 'three'], $dummyAnnot->value);\n\n        $dummyAnnot = $reader->getMethodAnnotation($class->getMethod('getField3'), DummyAnnotation::class);\n        self::assertEquals('\\d{4}-[01]\\d-[0-3]\\d [0-2]\\d:[0-5]\\d:[0-5]\\d', $dummyAnnot->value);\n\n        $dummyAnnot = $reader->getPropertyAnnotation($class->getProperty('field1'), DummyAnnotation::class);\n        self::assertEquals('fieldHello', $dummyAnnot->dummyValue);\n\n        $classAnnot = $reader->getClassAnnotation($class, DummyAnnotation::class);\n        self::assertEquals('hello', $classAnnot->dummyValue);\n    }\n\n    public function testAnnotationsWithValidTargets(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithValidAnnotationTarget::class);\n\n        self::assertCount(1, $reader->getClassAnnotations($class));\n        self::assertCount(1, $reader->getPropertyAnnotations($class->getProperty('foo')));\n        self::assertCount(1, $reader->getMethodAnnotations($class->getMethod('someFunction')));\n        self::assertCount(1, $reader->getPropertyAnnotations($class->getProperty('nested')));\n    }\n\n    public function testAnnotationsWithVarType(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithAnnotationWithVarType::class);\n\n        self::assertCount(1, $fooAnnot = $reader->getPropertyAnnotations($class->getProperty('foo')));\n        self::assertCount(1, $barAnnot = $reader->getMethodAnnotations($class->getMethod('bar')));\n\n        self::assertIsString($fooAnnot[0]->string);\n        self::assertInstanceOf(Fixtures\\AnnotationTargetAll::class, $barAnnot[0]->annotation);\n    }\n\n    public function testAtInDescription(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithAtInDescriptionAndAnnotation::class);\n\n        self::assertCount(1, $fooAnnot = $reader->getPropertyAnnotations($class->getProperty('foo')));\n        self::assertCount(1, $barAnnot = $reader->getPropertyAnnotations($class->getProperty('bar')));\n\n        self::assertInstanceOf(Fixtures\\AnnotationTargetPropertyMethod::class, $fooAnnot[0]);\n        self::assertInstanceOf(Fixtures\\AnnotationTargetPropertyMethod::class, $barAnnot[0]);\n    }\n\n    public function testClassWithWithDanglingComma(): void\n    {\n        $reader = $this->getReader();\n        $annots = $reader->getClassAnnotations(new ReflectionClass(DummyClassWithDanglingComma::class));\n\n        self::assertCount(1, $annots);\n    }\n\n    public function testClassWithInvalidAnnotationTargetAtClassDocBlock(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                '[Semantical Error] Annotation @AnnotationTargetPropertyMethod is not allowed to be declared on class' .\n                ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithInvalidAnnotationTargetAtClass.' .\n                ' You may only use this annotation on these code elements: METHOD, PROPERTY'\n            );\n        }\n\n        $reader->getClassAnnotations(new ReflectionClass(Fixtures\\ClassWithInvalidAnnotationTargetAtClass::class));\n    }\n\n    public function testClassWithWithInclude(): void\n    {\n        $reader = $this->getReader();\n        $annots = $reader->getClassAnnotations(new ReflectionClass(Fixtures\\ClassWithRequire::class));\n        self::assertCount(1, $annots);\n    }\n\n    public function testClassWithInvalidAnnotationTargetAtPropertyDocBlock(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                '[Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on property' .\n                ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithInvalidAnnotationTargetAtProperty::$foo. ' .\n                'You may only use this annotation on these code elements: CLASS'\n            );\n        }\n\n        $reader->getPropertyAnnotations(new ReflectionProperty(\n            Fixtures\\ClassWithInvalidAnnotationTargetAtProperty::class,\n            'foo'\n        ));\n    }\n\n    public function testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                '[Semantical Error] Annotation @AnnotationTargetAnnotation is not allowed to be declared on property' .\n                ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithInvalidAnnotationTargetAtProperty::$bar.' .\n                ' You may only use this annotation on these code elements: ANNOTATION'\n            );\n        }\n\n        $reader->getPropertyAnnotations(new ReflectionProperty(\n            Fixtures\\ClassWithInvalidAnnotationTargetAtProperty::class,\n            'bar'\n        ));\n    }\n\n    public function testClassWithInvalidAnnotationTargetAtMethodDocBlock(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                '[Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on method' .\n                ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithInvalidAnnotationTargetAtMethod' .\n                '::functionName(). You may only use this annotation on these code elements: CLASS'\n            );\n        }\n\n        $reader->getMethodAnnotations(new ReflectionMethod(\n            Fixtures\\ClassWithInvalidAnnotationTargetAtMethod::class,\n            'functionName'\n        ));\n    }\n\n    public function testClassWithAnnotationWithTargetSyntaxErrorAtClassDocBlock(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 24\" .\n            ' in class @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError.'\n        );\n        $reader->getClassAnnotations(new ReflectionClass(\n            Fixtures\\ClassWithAnnotationWithTargetSyntaxError::class\n        ));\n    }\n\n    public function testClassWithAnnotationWithTargetSyntaxErrorAtPropertyDocBlock(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 24\" .\n            ' in class @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError.'\n        );\n        $reader->getPropertyAnnotations(new ReflectionProperty(\n            Fixtures\\ClassWithAnnotationWithTargetSyntaxError::class,\n            'foo'\n        ));\n    }\n\n    public function testClassWithAnnotationWithTargetSyntaxErrorAtMethodDocBlock(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 24\" .\n            ' in class @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError.'\n        );\n        $reader->getMethodAnnotations(new ReflectionMethod(\n            Fixtures\\ClassWithAnnotationWithTargetSyntaxError::class,\n            'bar'\n        ));\n    }\n\n    public function testClassWithPropertyInvalidVarTypeError(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithAnnotationWithVarType::class);\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            '[Type Error] Attribute \"string\" of @AnnotationWithVarType declared on property' .\n            ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithAnnotationWithVarType::$invalidProperty' .\n            ' expects a(n) string, but got integer.'\n        );\n        $reader->getPropertyAnnotations($class->getProperty('invalidProperty'));\n    }\n\n    public function testClassWithMethodInvalidVarTypeError(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithAnnotationWithVarType::class);\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            '[Type Error] Attribute \"annotation\" of @AnnotationWithVarType declared' .\n            ' on method Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithAnnotationWithVarType::invalidMethod()' .\n            ' expects a(n) \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll,' .\n            ' but got an instance of Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation.'\n        );\n        $reader->getMethodAnnotations($class->getMethod('invalidMethod'));\n    }\n\n    public function testClassSyntaxErrorContext(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 18\" .\n            ' in class Doctrine\\Tests\\Common\\Annotations\\DummyClassSyntaxError.'\n        );\n        $reader->getClassAnnotations(new ReflectionClass(DummyClassSyntaxError::class));\n    }\n\n    public function testMethodSyntaxErrorContext(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 18\" .\n            ' in method Doctrine\\Tests\\Common\\Annotations\\DummyClassMethodSyntaxError::foo().'\n        );\n        $reader->getMethodAnnotations(new ReflectionMethod(DummyClassMethodSyntaxError::class, 'foo'));\n    }\n\n    public function testPropertySyntaxErrorContext(): void\n    {\n        $reader = $this->getReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')'\" .\n            ' at position 36 in property Doctrine\\Tests\\Common\\Annotations\\DummyClassPropertySyntaxError::$foo.'\n        );\n        $reader->getPropertyAnnotations(new ReflectionProperty(DummyClassPropertySyntaxError::class, 'foo'));\n    }\n\n    /**\n     * @group regression\n     */\n    public function testMultipleAnnotationsOnSameLine(): void\n    {\n        $reader = $this->getReader();\n        $annots = $reader->getPropertyAnnotations(new ReflectionProperty(DummyClass2::class, 'id'));\n        self::assertCount(3, $annots);\n    }\n\n    public function testNonAnnotationProblem(): void\n    {\n        $reader = $this->getReader();\n\n        self::assertNotNull($annot = $reader->getPropertyAnnotation(\n            new ReflectionProperty(DummyClassNonAnnotationProblem::class, 'foo'),\n            $name                  = DummyAnnotation::class\n        ));\n        self::assertInstanceOf($name, $annot);\n    }\n\n    public function testIncludeIgnoreAnnotation(): void\n    {\n        $reader = $this->getReader();\n\n        $reader->getPropertyAnnotations(new ReflectionProperty(Fixtures\\ClassWithIgnoreAnnotation::class, 'foo'));\n        self::assertFalse(class_exists(Fixtures\\IgnoreAnnotationClass::class, false));\n    }\n\n    public function testImportWithConcreteAnnotation(): void\n    {\n        $reader      = $this->getReader();\n        $property    = new ReflectionProperty(TestImportWithConcreteAnnotation::class, 'field');\n        $annotations = $reader->getPropertyAnnotations($property);\n        self::assertCount(1, $annotations);\n        self::assertNotNull($reader->getPropertyAnnotation($property, DummyAnnotation::class));\n    }\n\n    public function testImportWithInheritance(): void\n    {\n        $reader = $this->getReader();\n\n        $class = new TestParentClass();\n        $ref   = new ReflectionClass($class);\n\n        $childAnnotations = $reader->getPropertyAnnotations($ref->getProperty('child'));\n        self::assertCount(1, $childAnnotations);\n        self::assertInstanceOf(Foo\\Name::class, reset($childAnnotations));\n\n        $parentAnnotations = $reader->getPropertyAnnotations($ref->getProperty('parent'));\n        self::assertCount(1, $parentAnnotations);\n        self::assertInstanceOf(Bar\\Name::class, reset($parentAnnotations));\n    }\n\n    public function testImportDetectsNotImportedAnnotation(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                'The annotation \"@NameFoo\" in property' .\n                ' Doctrine\\Tests\\Common\\Annotations\\TestAnnotationNotImportedClass::$field was never imported.'\n            );\n        }\n\n        $reader->getPropertyAnnotations(new ReflectionProperty(TestAnnotationNotImportedClass::class, 'field'));\n    }\n\n    public function testImportDetectsNonExistentAnnotation(): void\n    {\n        $reader = $this->getReader();\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                'The annotation \"@Foo\\Bar\\Name\" in property' .\n                ' Doctrine\\Tests\\Common\\Annotations\\TestNonExistentAnnotationClass::$field was never imported.'\n            );\n        }\n\n        $reader->getPropertyAnnotations(new ReflectionProperty(TestNonExistentAnnotationClass::class, 'field'));\n    }\n\n    public function testTopLevelAnnotation(): void\n    {\n        $reader      = $this->getReader();\n        $annotations = $reader->getPropertyAnnotations(new ReflectionProperty(\n            TestTopLevelAnnotationClass::class,\n            'field'\n        ));\n\n        self::assertCount(1, $annotations);\n        self::assertInstanceOf(TopLevelAnnotation::class, reset($annotations));\n    }\n\n    public function testIgnoresAnnotationsNotPrefixedWithWhitespace(): void\n    {\n        $reader = $this->getReader();\n\n        $annotation = $reader->getClassAnnotation(\n            new ReflectionClass(new TestIgnoresNonAnnotationsClass()),\n            NameBar::class\n        );\n        self::assertInstanceOf(NameBar::class, $annotation);\n    }\n\n    private static $testResetsPhpParserAfterUseRun = false;\n\n    /**\n     * When getUseStatements isn't available on ReflectionClass the PhpParser has to use token_get_all(). If that\n     * happens various PHP compiler globals get set, and these can have seriously bad effects on the next file to be\n     * parsed.\n     * Notably the doc_comment compiler global can end up containing a docblock comment. The next file to be parsed\n     * on an include() will have this docblock comment attached to the first thing in the file that the compiler\n     * considers to own comments. If this is a class then any later calls to getDocComment() for that class will have\n     * undesirable effects. *sigh*\n     */\n    public function testResetsPhpParserAfterUse(): void\n    {\n        // If someone has already included our main test fixture this test is invalid. It's important that our require\n        // causes this file to be parsed and compiled at a certain point.\n        self::assertFalse(! self::$testResetsPhpParserAfterUseRun && class_exists(\n            Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment::class\n        ), 'Test invalid if class has already been compiled');\n        self::$testResetsPhpParserAfterUseRun = true;\n\n        $reader = $this->getReader();\n\n        // First make sure the annotation cache knows about the annotations we want to use.\n        // If we don't do this then loading of annotations into the cache will cause the parser to get out of the bad\n        // state we want to test.\n        $class = new ReflectionClass(Fixtures\\ClassWithValidAnnotationTarget::class);\n        $reader->getClassAnnotations($class);\n\n        // Now import an incredibly dull class which makes use of the same\n        // class level annotation that the previous class does.\n        $class       = new ReflectionClass(Fixtures\\ClassWithClassAnnotationOnly::class);\n        $annotations = $reader->getClassAnnotations($class);\n\n        // This include needs to be here since we need the PHP compiler to run over it as the next thing the PHP\n        // parser sees since PhpParser called token_get_all() on the intro to ClassWithClassAnnotationOnly.\n        // Our test class cannot be in a namespace (some versions of PHP reset the doc_comment compiler global when\n        // you hit a namespace declaration), so cannot be autoloaded.\n        require_once __DIR__ . '/Fixtures/ClassNoNamespaceNoComment.php';\n\n        // So, hopefully, if all has gone OK, our class with class annotations should actually have them.\n        // If this fails then something is quite badly wrong elsewhere.\n        // Note that if this happens before the require it can cause other PHP files to be included, resetting the\n        // compiler global state, and invalidating this test case.\n        self::assertNotEmpty($annotations);\n\n        $annotations = $reader->getClassAnnotations(new ReflectionClass(\n            new Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment()\n        ));\n        // And if our workaround for this bug is OK, our class with no doc\n        // comment should not have any class annotations.\n        self::assertEmpty($annotations);\n    }\n\n    public function testErrorWhenInvalidAnnotationIsUsed(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\InvalidAnnotationUsageClass::class);\n        if ($this->expectException) {\n            $this->expectException(AnnotationException::class);\n            $this->expectExceptionMessage(\n                'The class \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\NoAnnotation\" is not annotated with @Annotation.\nAre you sure this class can be used as annotation?\nIf so, then you need to add @Annotation to the _class_ doc comment of' .\n                ' \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\NoAnnotation\".\nIf it is indeed no annotation, then you need to add @IgnoreAnnotation(\"NoAnnotation\") to the _class_ doc comment' .\n                ' of class Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InvalidAnnotationUsageClass.'\n            );\n        }\n\n        $reader->getClassAnnotations($ref);\n    }\n\n    public function testInvalidAnnotationUsageButIgnoredClass(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\InvalidAnnotationUsageButIgnoredClass::class);\n        $annots = $reader->getClassAnnotations($ref);\n\n        self::assertCount(2, $annots);\n    }\n\n    /**\n     * @group DDC-1660\n     * @group regression\n     */\n    public function testInvalidAnnotationButIgnored(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassDDC1660::class);\n\n        self::assertTrue(class_exists(Fixtures\\Annotation\\Version::class));\n        self::assertEmpty($reader->getClassAnnotations($class));\n        self::assertEmpty($reader->getMethodAnnotations($class->getMethod('bar')));\n        self::assertEmpty($reader->getPropertyAnnotations($class->getProperty('foo')));\n    }\n\n    public function testAnnotationEnumeratorException(): void\n    {\n        $reader = $this->getReader();\n        $class  = new ReflectionClass(Fixtures\\ClassWithAnnotationEnum::class);\n\n        self::assertCount(1, $bar = $reader->getMethodAnnotations($class->getMethod('bar')));\n        self::assertCount(1, $foo = $reader->getPropertyAnnotations($class->getProperty('foo')));\n\n        self::assertInstanceOf(Fixtures\\AnnotationEnum::class, $bar[0]);\n        self::assertInstanceOf(Fixtures\\AnnotationEnum::class, $foo[0]);\n\n        try {\n            $reader->getPropertyAnnotations($class->getProperty('invalidProperty'));\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertEquals(\n                '[Enum Error] Attribute \"value\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnum' .\n                ' declared on property Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithAnnotationEnum' .\n                '::$invalidProperty accepts only [ONE, TWO, THREE], but got FOUR.',\n                $exc->getMessage()\n            );\n        }\n\n        try {\n            $reader->getMethodAnnotations($class->getMethod('invalidMethod'));\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertEquals(\n                '[Enum Error] Attribute \"value\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnum' .\n                ' declared on method Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithAnnotationEnum' .\n                '::invalidMethod() accepts only [ONE, TWO, THREE], but got 5.',\n                $exc->getMessage()\n            );\n        }\n    }\n\n    /**\n     * @group DCOM-106\n     */\n    public function testIgnoreFixMeAndUpperCaseToDo(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(DCOM106::class);\n\n        self::assertEmpty($reader->getClassAnnotations($ref));\n    }\n\n    public function testWillSkipAnnotationsContainingDashes(): void\n    {\n        self::assertEmpty(\n            $this\n                ->getReader()\n                ->getClassAnnotations(new ReflectionClass(\n                    Fixtures\\ClassWithInvalidAnnotationContainingDashes::class\n                ))\n        );\n    }\n\n    public function testWillFailOnAnnotationConstantReferenceContainingDashes(): void\n    {\n        $reader     = $this->getReader();\n        $reflection = new ReflectionClass(Fixtures\\ClassWithAnnotationConstantReferenceWithDashes::class);\n\n        $this->expectExceptionMessage(\n            '[Syntax Error] Expected Doctrine\\Common\\Annotations\\DocLexer::T_CLOSE_PARENTHESIS, got \\'-\\' at'\n            . ' position 14 in class ' . Fixtures\\ClassWithAnnotationConstantReferenceWithDashes::class . '.'\n        );\n\n        $reader->getClassAnnotations($reflection);\n    }\n\n    abstract protected function getReader(): Reader;\n}\n\n/**\n * @parseAnnotation(\"var\")\n */\nclass TestParseAnnotationClass\n{\n    /** @var */\n    public $field;\n}\n\n/**\n * @NameBar\n * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n */\nclass TestIgnoresNonAnnotationsClass\n{\n}\n\nclass TestTopLevelAnnotationClass\n{\n    /**\n     * @var mixed\n     * @\\TopLevelAnnotation\n     */\n    public $field;\n}\n\nclass TestNonExistentAnnotationClass\n{\n    /**\n     * @var mixed\n     * @Foo\\Bar\\Name\n     */\n    public $field;\n}\n\nclass TestAnnotationNotImportedClass\n{\n    /**\n     * @var mixed\n     * @NameFoo\n     */\n    public $field;\n}\n\nclass TestChildClass\n{\n    /**\n     * @var mixed\n     * @\\Doctrine\\Tests\\Common\\Annotations\\Foo\\Name(name = \"foo\")\n     */\n    protected $child;\n}\n\nclass TestParentClass extends TestChildClass\n{\n    /**\n     * @var mixed\n     * @\\Doctrine\\Tests\\Common\\Annotations\\Bar\\Name(name = \"bar\")\n     */\n    public $parent;\n}\n\nclass TestImportWithConcreteAnnotation\n{\n    /**\n     * @var mixed\n     * @DummyAnnotation(dummyValue = \"bar\")\n     */\n    public $field;\n}\n\n/**\n * @ignoreAnnotation(\"var\")\n */\nclass DummyClass2\n{\n    /**\n     * @DummyId\n     * @DummyColumn(type=\"integer\")\n     * @DummyGeneratedValue\n     * @var int\n     */\n    public $id;\n}\n\n/** @Annotation */\nclass NameBar extends Annotation\n{\n}\n/** @Annotation */\nclass DummyId extends Annotation\n{\n}\n/** @Annotation */\nclass DummyColumn extends Annotation\n{\n    /** @var mixed */\n    public $type;\n}\n/** @Annotation */\nclass DummyGeneratedValue extends Annotation\n{\n}\n/** @Annotation */\nclass DummyAnnotation extends Annotation\n{\n    /** @var mixed */\n    public $dummyValue;\n}\n\n/**\n * @Annotation\n */\nclass DummyAnnotationWithIgnoredAnnotation extends Annotation\n{\n    /** @var mixed */\n    public $dummyValue;\n}\n\n/** @Annotation */\nclass DummyJoinColumn extends Annotation\n{\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $referencedColumnName;\n}\n/** @Annotation */\nclass DummyJoinTable extends Annotation\n{\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $joinColumns;\n    /** @var mixed */\n    public $inverseJoinColumns;\n}\n\n/**\n * @DummyAnnotation(dummyValue = \"bar\",)\n */\nclass DummyClassWithDanglingComma\n{\n}\n\n/**\n * @DummyAnnotation(@)\n */\nclass DummyClassSyntaxError\n{\n}\n\nclass DummyClassMethodSyntaxError\n{\n    /**\n     * @DummyAnnotation(@)\n     */\n    public function foo(): void\n    {\n    }\n}\n\nclass DummyClassPropertySyntaxError\n{\n    /**\n     * @var mixed\n     * @DummyAnnotation(@)\n     */\n    public $foo;\n}\n\n/**\n * @ignoreAnnotation({\"since\", \"var\"})\n */\nclass DummyClassNonAnnotationProblem\n{\n    /**\n     * @DummyAnnotation\n     * @var Test\n     */\n    public $foo;\n}\n\n\n/**\n * @DummyAnnotation Foo bar <foobar@1domain.com>\n */\nclass DummyClassWithEmail\n{\n}\n\n\n/**\n * @fixme public\n * @TODO\n */\nclass DCOM106\n{\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Foo;\n\nuse Doctrine\\Common\\Annotations\\Annotation;\n\n/** @Annotation */\nclass Name extends Annotation\n{\n    /** @var mixed */\n    public $name;\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Bar;\n\nuse Doctrine\\Common\\Annotations\\Annotation;\n\n/** @Annotation */\nclass Name extends Annotation\n{\n    /** @var mixed */\n    public $name;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Annotation/TargetTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Annotation;\n\nuse Doctrine\\Common\\Annotations\\Annotation\\Target;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * Tests for {@see \\Doctrine\\Common\\Annotations\\Annotation\\Target}\n *\n * @covers \\Doctrine\\Common\\Annotations\\Annotation\\Target\n */\nclass TargetTest extends TestCase\n{\n    /**\n     * @group DDC-3006\n     */\n    public function testValidMixedTargets(): void\n    {\n        $target = new Target(['value' => ['ALL']]);\n        self::assertEquals(Target::TARGET_ALL, $target->targets);\n\n        $target = new Target(['value' => ['METHOD', 'METHOD']]);\n        self::assertEquals(Target::TARGET_METHOD, $target->targets);\n        self::assertNotEquals(Target::TARGET_PROPERTY, $target->targets);\n\n        $target = new Target(['value' => ['PROPERTY', 'METHOD']]);\n        self::assertEquals(Target::TARGET_METHOD | Target::TARGET_PROPERTY, $target->targets);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Doctrine\\Common\\Annotations\\DocParser;\nuse Doctrine\\Common\\Annotations\\Reader;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\SingleUseAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithEnumProperty;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithEnumAnnotations;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithFullPathUseStatement;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithImportedIgnoredAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithPHPCodeSnifferAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithPhpCsSuppressAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithPHPStanGenericsAnnotations;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces\\AnnotatedAtClassLevel;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces\\AnnotatedAtMethodLevel;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces\\AnnotatedAtPropertyLevel;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces\\AnnotatedWithAlias;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Suit;\nuse InvalidArgumentException;\nuse LogicException;\nuse ReflectionClass;\nuse ReflectionFunction;\n\nuse function class_exists;\nuse function spl_autoload_register;\nuse function spl_autoload_unregister;\n\nuse const PHP_VERSION_ID;\n\nclass AnnotationReaderTest extends AbstractReaderTest\n{\n    /**\n     * @return AnnotationReader\n     */\n    protected function getReader(?DocParser $parser = null): Reader\n    {\n        return new AnnotationReader($parser);\n    }\n\n    public function testMethodAnnotationFromTrait(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassUsesTrait::class);\n\n        $annotations = $reader->getMethodAnnotations($ref->getMethod('someMethod'));\n        self::assertInstanceOf(Bar\\Autoload::class, $annotations[0]);\n\n        $annotations = $reader->getMethodAnnotations($ref->getMethod('traitMethod'));\n        self::assertInstanceOf(Fixtures\\Annotation\\Autoload::class, $annotations[0]);\n    }\n\n    public function testMethodAnnotationFromOverwrittenTrait(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassOverwritesTrait::class);\n\n        $annotations = $reader->getMethodAnnotations($ref->getMethod('traitMethod'));\n        self::assertInstanceOf(Bar2\\Autoload::class, $annotations[0]);\n    }\n\n    public function testPropertyAnnotationFromTrait(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassUsesTrait::class);\n\n        $annotations = $reader->getPropertyAnnotations($ref->getProperty('aProperty'));\n        self::assertInstanceOf(Bar\\Autoload::class, $annotations[0]);\n\n        $annotations = $reader->getPropertyAnnotations($ref->getProperty('traitProperty'));\n        self::assertInstanceOf(Fixtures\\Annotation\\Autoload::class, $annotations[0]);\n    }\n\n    public function testOmitNotRegisteredAnnotation(): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoreNotImportedAnnotations(true);\n\n        $reader = $this->getReader($parser);\n        $ref    = new ReflectionClass(Fixtures\\ClassWithNotRegisteredAnnotationUsed::class);\n\n        $annotations = $reader->getMethodAnnotations($ref->getMethod('methodWithNotRegisteredAnnotation'));\n        self::assertEquals([], $annotations);\n    }\n\n    public function testClassAnnotationSupportsSelfAccessorForConstants(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassWithAnnotationWithSelfConstantReference::class);\n\n        $annotations = $reader->getClassAnnotations($ref);\n\n        self::assertCount(1, $annotations);\n\n        $annotation = $annotations[0];\n        self::assertInstanceOf(Fixtures\\AnnotationWithConstants::class, $annotation);\n        self::assertEquals(\n            $annotation->value,\n            Fixtures\\ClassWithAnnotationWithSelfConstantReference::VALUE_FOR_CLASS\n        );\n    }\n\n    public function testPropertyAnnotationSupportsSelfAccessorForConstants(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassWithAnnotationWithSelfConstantReference::class);\n\n        $classProperty   = $ref->getProperty('classProperty');\n        $classAnnotation = $reader->getPropertyAnnotation($classProperty, Fixtures\\AnnotationWithConstants::class);\n        self::assertNotNull($classAnnotation);\n        self::assertEquals(\n            $classAnnotation->value,\n            Fixtures\\ClassWithAnnotationWithSelfConstantReference::VALUE_FOR_CLASS\n        );\n\n        $traitProperty   = $ref->getProperty('traitProperty');\n        $traitAnnotation = $reader->getPropertyAnnotation($traitProperty, Fixtures\\AnnotationWithConstants::class);\n        self::assertNotNull($traitAnnotation);\n        self::assertEquals(\n            $traitAnnotation->value,\n            Fixtures\\ClassWithAnnotationWithSelfConstantReference::VALUE_FOR_TRAIT\n        );\n    }\n\n    public function testMethodAnnotationSupportsSelfAccessorForConstants(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(Fixtures\\ClassWithAnnotationWithSelfConstantReference::class);\n\n        $classMethod     = $ref->getMethod('classMethod');\n        $classAnnotation = $reader->getMethodAnnotation($classMethod, Fixtures\\AnnotationWithConstants::class);\n        self::assertNotNull($classAnnotation);\n        self::assertEquals(\n            $classAnnotation->value,\n            Fixtures\\ClassWithAnnotationWithSelfConstantReference::VALUE_FOR_CLASS\n        );\n\n        $traitMethod     = $ref->getMethod('traitMethod');\n        $traitAnnotation = $reader->getMethodAnnotation($traitMethod, Fixtures\\AnnotationWithConstants::class);\n        self::assertNotNull($traitAnnotation);\n        self::assertEquals(\n            $traitAnnotation->value,\n            Fixtures\\ClassWithAnnotationWithSelfConstantReference::VALUE_FOR_TRAIT\n        );\n    }\n\n    /**\n     * @group 45\n     * @runInSeparateProcess\n     */\n    public function testClassAnnotationIsIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(AnnotatedAtClassLevel::class);\n\n        $reader::addGlobalIgnoredNamespace('SomeClassAnnotationNamespace');\n\n        self::assertEmpty($reader->getClassAnnotations($ref));\n    }\n\n    /**\n     * @group 45\n     * @runInSeparateProcess\n     */\n    public function testMethodAnnotationIsIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(AnnotatedAtMethodLevel::class);\n\n        $reader::addGlobalIgnoredNamespace('SomeMethodAnnotationNamespace');\n\n        self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('test')));\n    }\n\n    /**\n     * @group 45\n     * @runInSeparateProcess\n     */\n    public function testPropertyAnnotationIsIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(AnnotatedAtPropertyLevel::class);\n\n        $reader::addGlobalIgnoredNamespace('SomePropertyAnnotationNamespace');\n\n        self::assertEmpty($reader->getPropertyAnnotations($ref->getProperty('property')));\n    }\n\n    /**\n     * @group 244\n     * @runInSeparateProcess\n     */\n    public function testAnnotationWithAliasIsIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(AnnotatedWithAlias::class);\n\n        $reader::addGlobalIgnoredNamespace('SomePropertyAnnotationNamespace');\n\n        self::assertEmpty($reader->getPropertyAnnotations($ref->getProperty('property')));\n    }\n\n    public function testClassWithFullPathUseStatement(): void\n    {\n        if (class_exists(SingleUseAnnotation::class, false)) {\n            throw new LogicException(\n                'The SingleUseAnnotation must not be used in other tests for this test to be useful.' .\n                'If the class is already loaded then the code path that finds the class to load is not used and ' .\n                'this test becomes useless.'\n            );\n        }\n\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithFullPathUseStatement::class);\n\n        $annotations = $reader->getClassAnnotations($ref);\n\n        self::assertInstanceOf(SingleUseAnnotation::class, $annotations[0]);\n    }\n\n    public function testPhpCsSuppressAnnotationIsIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithPhpCsSuppressAnnotation::class);\n\n        self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('foo')));\n    }\n\n    public function testGloballyIgnoredAnnotationNotIgnored(): void\n    {\n        $reader     = $this->getReader();\n        $class      = new ReflectionClass(Fixtures\\ClassDDC1660::class);\n        $testLoader = static function (string $className): bool {\n            if ($className === 'since') {\n                throw new InvalidArgumentException(\n                    'Globally ignored annotation names should never be passed to an autoloader.'\n                );\n            }\n\n            return false;\n        };\n        spl_autoload_register($testLoader, true, true);\n        try {\n            self::assertEmpty($reader->getClassAnnotations($class));\n        } finally {\n            spl_autoload_unregister($testLoader);\n        }\n    }\n\n    public function testPHPCodeSnifferAnnotationsAreIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithPHPCodeSnifferAnnotation::class);\n\n        self::assertEmpty($reader->getClassAnnotations($ref));\n    }\n\n    public function testPHPStanGenericsAnnotationsAreIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithPHPStanGenericsAnnotations::class);\n\n        self::assertEmpty($reader->getClassAnnotations($ref));\n        self::assertEmpty($reader->getPropertyAnnotations($ref->getProperty('bar')));\n        self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('foo')));\n\n        $this->expectException('\\Doctrine\\Common\\Annotations\\AnnotationException');\n        $this->expectExceptionMessage(\n            '[Semantical Error] The annotation \"@Template\" in method' .\n            ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithPHPStanGenericsAnnotations' .\n            '::twigTemplateFunctionName() was never imported.'\n        );\n        self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('twigTemplateFunctionName')));\n    }\n\n    public function testImportedIgnoredAnnotationIsStillIgnored(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithImportedIgnoredAnnotation::class);\n\n        self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('something')));\n    }\n\n    public function testFunctionsAnnotation(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionFunction('Doctrine\\Tests\\Common\\Annotations\\Fixtures\\foo');\n\n        $annotations = $reader->getFunctionAnnotations($ref);\n        self::assertCount(1, $annotations);\n        self::assertInstanceOf(Fixtures\\Annotation\\Autoload::class, $annotations[0]);\n    }\n\n    public function testFunctionAnnotation(): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionFunction('Doctrine\\Tests\\Common\\Annotations\\Fixtures\\foo');\n\n        $annotation = $reader->getFunctionAnnotation($ref, Fixtures\\Annotation\\Autoload::class);\n        self::assertInstanceOf(Fixtures\\Annotation\\Autoload::class, $annotation);\n    }\n\n    /**\n     * @requires PHP 8.1\n     * @dataProvider provideEnumProperties\n     */\n    public function testAnnotationWithEnum(string $property, Suit $expectedValue): void\n    {\n        $reader = $this->getReader();\n        $ref    = new ReflectionClass(ClassWithEnumAnnotations::class);\n\n        $annotation = $reader->getPropertyAnnotation($ref->getProperty($property), AnnotationWithEnumProperty::class);\n\n        self::assertSame($expectedValue, $annotation->suit);\n    }\n\n    /**\n     * @return array<string, array{string, Suit}>\n     */\n    public function provideEnumProperties(): array\n    {\n        if (PHP_VERSION_ID < 80100) {\n            return [];\n        }\n\n        return [\n            'annotationWithDefaults' => ['annotationWithDefaults', Suit::Hearts],\n            'annotationWithSpades' => ['annotationWithSpades', Suit::Spades],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/AnnotationRegistryTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\AnnotationRegistry;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\CanBeAutoLoaded;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AnnotationRegistryTest extends TestCase\n{\n    /**\n     * @runInSeparateProcess\n     */\n    public function testClassExistsFallback(): void\n    {\n        AnnotationRegistry::reset();\n\n        self::assertTrue(AnnotationRegistry::loadAnnotationClass(CanBeAutoLoaded::class));\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/AnnotationTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse BadMethodCallException;\nuse Doctrine\\Common\\Annotations\\Annotation;\nuse PHPUnit\\Framework\\TestCase;\n\nuse function sprintf;\n\nfinal class AnnotationTest extends TestCase\n{\n    public function testMagicGetThrowsBadMethodCallException(): void\n    {\n        $name = 'foo';\n\n        $annotation = new Annotation([]);\n\n        $this->expectException(BadMethodCallException::class);\n        $this->expectExceptionMessage(sprintf(\n            \"Unknown property '%s' on annotation '%s'.\",\n            $name,\n            Annotation::class\n        ));\n\n         // @phpstan-ignore-next-line This is expected not to exist\n        $annotation->{$name};\n    }\n\n    public function testMagicSetThrowsBadMethodCallException(): void\n    {\n        $name = 'foo';\n\n        $annotation = new Annotation([]);\n\n        $this->expectException(BadMethodCallException::class);\n        $this->expectExceptionMessage(sprintf(\n            \"Unknown property '%s' on annotation '%s'.\",\n            $name,\n            Annotation::class\n        ));\n\n         // @phpstan-ignore-next-line This is expected not to exist\n        $annotation->{$name} = 9001;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\DocLexer;\nuse Doctrine\\Common\\Lexer\\Token;\nuse PHPUnit\\Framework\\TestCase;\n\nuse function str_repeat;\n\nclass DocLexerTest extends TestCase\n{\n    public function testMarkerAnnotation(): void\n    {\n        $lexer = new DocLexer();\n\n        $lexer->setInput('@Name');\n        self::assertNull($lexer->token);\n        self::assertNull($lexer->lookahead);\n\n        self::assertTrue($lexer->moveNext());\n        self::assertNull($lexer->token);\n        self::assertNotNull($lexer->lookahead);\n        self::assertEquals('@', $lexer->lookahead->value);\n\n        self::assertTrue($lexer->moveNext());\n        self::assertNotNull($lexer->token);\n        self::assertEquals('@', $lexer->token->value);\n        self::assertEquals('Name', $lexer->lookahead->value);\n\n        self::assertFalse($lexer->moveNext());\n    }\n\n    public function testScannerTokenizesDocBlockWhitConstants(): void\n    {\n        $lexer    = new DocLexer();\n        $docblock = '@AnnotationWithConstants(\n            PHP_EOL,\n            ClassWithConstants::SOME_VALUE,\n            ClassWithConstants::CONSTANT_,\n            ClassWithConstants::CONST_ANT3,\n            \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants::SOME_VALUE\n        )';\n\n        $tokens = [\n            [\n                'value'     => '@',\n                'position'  => 0,\n                'type'      => DocLexer::T_AT,\n            ],\n            [\n                'value'     => 'AnnotationWithConstants',\n                'position'  => 1,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => '(',\n                'position'  => 24,\n                'type'      => DocLexer::T_OPEN_PARENTHESIS,\n            ],\n            [\n                'value'     => 'PHP_EOL',\n                'position'  => 38,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => ',',\n                'position'  => 45,\n                'type'      => DocLexer::T_COMMA,\n            ],\n            [\n                'value'     => 'ClassWithConstants::SOME_VALUE',\n                'position'  => 59,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => ',',\n                'position'  => 89,\n                'type'      => DocLexer::T_COMMA,\n            ],\n            [\n                'value'     => 'ClassWithConstants::CONSTANT_',\n                'position'  => 103,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => ',',\n                'position'  => 132,\n                'type'      => DocLexer::T_COMMA,\n            ],\n            [\n                'value'     => 'ClassWithConstants::CONST_ANT3',\n                'position'  => 146,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => ',',\n                'position'  => 176,\n                'type'      => DocLexer::T_COMMA,\n            ],\n            [\n                'value'     => '\\\\Doctrine\\\\Tests\\\\Common\\\\Annotations\\\\Fixtures\\\\InterfaceWithConstants::SOME_VALUE',\n                'position'  => 190,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => ')',\n                'position'  => 277,\n                'type'      => DocLexer::T_CLOSE_PARENTHESIS,\n            ],\n        ];\n\n        $lexer->setInput($docblock);\n\n        foreach ($tokens as $expected) {\n            $lexer->moveNext();\n            $lookahead = $lexer->lookahead;\n            self::assertEquals($expected['value'], $lookahead->value);\n            self::assertEquals($expected['type'], $lookahead->type);\n            self::assertEquals($expected['position'], $lookahead->position);\n        }\n\n        self::assertFalse($lexer->moveNext());\n    }\n\n    public function testScannerTokenizesDocBlockWhitInvalidIdentifier(): void\n    {\n        $lexer    = new DocLexer();\n        $docblock = '@Foo\\3.42';\n\n        $tokens = [\n            [\n                'value'     => '@',\n                'position'  => 0,\n                'type'      => DocLexer::T_AT,\n            ],\n            [\n                'value'     => 'Foo',\n                'position'  => 1,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => '\\\\',\n                'position'  => 4,\n                'type'      => DocLexer::T_NAMESPACE_SEPARATOR,\n            ],\n            [\n                'value'     => 3.42,\n                'position'  => 5,\n                'type'      => DocLexer::T_FLOAT,\n            ],\n        ];\n\n        $lexer->setInput($docblock);\n\n        foreach ($tokens as $expected) {\n            $lexer->moveNext();\n            $lookahead = $lexer->lookahead;\n            self::assertEquals($expected['value'], $lookahead->value);\n            self::assertEquals($expected['type'], $lookahead->type);\n            self::assertEquals($expected['position'], $lookahead->position);\n        }\n\n        self::assertFalse($lexer->moveNext());\n    }\n\n    /**\n     * @group 44\n     */\n    public function testWithinDoubleQuotesVeryVeryLongStringWillNotOverflowPregSplitStackLimit(): void\n    {\n        $lexer = new DocLexer();\n\n        $lexer->setInput('\"' . str_repeat('.', 20240) . '\"');\n\n        self::assertInstanceOf(Token::class, $lexer->glimpse());\n    }\n\n    /**\n     * @group 44\n     */\n    public function testRecognizesDoubleQuotesEscapeSequence(): void\n    {\n        $lexer    = new DocLexer();\n        $docblock = '@Foo(\"\"\"' . \"\\n\" . '\"\"\")';\n\n        $tokens = [\n            [\n                'value'     => '@',\n                'position'  => 0,\n                'type'      => DocLexer::T_AT,\n            ],\n            [\n                'value'     => 'Foo',\n                'position'  => 1,\n                'type'      => DocLexer::T_IDENTIFIER,\n            ],\n            [\n                'value'     => '(',\n                'position'  => 4,\n                'type'      => DocLexer::T_OPEN_PARENTHESIS,\n            ],\n            [\n                'value'     => \"\\\"\\n\\\"\",\n                'position'  => 5,\n                'type'      => DocLexer::T_STRING,\n            ],\n            [\n                'value'     => ')',\n                'position'  => 12,\n                'type'      => DocLexer::T_CLOSE_PARENTHESIS,\n            ],\n        ];\n\n        $lexer->setInput($docblock);\n\n        foreach ($tokens as $expected) {\n            $lexer->moveNext();\n            $lookahead = $lexer->lookahead;\n            self::assertEquals($expected['value'], $lookahead->value);\n            self::assertEquals($expected['type'], $lookahead->type);\n            self::assertEquals($expected['position'], $lookahead->position);\n        }\n\n        self::assertFalse($lexer->moveNext());\n    }\n\n    public function testDoesNotRecognizeFullAnnotationWithDashInIt(): void\n    {\n        $this->expectDocblockTokens(\n            '@foo-bar--',\n            [\n                [\n                    'value'     => '@',\n                    'position'  => 0,\n                    'type'      => DocLexer::T_AT,\n                ],\n                [\n                    'value'     => 'foo',\n                    'position'  => 1,\n                    'type'      => DocLexer::T_IDENTIFIER,\n                ],\n                [\n                    'value'     => '-',\n                    'position'  => 4,\n                    'type'      => DocLexer::T_MINUS,\n                ],\n                [\n                    'value'     => 'bar',\n                    'position'  => 5,\n                    'type'      => DocLexer::T_IDENTIFIER,\n                ],\n                [\n                    'value'     => '-',\n                    'position'  => 8,\n                    'type'      => DocLexer::T_MINUS,\n                ],\n                [\n                    'value'     => '-',\n                    'position'  => 9,\n                    'type'      => DocLexer::T_MINUS,\n                ],\n            ]\n        );\n    }\n\n    public function testRecognizesNegativeNumbers(): void\n    {\n        $this->expectDocblockTokens(\n            '-12.34 -56',\n            [\n                [\n                    'value'     => '-12.34',\n                    'position'  => 0,\n                    'type'      => DocLexer::T_FLOAT,\n                ],\n                [\n                    'value'     => '-56',\n                    'position'  => 7,\n                    'type'      => DocLexer::T_INTEGER,\n                ],\n            ]\n        );\n    }\n\n    /**\n     * @phpstan-param list<array{value: mixed, position: int, type:int}> $expectedTokens\n     */\n    private function expectDocblockTokens(string $docBlock, array $expectedTokens): void\n    {\n        $lexer = new DocLexer();\n        $lexer->setInput($docBlock);\n\n        $actualTokens = [];\n\n        while ($lexer->moveNext()) {\n            $lookahead = $lexer->lookahead;\n\n            $actualTokens[] = [\n                'value' => $lookahead->value,\n                'type' => $lookahead->type,\n                'position' => $lookahead->position,\n            ];\n        }\n\n        self::assertEquals($expectedTokens, $actualTokens);\n    }\n\n    public function testTokenAdjacency(): void\n    {\n        $lexer = new DocLexer();\n\n        $lexer->setInput('-- -');\n\n        self::assertTrue($lexer->nextTokenIsAdjacent());\n        self::assertTrue($lexer->moveNext());\n        self::assertTrue($lexer->nextTokenIsAdjacent());\n        self::assertTrue($lexer->moveNext());\n        self::assertTrue($lexer->nextTokenIsAdjacent());\n        self::assertTrue($lexer->moveNext());\n        self::assertFalse($lexer->nextTokenIsAdjacent());\n        self::assertFalse($lexer->moveNext());\n    }\n\n    public function testItReturnsNullWhenThereIsNothingToParse(): void\n    {\n        self::assertNull((new DocLexer())->peek());\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/DocParserTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\Annotation;\nuse Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor;\nuse Doctrine\\Common\\Annotations\\Annotation\\Target;\nuse Doctrine\\Common\\Annotations\\AnnotationException;\nuse Doctrine\\Common\\Annotations\\DocParser;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithConstants;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants;\nuse InvalidArgumentException;\nuse PHPUnit\\Framework\\Constraint\\ExceptionMessage;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\nuse TypeError;\n\nuse function array_column;\nuse function array_combine;\nuse function assert;\nuse function class_exists;\nuse function extension_loaded;\nuse function get_parent_class;\nuse function ini_get;\nuse function method_exists;\nuse function sprintf;\nuse function ucfirst;\n\nuse const PHP_EOL;\n\nclass DocParserTest extends TestCase\n{\n    public function testNestedArraysWithNestedAnnotation(): void\n    {\n        $parser = $this->createTestParser();\n\n        // Nested arrays with nested annotations\n        $result = $parser->parse('@Name(foo={1,2, {\"key\"=@Name}})');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertNull($annot->value);\n        self::assertCount(3, $annot->foo);\n        self::assertEquals(1, $annot->foo[0]);\n        self::assertEquals(2, $annot->foo[1]);\n        self::assertIsArray($annot->foo[2]);\n\n        $nestedArray = $annot->foo[2];\n        self::assertTrue(isset($nestedArray['key']));\n        self::assertInstanceOf(Name::class, $nestedArray['key']);\n    }\n\n    public function testBasicAnnotations(): void\n    {\n        $parser = $this->createTestParser();\n\n        // Marker annotation\n        $result = $parser->parse('@Name');\n        $annot  = $result[0];\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertNull($annot->value);\n        self::assertNull($annot->foo);\n\n        // Associative arrays\n        $result = $parser->parse('@Name(foo={\"key1\" = \"value1\"})');\n        $annot  = $result[0];\n        self::assertNull($annot->value);\n        self::assertIsArray($annot->foo);\n        self::assertTrue(isset($annot->foo['key1']));\n\n        // Numerical arrays\n        $result = $parser->parse('@Name({2=\"foo\", 4=\"bar\"})');\n        $annot  = $result[0];\n        self::assertIsArray($annot->value);\n        self::assertEquals('foo', $annot->value[2]);\n        self::assertEquals('bar', $annot->value[4]);\n        self::assertFalse(isset($annot->value[0]));\n        self::assertFalse(isset($annot->value[1]));\n        self::assertFalse(isset($annot->value[3]));\n\n        // Multiple values\n        $result = $parser->parse('@Name(@Name, @Name)');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertIsArray($annot->value);\n        self::assertInstanceOf(Name::class, $annot->value[0]);\n        self::assertInstanceOf(Name::class, $annot->value[1]);\n\n        // Positionals arguments following named arguments\n        $result = $parser->parse('@Name(foo=\"bar\", @Name)');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertEquals('bar', $annot->foo);\n        self::assertInstanceOf(Name::class, $annot->value);\n\n        // Multiple positionals arguments following named arguments\n        $result = $parser->parse('@Name(@Name, foo=\"baz\", @Name)');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertEquals('baz', $annot->foo);\n        self::assertIsArray($annot->value);\n        self::assertInstanceOf(Name::class, $annot->value[0]);\n        self::assertInstanceOf(Name::class, $annot->value[1]);\n\n        // Multiple scalar values\n        $result = $parser->parse('@Name(\"foo\", \"bar\")');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertIsArray($annot->value);\n        self::assertEquals('foo', $annot->value[0]);\n        self::assertEquals('bar', $annot->value[1]);\n\n        // Multiple types as values\n        $result = $parser->parse('@Name(foo=\"Bar\", @Name, {\"key1\"=\"value1\", \"key2\"=\"value2\"})');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertIsArray($annot->value);\n        self::assertInstanceOf(Name::class, $annot->value[0]);\n        self::assertIsArray($annot->value[1]);\n        self::assertEquals('value1', $annot->value[1]['key1']);\n        self::assertEquals('value2', $annot->value[1]['key2']);\n\n        // Complete docblock\n        $docblock = <<<'DOCBLOCK'\n/**\n * Some nifty class.\n *\n * @author Mr.X\n * @Name(foo=\"bar\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertEquals('bar', $annot->foo);\n        self::assertNull($annot->value);\n    }\n\n    public function testDefaultValueAnnotations(): void\n    {\n        $parser = $this->createTestParser();\n\n        // Array as first value\n        $result = $parser->parse('@Name({\"key1\"=\"value1\"})');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertIsArray($annot->value);\n        self::assertEquals('value1', $annot->value['key1']);\n\n        // Array as first value and additional values\n        $result = $parser->parse('@Name({\"key1\"=\"value1\"}, foo=\"bar\")');\n        $annot  = $result[0];\n\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertIsArray($annot->value);\n        self::assertEquals('value1', $annot->value['key1']);\n        self::assertEquals('bar', $annot->foo);\n    }\n\n    public function testNamespacedAnnotations(): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoreNotImportedAnnotations(true);\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * Some nifty class.\n *\n * @package foo\n * @subpackage bar\n * @author Mr.X <mr@x.com>\n * @Doctrine\\Tests\\Common\\Annotations\\Name(foo=\"bar\")\n * @ignore\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertEquals('bar', $annot->foo);\n    }\n\n    /**\n     * @group debug\n     */\n    public function testTypicalMethodDocBlock(): void\n    {\n        $parser = $this->createTestParser();\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * Some nifty method.\n *\n * @since 2.0\n * @Doctrine\\Tests\\Common\\Annotations\\Name(foo=\"bar\")\n * @param string $foo This is foo.\n * @param mixed $bar This is bar.\n * @return string Foo and bar.\n * @This is irrelevant\n * @Marker\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(2, $result);\n        self::assertTrue(isset($result[0]));\n        self::assertTrue(isset($result[1]));\n        $annot = $result[0];\n        self::assertInstanceOf(Name::class, $annot);\n        self::assertEquals('bar', $annot->foo);\n        $marker = $result[1];\n        self::assertInstanceOf(Marker::class, $marker);\n    }\n\n    public function testAnnotationWithoutConstructor(): void\n    {\n        $parser = $this->createTestParser();\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(\"Some data\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertInstanceOf(SomeAnnotationClassNameWithoutConstructor::class, $annot);\n\n        self::assertNull($annot->name);\n        self::assertNotNull($annot->data);\n        self::assertEquals($annot->data, 'Some data');\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(name=\"Some Name\", data = \"Some data\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertNotNull($annot);\n        self::assertInstanceOf(SomeAnnotationClassNameWithoutConstructor::class, $annot);\n\n        self::assertEquals($annot->name, 'Some Name');\n        self::assertEquals($annot->data, 'Some data');\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(data = \"Some data\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertEquals($annot->data, 'Some data');\n        self::assertNull($annot->name);\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(name = \"Some name\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertEquals($annot->name, 'Some name');\n        self::assertNull($annot->data);\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(\"Some data\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertEquals($annot->data, 'Some data');\n        self::assertNull($annot->name);\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(\"Some data\",name = \"Some name\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertEquals($annot->name, 'Some name');\n        self::assertEquals($annot->data, 'Some data');\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithoutParams(name = \"Some name\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertEquals($annot->name, 'Some name');\n        self::assertEquals($annot->data, 'Some data');\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructorAndProperties()\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        self::assertInstanceOf(SomeAnnotationClassNameWithoutConstructorAndProperties::class, $result[0]);\n    }\n\n    public function testAnnotationTarget(): void\n    {\n        $parser = new DocParser();\n        $parser->setImports(['__NAMESPACE__' => 'Doctrine\\Tests\\Common\\Annotations\\Fixtures']);\n        $class = new ReflectionClass(Fixtures\\ClassWithValidAnnotationTarget::class);\n\n        $context    = 'class ' . $class->getName();\n        $docComment = $class->getDocComment();\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        self::assertNotNull($parser->parse($docComment, $context));\n\n        $property   = $class->getProperty('foo');\n        $docComment = $property->getDocComment();\n        $context    = 'property ' . $class->getName() . '::$' . $property->getName();\n\n        $parser->setTarget(Target::TARGET_PROPERTY);\n        self::assertNotNull($parser->parse($docComment, $context));\n\n        $method     = $class->getMethod('someFunction');\n        $docComment = $property->getDocComment();\n        $context    = 'method ' . $class->getName() . '::' . $method->getName() . '()';\n\n        $parser->setTarget(Target::TARGET_METHOD);\n        self::assertNotNull($parser->parse($docComment, $context));\n\n        try {\n            $class      = new ReflectionClass(Fixtures\\ClassWithInvalidAnnotationTargetAtClass::class);\n            $context    = 'class ' . $class->getName();\n            $docComment = $class->getDocComment();\n\n            $parser->setTarget(Target::TARGET_CLASS);\n            $parser->parse($docComment, $context);\n\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertNotNull($exc->getMessage());\n        }\n\n        try {\n            $class      = new ReflectionClass(Fixtures\\ClassWithInvalidAnnotationTargetAtMethod::class);\n            $method     = $class->getMethod('functionName');\n            $docComment = $method->getDocComment();\n            $context    = 'method ' . $class->getName() . '::' . $method->getName() . '()';\n\n            $parser->setTarget(Target::TARGET_METHOD);\n            $parser->parse($docComment, $context);\n\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertNotNull($exc->getMessage());\n        }\n\n        try {\n            $class      = new ReflectionClass(Fixtures\\ClassWithInvalidAnnotationTargetAtProperty::class);\n            $property   = $class->getProperty('foo');\n            $docComment = $property->getDocComment();\n            $context    = 'property ' . $class->getName() . '::$' . $property->getName();\n\n            $parser->setTarget(Target::TARGET_PROPERTY);\n            $parser->parse($docComment, $context);\n\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertNotNull($exc->getMessage());\n        }\n    }\n\n    /**\n     * @phpstan-return list<array{string, string}>\n     */\n    public function getAnnotationVarTypeProviderValid()\n    {\n        //({attribute name}, {attribute value})\n         return [\n            // mixed type\n             ['mixed', '\"String Value\"'],\n             ['mixed', 'true'],\n             ['mixed', 'false'],\n             ['mixed', '1'],\n             ['mixed', '1.2'],\n             ['mixed', '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll'],\n\n            // boolean type\n             ['boolean', 'true'],\n             ['boolean', 'false'],\n\n            // alias for internal type boolean\n             ['bool', 'true'],\n             ['bool', 'false'],\n\n            // integer type\n             ['integer', '0'],\n             ['integer', '1'],\n             ['integer', '123456789'],\n             ['integer', '9223372036854775807'],\n\n            // alias for internal type double\n             ['float', '0.1'],\n             ['float', '1.2'],\n             ['float', '123.456'],\n\n            // string type\n             ['string', '\"String Value\"'],\n             ['string', '\"true\"'],\n             ['string', '\"123\"'],\n\n              // array type\n             ['array', '{@AnnotationExtendsAnnotationTargetAll}'],\n             ['array', '{@AnnotationExtendsAnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll}'],\n\n             ['arrayOfIntegers', '1'],\n             ['arrayOfIntegers', '{1}'],\n             ['arrayOfIntegers', '{1,2,3,4}'],\n             ['arrayOfAnnotations', '@AnnotationExtendsAnnotationTargetAll'],\n             ['arrayOfAnnotations', '{@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll}'],\n             [\n                 'arrayOfAnnotations',\n                 '{\n                     @AnnotationExtendsAnnotationTargetAll,\n                     @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll\n                 }',\n             ],\n\n            // annotation instance\n             ['annotation', '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll'],\n             ['annotation', '@AnnotationExtendsAnnotationTargetAll'],\n         ];\n    }\n\n    /**\n     * @phpstan-return list<array{string, string, string, string}>\n     */\n    public function getAnnotationVarTypeProviderInvalid(): array\n    {\n         //({attribute name}, {type declared type}, {attribute value} , {given type or class})\n         return [\n            // boolean type\n             ['boolean','boolean','1','integer'],\n             ['boolean','boolean','1.2','double'],\n             ['boolean','boolean','\"str\"','string'],\n             ['boolean','boolean','{1,2,3}','array'],\n             ['boolean','boolean','@Name', 'an instance of Doctrine\\Tests\\Common\\Annotations\\Name'],\n\n            // alias for internal type boolean\n             ['bool','bool', '1','integer'],\n             ['bool','bool', '1.2','double'],\n             ['bool','bool', '\"str\"','string'],\n             ['bool','bool', '{\"str\"}','array'],\n\n            // integer type\n             ['integer','integer', 'true','boolean'],\n             ['integer','integer', 'false','boolean'],\n             ['integer','integer', '1.2','double'],\n             ['integer','integer', '\"str\"','string'],\n             ['integer','integer', '{\"str\"}','array'],\n             ['integer','integer', '{1,2,3,4}','array'],\n\n            // alias for internal type double\n             ['float','float', 'true','boolean'],\n             ['float','float', 'false','boolean'],\n             ['float','float', '123','integer'],\n             ['float','float', '\"str\"','string'],\n             ['float','float', '{\"str\"}','array'],\n             ['float','float', '{12.34}','array'],\n             ['float','float', '{1,2,3}','array'],\n\n            // string type\n             ['string','string', 'true','boolean'],\n             ['string','string', 'false','boolean'],\n             ['string','string', '12','integer'],\n             ['string','string', '1.2','double'],\n             ['string','string', '{\"str\"}','array'],\n             ['string','string', '{1,2,3,4}','array'],\n\n             // annotation instance\n             ['annotation', AnnotationTargetAll::class, 'true','boolean'],\n             ['annotation', AnnotationTargetAll::class, 'false','boolean'],\n             ['annotation', AnnotationTargetAll::class, '12','integer'],\n             ['annotation', AnnotationTargetAll::class, '1.2','double'],\n             ['annotation', AnnotationTargetAll::class, '{\"str\"}','array'],\n             ['annotation', AnnotationTargetAll::class, '{1,2,3,4}','array'],\n             [\n                 'annotation',\n                 AnnotationTargetAll::class,\n                 '@Name',\n                 'an instance of Doctrine\\Tests\\Common\\Annotations\\Name',\n             ],\n         ];\n    }\n\n    /**\n     * @phpstan-return list<array{string, string, string, string}>\n     */\n    public function getAnnotationVarTypeArrayProviderInvalid()\n    {\n         //({attribute name}, {type declared type}, {attribute value} , {given type or class})\n         return [\n             ['arrayOfIntegers', 'integer', 'true', 'boolean'],\n             ['arrayOfIntegers', 'integer', 'false', 'boolean'],\n             ['arrayOfIntegers', 'integer', '{true,true}', 'boolean'],\n             ['arrayOfIntegers', 'integer', '{1,true}', 'boolean'],\n             ['arrayOfIntegers', 'integer', '{1,2,1.2}', 'double'],\n             ['arrayOfIntegers', 'integer', '{1,2,\"str\"}', 'string'],\n\n             ['arrayOfStrings', 'string', 'true', 'boolean'],\n             ['arrayOfStrings', 'string', 'false', 'boolean'],\n             ['arrayOfStrings', 'string', '{true,true}', 'boolean'],\n             ['arrayOfStrings', 'string', '{\"foo\",true}', 'boolean'],\n             ['arrayOfStrings', 'string', '{\"foo\",\"bar\",1.2}', 'double'],\n             ['arrayOfStrings', 'string', '1', 'integer'],\n\n             ['arrayOfAnnotations', AnnotationTargetAll::class, 'true', 'boolean'],\n             ['arrayOfAnnotations', AnnotationTargetAll::class, 'false', 'boolean'],\n             [\n                 'arrayOfAnnotations',\n                 AnnotationTargetAll::class,\n                 '{@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll,true}',\n                 'boolean',\n             ],\n             [\n                 'arrayOfAnnotations',\n                 AnnotationTargetAll::class,\n                 '{@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll,true}',\n                 'boolean',\n             ],\n             [\n                 'arrayOfAnnotations',\n                 AnnotationTargetAll::class,\n                 '{@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll,1.2}',\n                 'double',\n             ],\n             [\n                 'arrayOfAnnotations',\n                 AnnotationTargetAll::class,\n                 '{\n                     @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll,\n                     @AnnotationExtendsAnnotationTargetAll,\n                     \"str\"\n                 }',\n                 'string',\n             ],\n         ];\n    }\n\n    /**\n     * @dataProvider getAnnotationVarTypeProviderValid\n     */\n    public function testAnnotationWithVarType(string $attribute, string $value): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::$invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        $result = $parser->parse($docblock, $context);\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(Fixtures\\AnnotationWithVarType::class, $result[0]);\n        self::assertNotNull($result[0]->$attribute);\n    }\n\n    /**\n     * @dataProvider getAnnotationVarTypeProviderInvalid\n     */\n    public function testAnnotationWithVarTypeError(\n        string $attribute,\n        string $type,\n        string $value,\n        string $given\n    ): void {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringMatchesFormat(\n                '[Type Error] Attribute \"' . $attribute .\n                '\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n) %A' .\n                $type . ', but got ' . $given . '.',\n                $exc->getMessage()\n            );\n        }\n    }\n\n    /**\n     * @dataProvider getAnnotationVarTypeArrayProviderInvalid\n     */\n    public function testAnnotationWithVarTypeArrayError(\n        string $attribute,\n        string $type,\n        string $value,\n        string $given\n    ): void {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringMatchesFormat(\n                '[Type Error] Attribute \"' . $attribute .\n                '\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType' .\n                ' declared on property SomeClassName::invalidProperty. expects either a(n) %A' .\n                $type . ', or an array of %A' . $type . 's, but got ' . $given . '.',\n                $exc->getMessage()\n            );\n        }\n    }\n\n    /**\n     * @dataProvider getAnnotationVarTypeProviderValid\n     */\n    public function testAnnotationWithAttributes(string $attribute, string $value): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::$invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        $result = $parser->parse($docblock, $context);\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(Fixtures\\AnnotationWithAttributes::class, $result[0]);\n        $getter = 'get' . ucfirst($attribute);\n        self::assertNotNull($result[0]->$getter());\n    }\n\n   /**\n    * @dataProvider getAnnotationVarTypeProviderInvalid\n    */\n    public function testAnnotationWithAttributesError(\n        string $attribute,\n        string $type,\n        string $value,\n        string $given\n    ): void {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(sprintf(\n                '[Type Error] Attribute \"%s\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n) %s, but got %s.',\n                $attribute,\n                $type,\n                $given\n            ), $exc->getMessage());\n        }\n    }\n\n   /**\n    * @dataProvider getAnnotationVarTypeArrayProviderInvalid\n    */\n    public function testAnnotationWithAttributesWithVarTypeArrayError(\n        string $attribute,\n        string $type,\n        string $value,\n        string $given\n    ): void {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = sprintf(\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes(%s = %s)',\n            $attribute,\n            $value\n        );\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(sprintf(\n                '[Type Error] Attribute \"%s\" of' .\n                ' @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes declared' .\n                ' on property SomeClassName::invalidProperty. expects either a(n) %s, or an array of %ss, but got %s.',\n                $attribute,\n                $type,\n                $type,\n                $given\n            ), $exc->getMessage());\n        }\n    }\n\n    public function testAnnotationWithRequiredAttributes(): void\n    {\n        $parser  = $this->createTestParser();\n        $context = 'property SomeClassName::invalidProperty.';\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributes' .\n            '(\"Some Value\", annot = @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation)';\n        $result   = $parser->parse($docblock);\n\n        self::assertCount(1, $result);\n\n        $annotation = $result[0];\n        assert($annotation instanceof Fixtures\\AnnotationWithRequiredAttributes);\n\n        self::assertInstanceOf(Fixtures\\AnnotationWithRequiredAttributes::class, $annotation);\n        self::assertEquals('Some Value', $annotation->getValue());\n        self::assertInstanceOf(Fixtures\\AnnotationTargetAnnotation::class, $annotation->getAnnot());\n\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributes(\"Some Value\")';\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(\n                'Attribute \"annot\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributes' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n)' .\n                ' Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation.' .\n                ' This value should not be null.',\n                $exc->getMessage()\n            );\n        }\n\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributes' .\n            '(annot = @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation)';\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(\n                'Attribute \"value\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributes' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n) string.' .\n                ' This value should not be null.',\n                $exc->getMessage()\n            );\n        }\n    }\n\n    public function testAnnotationWithRequiredAttributesWithoutConstructor(): void\n    {\n        $parser  = $this->createTestParser();\n        $context = 'property SomeClassName::invalidProperty.';\n        $parser->setTarget(Target::TARGET_PROPERTY);\n\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor' .\n            '(\"Some Value\", annot = @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation)';\n        $result   = $parser->parse($docblock);\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor::class, $result[0]);\n        self::assertEquals('Some Value', $result[0]->value);\n        self::assertInstanceOf(Fixtures\\AnnotationTargetAnnotation::class, $result[0]->annot);\n\n        $docblock = <<<'ANNOTATION'\n@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor(\"Some Value\")\nANNOTATION;\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(\n                'Attribute \"annot\" of' .\n                ' @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n)' .\n                ' \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation.' .\n                ' This value should not be null.',\n                $exc->getMessage()\n            );\n        }\n\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor' .\n        '(annot = @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation)';\n        try {\n            $parser->parse($docblock, $context);\n            $this->fail();\n        } catch (AnnotationException $exc) {\n            self::assertStringContainsString(\n                'Attribute \"value\" of' .\n                ' @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithRequiredAttributesWithoutConstructor' .\n                ' declared on property SomeClassName::invalidProperty. expects a(n) string.' .\n                ' This value should not be null.',\n                $exc->getMessage()\n            );\n        }\n    }\n\n    public function testAnnotationEnumeratorException(): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnum(\"FOUR\")';\n\n        $parser->setIgnoreNotImportedAnnotations(false);\n        $parser->setTarget(Target::TARGET_PROPERTY);\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            'Attribute \"value\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnum declared' .\n            ' on property SomeClassName::invalidProperty. accepts only [ONE, TWO, THREE], but got FOUR.'\n        );\n        $parser->parse($docblock, $context);\n    }\n\n    public function testAnnotationEnumeratorLiteralException(): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnumLiteral(4)';\n\n        $parser->setIgnoreNotImportedAnnotations(false);\n        $parser->setTarget(Target::TARGET_PROPERTY);\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            'Attribute \"value\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnumLiteral declared' .\n            ' on property SomeClassName::invalidProperty. accepts only' .\n            ' [AnnotationEnumLiteral::ONE, AnnotationEnumLiteral::TWO, AnnotationEnumLiteral::THREE], but got 4.'\n        );\n        $parser->parse($docblock, $context);\n    }\n\n    public function testAnnotationEnumInvalidTypeDeclarationException(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnumInvalid(\"foo\")';\n\n        $parser->setIgnoreNotImportedAnnotations(false);\n        $this->expectException(AnnotationException::class);\n        try {\n            $parser->parse($docblock);\n        } catch (AnnotationException $exc) {\n            $previous = $exc->getPrevious();\n            $this->assertInstanceOf(InvalidArgumentException::class, $previous);\n            $this->assertThat($previous, new ExceptionMessage('@Enum supports only scalar values \"array\" given.'));\n\n            throw $exc;\n        }\n    }\n\n    public function testAnnotationEnumInvalidLiteralDeclarationException(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnumLiteralInvalid(\"foo\")';\n\n        $parser->setIgnoreNotImportedAnnotations(false);\n        $this->expectException(AnnotationException::class);\n        try {\n            $parser->parse($docblock);\n        } catch (AnnotationException $exc) {\n            $previous = $exc->getPrevious();\n            $this->assertInstanceOf(InvalidArgumentException::class, $previous);\n            $this->assertThat(\n                $previous,\n                new ExceptionMessage('Undefined enumerator value \"3\" for literal \"AnnotationEnumLiteral::THREE\".')\n            );\n\n            throw $exc;\n        }\n    }\n\n    /**\n     * @phpstan-return array<string, array{string, mixed}>\n     */\n    public function getConstantsProvider(): array\n    {\n        $provider   = [];\n        $provider[] = [\n            '@AnnotationWithConstants(PHP_EOL)',\n            PHP_EOL,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(AnnotationWithConstants::INTEGER)',\n            AnnotationWithConstants::INTEGER,\n        ];\n        $provider[] = [\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants(AnnotationWithConstants::STRING)',\n            AnnotationWithConstants::STRING,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants::FLOAT)',\n            AnnotationWithConstants::FLOAT,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(ClassWithConstants::SOME_VALUE)',\n            ClassWithConstants::SOME_VALUE,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(ClassWithConstants::OTHER_KEY_)',\n            ClassWithConstants::OTHER_KEY_,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(ClassWithConstants::OTHER_KEY_2)',\n            ClassWithConstants::OTHER_KEY_2,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithConstants::SOME_VALUE)',\n            ClassWithConstants::SOME_VALUE,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(InterfaceWithConstants::SOME_VALUE)',\n            InterfaceWithConstants::SOME_VALUE,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(\\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants::SOME_VALUE)',\n            InterfaceWithConstants::SOME_VALUE,\n        ];\n        $provider[] = [<<<'ANNOTATION'\n@AnnotationWithConstants({\n    AnnotationWithConstants::STRING,\n    AnnotationWithConstants::INTEGER,\n    AnnotationWithConstants::FLOAT\n})\nANNOTATION\n,\n            [AnnotationWithConstants::STRING, AnnotationWithConstants::INTEGER, AnnotationWithConstants::FLOAT],\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants({\n                AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER\n             })',\n            [AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER],\n        ];\n        $provider[] = [<<<'ANNOTATION'\n@AnnotationWithConstants({\n    Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER\n})\nANNOTATION\n,\n            [InterfaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER],\n        ];\n        $provider[] = [<<<'ANNOTATION'\n@AnnotationWithConstants({\n    \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER\n})\nANNOTATION\n,\n            [InterfaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER],\n        ];\n        $provider[] = [<<<'ANNOTATION'\n@AnnotationWithConstants({\n    AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER,\n    ClassWithConstants::SOME_KEY = ClassWithConstants::SOME_VALUE,\n    Doctrine\\Tests\\Common\\Annotations\\Fixtures\\InterfaceWithConstants::SOME_KEY = InterfaceWithConstants::SOME_VALUE\n})\nANNOTATION\n,\n            [\n                AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER,\n                ClassWithConstants::SOME_KEY    => ClassWithConstants::SOME_VALUE,\n                InterfaceWithConstants::SOME_KEY    => InterfaceWithConstants::SOME_VALUE,\n            ],\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(AnnotationWithConstants::class)',\n            AnnotationWithConstants::class,\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants({AnnotationWithConstants::class = AnnotationWithConstants::class})',\n            [AnnotationWithConstants::class => AnnotationWithConstants::class],\n        ];\n        $provider[] = [\n            '@AnnotationWithConstants(Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants::class)',\n            AnnotationWithConstants::class,\n        ];\n        $provider[] = [\n            '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants' .\n            '(Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants::class)',\n            AnnotationWithConstants::class,\n        ];\n\n        return array_combine(array_column($provider, 0), $provider);\n    }\n\n    /**\n     * @param mixed $expected\n     *\n     * @dataProvider getConstantsProvider\n     */\n    public function testSupportClassConstants(string $docblock, $expected): void\n    {\n        $parser = $this->createTestParser();\n        $parser->setImports([\n            'classwithconstants'        => ClassWithConstants::class,\n            'interfacewithconstants'    => InterfaceWithConstants::class,\n            'annotationwithconstants'   => AnnotationWithConstants::class,\n        ]);\n\n        $result = $parser->parse($docblock);\n        self::assertInstanceOf(AnnotationWithConstants::class, $annotation = $result[0]);\n        self::assertEquals($expected, $annotation->value);\n    }\n\n    public function testWithoutConstructorWhenIsNotDefaultValue(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructorAndProperties(\"Foo\")\n */\nDOCBLOCK;\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            'The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on ' .\n            ' does not accept any values, but got {\"value\":\"Foo\"}.'\n        );\n        $parser->parse($docblock);\n    }\n\n    public function testWithoutConstructorWhenHasNoProperties(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructorAndProperties(value = \"Foo\")\n */\nDOCBLOCK;\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            'The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on ' .\n            ' does not accept any values, but got {\"value\":\"Foo\"}.'\n        );\n        $parser->parse($docblock);\n    }\n\n    public function testAnnotationTargetSyntaxError(): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'class SomeClassName';\n        $docblock = <<<'DOCBLOCK'\n/**\n * @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError()\n */\nDOCBLOCK;\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected namespace separator or identifier, got ')' at position 24\" .\n            ' in class @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError.'\n        );\n        $parser->parse($docblock, $context);\n    }\n\n    public function testAnnotationWithInvalidTargetDeclarationError(): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'class SomeClassName';\n        $docblock = <<<'DOCBLOCK'\n/**\n * @AnnotationWithInvalidTargetDeclaration()\n */\nDOCBLOCK;\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        $this->expectException(AnnotationException::class);\n        try {\n            $parser->parse($docblock, $context);\n        } catch (AnnotationException $exc) {\n            $previous = $exc->getPrevious();\n            $this->assertInstanceOf(InvalidArgumentException::class, $previous);\n            $this->assertThat(\n                $previous,\n                new ExceptionMessage(\n                    'Invalid Target \"Foo\". Available targets: [ALL, CLASS, METHOD, PROPERTY, FUNCTION, ANNOTATION]'\n                )\n            );\n\n            throw $exc;\n        }\n    }\n\n    public function testAnnotationWithTargetEmptyError(): void\n    {\n        $parser   = $this->createTestParser();\n        $context  = 'class SomeClassName';\n        $docblock = <<<'DOCBLOCK'\n/**\n * @AnnotationWithTargetEmpty()\n */\nDOCBLOCK;\n\n        $parser->setTarget(Target::TARGET_CLASS);\n        $this->expectException(AnnotationException::class);\n        try {\n            $parser->parse($docblock, $context);\n        } catch (AnnotationException $exc) {\n            $previous = $exc->getPrevious();\n            $this->assertInstanceOf(InvalidArgumentException::class, $previous);\n            $this->assertThat(\n                $previous,\n                new ExceptionMessage('@Target expects either a string value, or an array of strings, \"NULL\" given.')\n            );\n\n            throw $exc;\n        }\n    }\n\n    /**\n     * @group DDC-575\n     */\n    public function testRegressionDDC575(): void\n    {\n        $parser = $this->createTestParser();\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @Name\n *\n * Will trigger error.\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n\n        self::assertInstanceOf(Name::class, $result[0]);\n\n        $docblock = <<<'DOCBLOCK'\n/**\n * @Name\n * @Marker\n *\n * Will trigger error.\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n\n        self::assertInstanceOf(Name::class, $result[0]);\n    }\n\n    /**\n     * @group DDC-77\n     */\n    public function testAnnotationWithoutClassIsIgnoredWithoutWarning(): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoreNotImportedAnnotations(true);\n        $result = $parser->parse('@param');\n\n        self::assertEmpty($result);\n    }\n\n    /**\n     * Tests if it's possible to ignore whole namespaces\n     *\n     * @param string $ignoreAnnotationName annotation/namespace to ignore\n     * @param string $input                annotation/namespace from the docblock\n     *\n     * @dataProvider provideTestIgnoreWholeNamespaces\n     * @group 45\n     */\n    public function testIgnoreWholeNamespaces($ignoreAnnotationName, $input): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoredAnnotationNamespaces([$ignoreAnnotationName => true]);\n        $result = $parser->parse($input);\n\n        self::assertEmpty($result);\n    }\n\n    /**\n     * @phpstan-return list<array{string, string}>\n     */\n    public function provideTestIgnoreWholeNamespaces(): array\n    {\n        return [\n            ['Namespace', '@Namespace'],\n            ['Namespace\\\\', '@Namespace'],\n\n            ['Namespace', '@Namespace\\Subnamespace'],\n            ['Namespace\\\\', '@Namespace\\Subnamespace'],\n\n            ['Namespace', '@Namespace\\Subnamespace\\SubSubNamespace'],\n            ['Namespace\\\\', '@Namespace\\Subnamespace\\SubSubNamespace'],\n\n            ['Namespace\\Subnamespace', '@Namespace\\Subnamespace'],\n            ['Namespace\\Subnamespace\\\\', '@Namespace\\Subnamespace'],\n\n            ['Namespace\\Subnamespace', '@Namespace\\Subnamespace\\SubSubNamespace'],\n            ['Namespace\\Subnamespace\\\\', '@Namespace\\Subnamespace\\SubSubNamespace'],\n\n            ['Namespace\\Subnamespace\\SubSubNamespace', '@Namespace\\Subnamespace\\SubSubNamespace'],\n            ['Namespace\\Subnamespace\\SubSubNamespace\\\\', '@Namespace\\Subnamespace\\SubSubNamespace'],\n        ];\n    }\n\n    /**\n     * @group DCOM-168\n     */\n    public function testNotAnAnnotationClassIsIgnoredWithoutWarning(): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoredAnnotationNames([TestCase::class => true]);\n        $result = $parser->parse('@\\PHPUnit\\Framework\\TestCase');\n\n        self::assertEmpty($result);\n    }\n\n    public function testNotAnAnnotationClassIsIgnoredWithoutWarningWithoutCheating(): void\n    {\n        $parser = new DocParser();\n        $parser->setIgnoreNotImportedAnnotations(true);\n        $result = $parser->parse('@\\PHPUnit\\Framework\\TestCase');\n\n        self::assertEmpty($result);\n    }\n\n    public function testAnnotationDontAcceptSingleQuotes(): void\n    {\n        $parser = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\"Expected PlainValue, got ''' at position 10.\");\n        $parser->parse(\"@Name(foo='bar')\");\n    }\n\n    /**\n     * @group DCOM-41\n     */\n    public function testAnnotationDoesntThrowExceptionWhenAtSignIsNotFollowedByIdentifier(): void\n    {\n        $parser = new DocParser();\n        $result = $parser->parse(\"'@'\");\n\n        self::assertEmpty($result);\n    }\n\n    /**\n     * @group DCOM-41\n     */\n    public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifierInNestedAnnotation(): void\n    {\n        $parser = new DocParser();\n        $this->expectException(AnnotationException::class);\n        $parser->parse(\"@Doctrine\\Tests\\Common\\Annotations\\Name(@')\");\n    }\n\n    /**\n     * @group DCOM-56\n     */\n    public function testAutoloadAnnotation(): void\n    {\n        self::assertFalse(\n            class_exists('Doctrine\\Tests\\Common\\Annotations\\Fixture\\Annotation\\Autoload', false),\n            'Pre-condition: Doctrine\\Tests\\Common\\Annotations\\Fixture\\Annotation\\Autoload not allowed to be loaded.'\n        );\n\n        $parser = new DocParser();\n\n        $parser->setImports([\n            'autoload' => Fixtures\\Annotation\\Autoload::class,\n        ]);\n        $annotations = $parser->parse('@Autoload');\n\n        self::assertCount(1, $annotations);\n        self::assertInstanceOf(Fixtures\\Annotation\\Autoload::class, $annotations[0]);\n    }\n\n    public function createTestParser(): DocParser\n    {\n        $parser = new DocParser();\n        $parser->setIgnoreNotImportedAnnotations(true);\n        $parser->setImports([\n            'name' => Name::class,\n            '__NAMESPACE__' => 'Doctrine\\Tests\\Common\\Annotations',\n        ]);\n\n        return $parser;\n    }\n\n    /**\n     * @group DDC-78\n     */\n    public function testSyntaxErrorWithContextDescription(): void\n    {\n        $parser = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            \"Expected PlainValue, got ''' at position 10 in class \\Doctrine\\Tests\\Common\\Annotations\\Name\"\n        );\n        $parser->parse(\"@Name(foo='bar')\", 'class \\Doctrine\\Tests\\Common\\Annotations\\Name');\n    }\n\n    /**\n     * @group DDC-183\n     */\n    public function testSyntaxErrorWithUnknownCharacters(): void\n    {\n        $docblock = <<<'DOCBLOCK'\n/**\n * @test at.\n */\nclass A {\n}\nDOCBLOCK;\n\n        //$lexer = new \\Doctrine\\Common\\Annotations\\Lexer();\n        //$lexer->setInput(trim($docblock, '/ *'));\n        //var_dump($lexer);\n\n        try {\n            $parser = $this->createTestParser();\n            self::assertEmpty($parser->parse($docblock));\n        } catch (AnnotationException $e) {\n            $this->fail($e->getMessage());\n        }\n    }\n\n    /**\n     * @group DCOM-14\n     */\n    public function testIgnorePHPDocThrowTag(): void\n    {\n        $docblock = <<<'DOCBLOCK'\n/**\n * @throws \\RuntimeException\n */\nclass A {\n}\nDOCBLOCK;\n\n        try {\n            $parser = $this->createTestParser();\n            self::assertEmpty($parser->parse($docblock));\n        } catch (AnnotationException $e) {\n            $this->fail($e->getMessage());\n        }\n    }\n\n    /**\n     * @group DCOM-38\n     */\n    public function testCastInt(): void\n    {\n        $parser = $this->createTestParser();\n\n        $result = $parser->parse('@Name(foo=1234)');\n        $annot  = $result[0];\n        self::assertIsInt($annot->foo);\n    }\n\n    /**\n     * @group DCOM-38\n     */\n    public function testCastNegativeInt(): void\n    {\n        $parser = $this->createTestParser();\n\n        $result = $parser->parse('@Name(foo=-1234)');\n        $annot  = $result[0];\n        self::assertIsInt($annot->foo);\n    }\n\n    /**\n     * @group DCOM-38\n     */\n    public function testCastFloat(): void\n    {\n        $parser = $this->createTestParser();\n\n        $result = $parser->parse('@Name(foo=1234.345)');\n        $annot  = $result[0];\n        self::assertIsFloat($annot->foo);\n    }\n\n    /**\n     * @group DCOM-38\n     */\n    public function testCastNegativeFloat(): void\n    {\n        $parser = $this->createTestParser();\n\n        $result = $parser->parse('@Name(foo=-1234.345)');\n        $annot  = $result[0];\n        self::assertIsFloat($annot->foo);\n\n        $result = $parser->parse('@Marker(-1234.345)');\n        $annot  = $result[0];\n        self::assertIsFloat($annot->value);\n    }\n\n    public function testSetValuesException(): void\n    {\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationClassNameWithoutConstructor(invalidaProperty = \"Some val\")\n */\nDOCBLOCK;\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            '[Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared' .\n            ' on some class does not have a property named \"invalidaProperty\".\nAvailable properties: data, name'\n        );\n        $this->createTestParser()->parse($docblock, 'some class');\n    }\n\n    public function testInvalidIdentifierInAnnotation(): void\n    {\n        $parser = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage('[Syntax Error] Expected Doctrine\\Common\\Annotations\\DocLexer::T_IDENTIFIER' .\n            ' or Doctrine\\Common\\Annotations\\DocLexer::T_TRUE' .\n            ' or Doctrine\\Common\\Annotations\\DocLexer::T_FALSE' .\n            \" or Doctrine\\Common\\Annotations\\DocLexer::T_NULL, got '3.42' at position 5.\");\n        $parser->parse('@Foo\\3.42');\n    }\n\n    public function testTrailingCommaIsAllowed(): void\n    {\n        $parser = $this->createTestParser();\n\n        $annots = $parser->parse('@Name({\n            \"Foo\",\n            \"Bar\",\n        })');\n        self::assertCount(1, $annots);\n        self::assertEquals(['Foo', 'Bar'], $annots[0]->value);\n    }\n\n    public function testTabPrefixIsAllowed(): void\n    {\n        $docblock = <<<'DOCBLOCK'\n/**\n *\t@Name\n */\nDOCBLOCK;\n\n        $parser = $this->createTestParser();\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        self::assertInstanceOf(Name::class, $result[0]);\n    }\n\n    public function testDefaultAnnotationValueIsNotOverwritten(): void\n    {\n        $parser = $this->createTestParser();\n\n        $annots = $parser->parse('@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\AnnotWithDefaultValue');\n        self::assertCount(1, $annots);\n        self::assertEquals('bar', $annots[0]->foo);\n    }\n\n    public function testArrayWithColon(): void\n    {\n        $parser = $this->createTestParser();\n\n        $annots = $parser->parse('@Name({\"foo\": \"bar\"})');\n        self::assertCount(1, $annots);\n        self::assertEquals(['foo' => 'bar'], $annots[0]->value);\n    }\n\n    public function testInvalidContantName(): void\n    {\n        $parser = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\"[Semantical Error] Couldn't find constant foo.\");\n        $parser->parse('@Name(foo: \"bar\")');\n    }\n\n    /**\n     * Tests parsing empty arrays.\n     */\n    public function testEmptyArray(): void\n    {\n        $parser = $this->createTestParser();\n\n        $annots = $parser->parse('@Name({\"foo\": {}})');\n        self::assertCount(1, $annots);\n        self::assertEquals(['foo' => []], $annots[0]->value);\n    }\n\n    public function testKeyHasNumber(): void\n    {\n        $parser = $this->createTestParser();\n        $annots = $parser->parse('@SettingsAnnotation(foo=\"test\", bar2=\"test\")');\n\n        self::assertCount(1, $annots);\n        self::assertEquals(['foo' => 'test', 'bar2' => 'test'], $annots[0]->settings);\n    }\n\n    /**\n     * @group 44\n     */\n    public function testSupportsEscapedQuotedValues(): void\n    {\n        $result = $this->createTestParser()->parse('@Doctrine\\Tests\\Common\\Annotations\\Name(foo=\"\"\"bar\"\"\")');\n\n        self::assertCount(1, $result);\n\n        self::assertInstanceOf(Name::class, $result[0]);\n        self::assertEquals('\"bar\"', $result[0]->foo);\n    }\n\n    /**\n     * @see http://php.net/manual/en/mbstring.configuration.php\n     * mbstring.func_overload can be changed only in php.ini\n     * so for testing this case instead of skipping it you need to manually configure your php installation\n     */\n    public function testMultiByteAnnotation(): void\n    {\n        $overloadStringFunctions = 2;\n        if (! extension_loaded('mbstring') || (ini_get('mbstring.func_overload') & $overloadStringFunctions) === 0) {\n            $this->markTestSkipped('This test requires mbstring function overloading is turned on');\n        }\n\n        $docblock = <<<'DOCBLOCK'\n        /**\n         * Мультибайтовый текст ломал парсер при оверлоадинге строковых функций\n         * @Doctrine\\Tests\\Common\\Annotations\\Name\n         */\nDOCBLOCK;\n\n        $docParser = $this->createTestParser();\n        $result    = $docParser->parse($docblock);\n\n        self::assertCount(1, $result);\n    }\n\n    public function testWillNotParseAnnotationSucceededByAnImmediateDash(): void\n    {\n        $parser = $this->createTestParser();\n\n        self::assertEmpty($parser->parse('@SomeAnnotationClassNameWithoutConstructorAndProperties-'));\n    }\n\n    public function testWillParseAnnotationSucceededByANonImmediateDash(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('@SomeAnnotationClassNameWithoutConstructorAndProperties -');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(SomeAnnotationClassNameWithoutConstructorAndProperties::class, $result[0]);\n    }\n\n    public function testNamedArgumentsConstructorAnnotation(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @AnotherNamedAnnotation(foo=\"baz\", bar=2222) */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(AnotherNamedAnnotation::class, $result[0]);\n        self::assertSame('baz', $result[0]->getFoo());\n        self::assertSame(2222, $result[0]->getBar());\n    }\n\n    public function testNamedReorderedArgumentsConstructorAnnotation(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @AnotherNamedAnnotation(bar=2222, foo=\"baz\") */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(AnotherNamedAnnotation::class, $result[0]);\n        self::assertSame('baz', $result[0]->getFoo());\n        self::assertSame(2222, $result[0]->getBar());\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithDefaultValue(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @AnotherNamedAnnotation(foo=\"baz\") */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(AnotherNamedAnnotation::class, $result[0]);\n        self::assertSame('baz', $result[0]->getFoo());\n        self::assertSame(1234, $result[0]->getBar());\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithDefaultProperty(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @AnotherNamedAnnotation(\"baz\") */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(AnotherNamedAnnotation::class, $result[0]);\n        self::assertSame('baz', $result[0]->getFoo());\n        self::assertSame(1234, $result[0]->getBar());\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithExtraArguments(): void\n    {\n        $docParser = $this->createTestParser();\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/does not have a property named \"invalid\"\\s.*\\sAvailable named arguments: foo, bar/'\n        );\n\n        $docParser->parse('/** @AnotherNamedAnnotation(foo=\"baz\", invalid=\"uh oh\") */');\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithDefaultPropertyAsArray(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @NamedAnnotationWithArray({\"foo\",\"bar\",\"baz\"},bar=567) */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(NamedAnnotationWithArray::class, $result[0]);\n        self::assertSame(['foo', 'bar', 'baz'], $result[0]->getFoo());\n        self::assertSame(567, $result[0]->getBar());\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithDefaultPropertySet(): void\n    {\n        $result = $this\n            ->createTestParser()\n            ->parse('/** @AnotherNamedAnnotation(\"baz\", foo=\"bar\") */');\n\n        self::assertCount(1, $result);\n        self::assertInstanceOf(AnotherNamedAnnotation::class, $result[0]);\n        self::assertSame('bar', $result[0]->getFoo());\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithInvalidArguments(): void\n    {\n        $parser = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            '[Syntax Error] Expected Positional arguments after named arguments is not allowed'\n        );\n        $parser->parse('/** @AnotherNamedAnnotation(\"foo\", bar=666, \"hey\") */');\n    }\n\n    public function testNamedArgumentsConstructorAnnotationWithWrongArgumentType(): void\n    {\n        $context  = 'property SomeClassName::invalidProperty.';\n        $docblock = '@NamedAnnotationWithArray(foo = \"no array!\")';\n        $parser   = $this->createTestParser();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/\\[Creation Error\\] An error occurred while instantiating the annotation '\n            . '@NamedAnnotationWithArray declared on property SomeClassName::invalidProperty\\.: \".*\"\\.$/'\n        );\n        try {\n            $parser->parse($docblock, $context);\n        } catch (AnnotationException $exc) {\n            $this->assertInstanceOf(TypeError::class, $exc->getPrevious());\n\n            throw $exc;\n        }\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamAndExtraNamedArguments(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(name = \"Some data\", foo = \"Foo\", bar = \"Bar\")\n */\nDOCBLOCK;\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/does not have a property named \"foo\"\\s.*\\sAvailable named arguments: name/'\n        );\n\n        $parser->parse($docblock);\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamAndExtraNamedArgumentsShuffled(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(foo = \"Foo\", name = \"Some data\", bar = \"Bar\")\n */\nDOCBLOCK;\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/does not have a property named \"foo\"\\s.*\\sAvailable named arguments: name/'\n        );\n\n        $parser->parse($docblock);\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamAndCombinedNamedAndPositionalArguments(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(\"Some data\", \"Foo\", bar = \"Bar\")\n */\nDOCBLOCK;\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/does not have a property named \"bar\"\\s.*\\sAvailable named arguments: name/'\n        );\n\n        $parser->parse($docblock);\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamPassOneNamedArgument(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(name = \"Some data\", data = \"Foo\")\n */\nDOCBLOCK;\n\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessageMatches(\n            '/does not have a property named \"data\"\\s.*\\sAvailable named arguments: name/'\n        );\n\n        $parser->parse($docblock);\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamPassPositionalArguments(): void\n    {\n        $parser   = $this->createTestParser();\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(\"Some data\", \"Foo\", \"Bar\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertInstanceOf(SomeAnnotationWithConstructorWithVariadicParam::class, $annot);\n\n        self::assertSame('Some data', $annot->name);\n        // Positional extra arguments will be ignored\n        self::assertSame([], $annot->data);\n    }\n\n    public function testAnnotationWithConstructorWithVariadicParamNoArgs(): void\n    {\n        $parser = $this->createTestParser();\n\n        // Without variadic arguments\n        $docblock = <<<'DOCBLOCK'\n/**\n * @SomeAnnotationWithConstructorWithVariadicParam(\"Some data\")\n */\nDOCBLOCK;\n\n        $result = $parser->parse($docblock);\n        self::assertCount(1, $result);\n        $annot = $result[0];\n\n        self::assertInstanceOf(SomeAnnotationWithConstructorWithVariadicParam::class, $annot);\n\n        self::assertSame('Some data', $annot->name);\n        self::assertSame([], $annot->data);\n    }\n\n    /**\n     * Override for BC with PHPUnit <8\n     */\n    public function expectExceptionMessageMatches(string $regularExpression): void\n    {\n        if (method_exists(get_parent_class($this), 'expectExceptionMessageMatches')) {\n            parent::expectExceptionMessageMatches($regularExpression);\n        } else {\n            parent::expectExceptionMessageRegExp($regularExpression);\n        }\n    }\n}\n\n/**\n * @Annotation\n * @NamedArgumentConstructor\n */\nclass AnotherNamedAnnotation\n{\n    /** @var string */\n    private $foo;\n    /** @var int */\n    private $bar;\n    /** @var string */\n    private $baz;\n\n    public function __construct(string $foo, int $bar = 1234, string $baz = 'baz')\n    {\n        $this->foo = $foo;\n        $this->bar = $bar;\n        $this->baz = $baz;\n    }\n\n    public function getFoo(): string\n    {\n        return $this->foo;\n    }\n\n    public function getBar(): int\n    {\n        return $this->bar;\n    }\n\n    public function getBaz(): string\n    {\n        return $this->baz;\n    }\n}\n\n/**\n * @Annotation\n * @NamedArgumentConstructor\n */\nclass NamedAnnotationWithArray\n{\n    /** @var mixed[] */\n    private $foo;\n    /** @var int */\n    private $bar;\n\n    /**\n     * @param mixed[] $foo\n     */\n    public function __construct(array $foo, int $bar = 1234)\n    {\n        $this->foo = $foo;\n        $this->bar = $bar;\n    }\n\n    /** @return mixed[] */\n    public function getFoo(): array\n    {\n        return $this->foo;\n    }\n\n    public function getBar(): int\n    {\n        return $this->bar;\n    }\n}\n\n/**\n * @Annotation\n * @NamedArgumentConstructor\n */\nclass SomeAnnotationWithConstructorWithVariadicParam\n{\n    public function __construct(string $name, string ...$data)\n    {\n        $this->name = $name;\n        $this->data = $data;\n    }\n\n    /** @var string[] */\n    public $data;\n\n    /** @var string */\n    public $name;\n}\n\n/** @Annotation */\nclass SettingsAnnotation\n{\n    /** @var mixed[] */\n    public $settings;\n\n    /**\n     * @param mixed[] $settings\n     */\n    public function __construct($settings)\n    {\n        $this->settings = $settings;\n    }\n}\n\n/** @Annotation */\nclass SomeAnnotationClassNameWithoutConstructor\n{\n    /** @var mixed */\n    public $data;\n\n    /** @var mixed */\n    public $name;\n}\n\n/** @Annotation */\nclass SomeAnnotationWithConstructorWithoutParams\n{\n    public function __construct()\n    {\n        $this->data = 'Some data';\n    }\n\n    /** @var mixed */\n    public $data;\n\n    /** @var mixed */\n    public $name;\n}\n\n/** @Annotation */\nclass SomeAnnotationClassNameWithoutConstructorAndProperties\n{\n}\n\n/**\n * @Annotation\n * @Target(\"Foo\")\n */\nclass AnnotationWithInvalidTargetDeclaration\n{\n}\n\n/**\n * @Annotation\n * @Target\n */\nclass AnnotationWithTargetEmpty\n{\n}\n\n/** @Annotation */\nclass AnnotationExtendsAnnotationTargetAll extends AnnotationTargetAll\n{\n}\n\n/** @Annotation */\nclass Name extends Annotation\n{\n    /** @var mixed */\n    public $foo;\n}\n\n/** @Annotation */\nclass Marker\n{\n    /** @var mixed */\n    public $value;\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\FooBar;\n\nuse Doctrine\\Common\\Annotations\\Annotation;\n\n/** @Annotation */\nclass Name extends Annotation\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/DummyClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\n/**\n * A description of this class.\n *\n * Let's see if the parser recognizes that this @ is not really referring to an\n * annotation. Also make sure that @var \\ is not concated to \"@var\\is\".\n *\n * @DummyAnnotation(dummyValue=\"hello\")\n */\nclass DummyClass\n{\n    /**\n     * A nice property.\n     *\n     * @var mixed\n     * @DummyAnnotation(dummyValue=\"fieldHello\")\n     */\n    public $field1;\n\n    /**\n     * @var mixed\n     * @DummyJoinTable(name=\"join_table\",\n     *      joinColumns={@DummyJoinColumn(name=\"col1\", referencedColumnName=\"col2\")},\n     *      inverseJoinColumns={\n     *          @DummyJoinColumn(name=\"col3\", referencedColumnName=\"col4\")\n     *      })\n     */\n    public $field2;\n\n    /**\n     * Gets the value of field1.\n     *\n     * @return mixed\n     *\n     * @DummyAnnotation({1,2,\"three\"})\n     */\n    public function getField1()\n    {\n    }\n\n    /**\n     * A parameter value with a space in it.\n     *\n     * @DummyAnnotation(\"\\d{4}-[01]\\d-[0-3]\\d [0-2]\\d:[0-5]\\d:[0-5]\\d\")\n     */\n    public function getField3(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AbstractController.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nabstract class AbstractController\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass AnnotWithDefaultValue\n{\n    /** @var string */\n    public $foo = 'bar';\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Autoload.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/**\n * @Annotation\n */\nclass Autoload\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/CanBeAutoLoaded.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass CanBeAutoLoaded\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/LoadedUsingRegisterFile.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass LoadedUsingRegisterFile\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Param.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\nclass Param\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Route.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass Route\n{\n    /** @var string @Required */\n    public $pattern;\n    /** @var mixed */\n    public $name;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Secure.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\nuse function is_string;\n\n/** @Annotation */\nclass Secure\n{\n    /** @var mixed */\n    public $roles;\n\n    /**\n     * @param mixed[] $values\n     */\n    public function __construct(array $values)\n    {\n        if (is_string($values['value'])) {\n            $values['value'] = [$values['value']];\n        }\n\n        $this->roles = $values['value'];\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/ShouldNeverBeLoaded.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass ShouldNeverBeLoaded\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/SingleUseAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/**\n * @Annotation\n */\nclass SingleUseAnnotation\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/** @Annotation */\nclass Template\n{\n    /** @var mixed */\n    public $name;\n\n    /**\n     * @param mixed[] $values\n     */\n    public function __construct(array $values)\n    {\n        $this->name = $values['value'] ?? null;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation;\n\n/**\n * @Annotation\n * @Target(\"PROPERTY\")\n */\nfinal class Version\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationEnum.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationEnum\n{\n    public const ONE   = 'ONE';\n    public const TWO   = 'TWO';\n    public const THREE = 'THREE';\n\n    /**\n     * @var mixed\n     * @Enum({\"ONE\",\"TWO\",\"THREE\"})\n     */\n    public $value;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationEnumInvalid.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationEnumInvalid\n{\n    /**\n     * @var mixed\n     * @Enum({1, 2, \"foo\", \"bar\", {\"foo\":\"bar\"}})\n     */\n    public $value;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationEnumLiteral.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnumLiteral as SelfEnum;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationEnumLiteral\n{\n    public const ONE   = 1;\n    public const TWO   = 2;\n    public const THREE = 3;\n\n    /**\n     * @var mixed\n     * @Enum(\n     *      value = {\n     *          1,\n     *          2,\n     *          3,\n     *      },\n     *      literal = {\n     *          1 : \"AnnotationEnumLiteral::ONE\",\n     *          2 : \"AnnotationEnumLiteral::TWO\",\n     *          3 : \"AnnotationEnumLiteral::THREE\",\n     *      }\n     * )\n     */\n    public $value;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationEnumLiteralInvalid.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationEnumLiteralInvalid\n{\n    public const ONE   = 1;\n    public const TWO   = 2;\n    public const THREE = 3;\n\n    /**\n     * @var mixed\n     * @Enum(\n     *      value = {\n     *          1,\n     *          2\n     *      },\n     *      literal = {\n     *          1 : \"AnnotationEnumLiteral::ONE\",\n     *          2 : \"AnnotationEnumLiteral::TWO\",\n     *          3 : \"AnnotationEnumLiteral::THREE\"\n     *      }\n     * )\n     */\n    public $value;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAll.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nclass AnnotationTargetAll\n{\n    /** @var mixed */\n    public $data;\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $target;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target({ \"ANNOTATION\" })\n */\nfinal class AnnotationTargetAnnotation\n{\n    /** @var mixed */\n    public $data;\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $target;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"CLASS\")\n */\nfinal class AnnotationTargetClass\n{\n    /** @var mixed */\n    public $data;\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $target;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetMethod.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"METHOD\")\n */\nfinal class AnnotationTargetMethod\n{\n    /** @var mixed */\n    public $data;\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $target;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetPropertyMethod.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target({ \"METHOD\", \"PROPERTY\" })\n */\nfinal class AnnotationTargetPropertyMethod\n{\n    /** @var mixed */\n    public $data;\n    /** @var mixed */\n    public $name;\n    /** @var mixed */\n    public $target;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithAttributes.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n * @Attributes({\n      @Attribute(\"mixed\",              type = \"mixed\"),\n      @Attribute(\"boolean\",            type = \"boolean\"),\n      @Attribute(\"bool\",               type = \"bool\"),\n      @Attribute(\"float\",              type = \"float\"),\n      @Attribute(\"string\",             type = \"string\"),\n      @Attribute(\"integer\",            type = \"integer\"),\n      @Attribute(\"array\",              type = \"array\"),\n      @Attribute(\"arrayOfIntegers\",    type = \"array<integer>\"),\n      @Attribute(\"arrayOfStrings\",     type = \"string[]\"),\n      @Attribute(\"annotation\",         type = \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll\"),\n      @Attribute(\"arrayOfAnnotations\", type = \"array<Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll>\"),\n  })\n */\nfinal class AnnotationWithAttributes\n{\n    /**\n     * @param mixed[] $data\n     */\n    public function __construct(array $data)\n    {\n        foreach ($data as $key => $value) {\n            $this->$key = $value;\n        }\n    }\n\n    /** @var mixed */\n    private $mixed;\n    /** @var bool */\n    private $boolean;\n    /** @var bool */\n    private $bool;\n    /** @var float */\n    private $float;\n    /** @var string */\n    private $string;\n    /** @var integer */\n    private $integer;\n    /** @var mixed[] */\n    private $array;\n    /** @var object */\n    private $annotation;\n    /** @var int[] */\n    private $arrayOfIntegers;\n    /** @var string[] */\n    private $arrayOfStrings;\n    /** @var object[] */\n    private $arrayOfAnnotations;\n\n    /**\n     * @return mixed\n     */\n    public function getMixed()\n    {\n        return $this->mixed;\n    }\n\n    /**\n     * @return boolean\n     */\n    public function getBoolean()\n    {\n        return $this->boolean;\n    }\n\n    /**\n     * @return bool\n     */\n    public function getBool()\n    {\n        return $this->bool;\n    }\n\n    /**\n     * @return float\n     */\n    public function getFloat()\n    {\n        return $this->float;\n    }\n\n    /**\n     * @return string\n     */\n    public function getString()\n    {\n        return $this->string;\n    }\n\n    public function getInteger(): int\n    {\n        return $this->integer;\n    }\n\n    /**\n     * @return mixed[]\n     */\n    public function getArray()\n    {\n        return $this->array;\n    }\n\n    /**\n     * @return AnnotationTargetAll\n     */\n    public function getAnnotation()\n    {\n        return $this->annotation;\n    }\n\n    /**\n     * @return string[]\n     */\n    public function getArrayOfStrings()\n    {\n        return $this->arrayOfStrings;\n    }\n\n    /**\n     * @return array<integer>\n     */\n    public function getArrayOfIntegers()\n    {\n        return $this->arrayOfIntegers;\n    }\n\n    /**\n     * @return array<Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll>\n     */\n    public function getArrayOfAnnotations()\n    {\n        return $this->arrayOfAnnotations;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationWithConstants\n{\n    public const INTEGER = 1;\n    public const FLOAT   = 1.2;\n    public const STRING  = '1.2.3';\n\n    /** @var mixed */\n    public $value;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithEnumProperty.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n * @NamedArgumentConstructor\n */\nfinal class AnnotationWithEnumProperty\n{\n    public function __construct(\n        public readonly Suit $suit = Suit::Hearts,\n    ) {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributes.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n * @Attributes({\n      @Attribute(\"value\",   required = true ,   type = \"string\"),\n      @Attribute(\n          \"annot\",\n          required = true ,\n          type = \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation\"\n      ),\n   })\n */\nfinal class AnnotationWithRequiredAttributes\n{\n    /**\n     * @param mixed[] $data\n     */\n    public function __construct(array $data)\n    {\n        foreach ($data as $key => $value) {\n            $this->$key = $value;\n        }\n    }\n\n    /** @var string */\n    private $value;\n\n    /** @var AnnotationTargetAnnotation */\n    private $annot;\n\n    /**\n     * @return string\n     */\n    public function getValue()\n    {\n        return $this->value;\n    }\n\n    /**\n     * @return AnnotationTargetAnnotation\n     */\n    public function getAnnot()\n    {\n        return $this->annot;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutConstructor.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationWithRequiredAttributesWithoutConstructor\n{\n    /**\n     * @Required\n     * @var string\n     */\n    public $value;\n\n    /**\n     * @Required\n     * @var \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation\n     */\n    public $annot;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithTargetSyntaxError.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(@)\n */\nfinal class AnnotationWithTargetSyntaxError\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @Annotation\n * @Target(\"ALL\")\n */\nfinal class AnnotationWithVarType\n{\n    /** @var mixed */\n    public $mixed;\n\n    /** @var boolean */\n    public $boolean;\n\n    /** @var bool */\n    public $bool;\n\n    /** @var float */\n    public $float;\n\n    /** @var string */\n    public $string;\n\n    /** @var integer */\n    public $integer;\n\n    /** @var array */\n    public $array;\n\n    /** @var \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll */\n    public $annotation;\n\n    /** @var array<integer> */\n    public $arrayOfIntegers;\n\n    /** @var string[] */\n    public $arrayOfStrings;\n\n    /** @var \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll[] */\n    public $arrayOfAnnotations;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * This class is not an annotation\n * It's a class build to test ClassWithInclude\n */\nclass Api\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassDDC1660.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @since 2.0\n * @version $Id: SomeEntityClass.php 509 2012-02-03 09:38:48Z mf $\n */\nclass ClassDDC1660\n{\n    /**\n     * @var     string\n     * @since   2.0\n     * @version 1\n     */\n    public $foo;\n\n    /**\n     * @param   string $param\n     *\n     * @return  string\n     *\n     * @since   2.0\n     * @version 1\n     */\n    public function bar($param)\n    {\n        return $param;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassNoNamespaceNoComment.php",
    "content": "<?php\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass;\n\nclass Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassOverwritesTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Bar2\\Autoload;\n\nclass ClassOverwritesTrait\n{\n    use TraitWithAnnotatedMethod;\n\n    /**\n     * @Autoload\n     */\n    public function traitMethod(): void\n    {\n    }\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Bar2;\n\n/** @Annotation */\nclass Autoload\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassThatUsesTraitThatUsesAnotherTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits\\TraitThatUsesAnotherTrait;\n\n/**\n * @Route(\"/someprefix\")\n */\nclass ClassThatUsesTraitThatUsesAnotherTrait\n{\n    use TraitThatUsesAnotherTrait;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassThatUsesTraitThatUsesAnotherTraitWithMethods.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits\\TraitThatUsesAnotherTrait;\n\nclass ClassThatUsesTraitThatUsesAnotherTraitWithMethods\n{\n    use TraitThatUsesAnotherTrait;\n\n    /**\n     * @Route(\"/someprefix\")\n     */\n    public function method1(): void\n    {\n    }\n\n    /**\n     * @Route(\"/someotherprefix\")\n     */\n    public function method2(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassUsesTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Bar\\Autoload;\n\nclass ClassUsesTrait\n{\n    use TraitWithAnnotatedMethod;\n\n    /**\n     * @var mixed\n     * @Autoload\n     */\n    public $aProperty;\n\n    /**\n     * @Autoload\n     */\n    public function someMethod(): void\n    {\n    }\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Bar;\n\n/** @Annotation */\nclass Autoload\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationConstantReferenceWithDashes.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n\n/** @Route(@AValid-constant::REFERENCE) */\nclass ClassWithAnnotationConstantReferenceWithDashes\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationEnum.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationEnum;\n\nclass ClassWithAnnotationEnum\n{\n    /**\n     * @var mixed\n     * @AnnotationEnum(AnnotationEnum::ONE)\n     */\n    public $foo;\n\n    /**\n     * @AnnotationEnum(\"TWO\")\n     */\n    public function bar(): void\n    {\n    }\n\n    /**\n     * @var mixed\n     * @AnnotationEnum(\"FOUR\")\n     */\n    public $invalidProperty;\n\n    /**\n     * @AnnotationEnum(5)\n     */\n    public function invalidMethod(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithSelfConstantReference.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits\\TraitWithSelfConstantReferenceTrait;\n\n/** @AnnotationWithConstants(self::VALUE_FOR_CLASS) */\nclass ClassWithAnnotationWithSelfConstantReference\n{\n    use TraitWithSelfConstantReferenceTrait;\n\n    public const VALUE_FOR_CLASS = 'ClassWithAnnotationWithSelfConstantReference.VALUE_FROM_CLASS';\n    public const VALUE_FOR_TRAIT = 'ClassWithAnnotationWithSelfConstantReference.VALUE_FOR_TRAIT';\n\n    /**\n     * @var mixed\n     * @AnnotationWithConstants(self::VALUE_FOR_CLASS)\n     */\n    private $classProperty;\n\n    /**\n     * @return mixed\n     *\n     * @AnnotationWithConstants(self::VALUE_FOR_CLASS)\n     */\n    public function classMethod()\n    {\n        return $this->classProperty;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithTargetSyntaxError.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithTargetSyntaxError;\n\n/**\n * @AnnotationWithTargetSyntaxError()\n */\nclass ClassWithAnnotationWithTargetSyntaxError\n{\n    /**\n     * @var mixed\n     * @AnnotationWithTargetSyntaxError()\n     */\n    public $foo;\n\n    /**\n     * @AnnotationWithTargetSyntaxError()\n     */\n    public function bar(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithVarType.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithVarType;\n\nclass ClassWithAnnotationWithVarType\n{\n    /**\n     * @var mixed\n     * @AnnotationWithVarType(string = \"String Value\")\n     */\n    public $foo;\n\n    /**\n     * @AnnotationWithVarType(annotation = @AnnotationTargetAll)\n     */\n    public function bar(): void\n    {\n    }\n\n    /**\n     * @var mixed\n     * @AnnotationWithVarType(string = 123)\n     */\n    public $invalidProperty;\n\n    /**\n     * @AnnotationWithVarType(annotation = @AnnotationTargetAnnotation)\n     */\n    public function invalidMethod(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAtInDescriptionAndAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetPropertyMethod;\n\nclass ClassWithAtInDescriptionAndAnnotation\n{\n    /**\n     * Lala\n     *\n     * {\n     *     \"email\": \"foo@example.com\",\n     *     \"email2\": \"123@example.com\",\n     *     \"email3\": \"@example.com\"\n     * }\n     *\n     * @AnnotationTargetPropertyMethod(\"Bar\")\n     * @var mixed\n     */\n    public $foo;\n\n    /**\n     * Lala\n     *\n     * {\n     *     \"email\": \"foo@example.com\",\n     *     \"email2\": \"123@example.com\",\n     *     \"email3\": \"@example.com\"\n     * }\n     *\n     * @AnnotationTargetPropertyMethod(\"Bar\")\n     * @var mixed\n     */\n    public $bar;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClassAnnotationOnly.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass;\n\n/**\n * @AnnotationTargetClass(\"Some data\")\n */\nclass ClassWithClassAnnotationOnly\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClosure.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation;\n\n/**\n * @AnnotationTargetAll(\"Foo\")\n */\nfinal class ClassWithClosure\n{\n    /**\n     * @AnnotationTargetAll(@AnnotationTargetAnnotation)\n     * @var string\n     */\n    public $value;\n\n    /**\n     * @return  \\Closure\n     *\n     * @AnnotationTargetAll(@AnnotationTargetAnnotation)\n     */\n    public function methodName(\\Closure $callback)\n    {\n        return static function () use ($callback) {\n            return $callback;\n        };\n    }\n\n    /**\n     * @param   integer $year\n     * @param   integer $month\n     * @param   integer $day\n     *\n     * @return  \\Doctrine\\Common\\Collections\\ArrayCollection\n     */\n    public function getEventsForDate($year, $month, $day)\n    {\n        $extractEvents = null; // check if date of item is inside day given\n        $extractEvents = $this->events->filter(static function ($item) use ($year, $month, $day) {\n            $leftDate  = new \\DateTime($year . '-' . $month . '-' . $day . ' 00:00');\n            $rigthDate = new \\DateTime($year . '-' . $month . '-' . $day . ' +1 day 00:00');\n\n            return ( $leftDate <= $item->getDateStart() ) && ( $item->getDateStart() < $rigthDate );\n        });\n\n        return $extractEvents;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass ClassWithConstants\n{\n    public const SOME_VALUE  = 'ClassWithConstants.SOME_VALUE';\n    public const SOME_KEY    = 'ClassWithConstants.SOME_KEY';\n    public const OTHER_KEY_  = 'ClassWithConstants.OTHER_KEY_';\n    public const OTHER_KEY_2 = 'ClassWithConstants.OTHER_KEY_2';\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithEnumAnnotations.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass ClassWithEnumAnnotations\n{\n    /** @AnnotationWithEnumProperty */\n    public mixed $annotationWithDefaults;\n\n    /** @AnnotationWithEnumProperty(suit=Suit::Spades) */\n    public mixed $annotationWithSpades;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullPathUseStatement.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * The leading \\ is intentional to ensure that code using\n * this use statement format works see issue #115/PR #120\n */\nuse \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation as Annotations;\n\n/**\n * @Annotations\\SingleUseAnnotation\n */\nclass ClassWithFullPathUseStatement\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullyQualifiedUseStatements.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse\n    \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure,\n    \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse \\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\nclass ClassWithFullyQualifiedUseStatements\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithIgnoreAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @ignoreAnnotation(\"IgnoreAnnotationClass\")\n */\nclass ClassWithIgnoreAnnotation\n{\n    /**\n     * @var mixed[]\n     * @IgnoreAnnotationClass\n     */\n    public $foo;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithImportedIgnoredAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Param;\n\nclass ClassWithImportedIgnoredAnnotation\n{\n    /**\n     * @param string $foo\n     */\n    public function something($foo): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationContainingDashes.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @please-do-not-parse-me\n * @AlsoDoNot\\Parse-me\n */\nclass ClassWithInvalidAnnotationContainingDashes\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetPropertyMethod;\n\n/**\n * @AnnotationTargetPropertyMethod(\"Some data\")\n */\nclass ClassWithInvalidAnnotationTargetAtClass\n{\n    /**\n     * @var mixed\n     * @AnnotationTargetPropertyMethod(\"Bar\")\n     */\n    public $foo;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass;\n\n/**\n * @AnnotationTargetClass(\"Some data\")\n */\nclass ClassWithInvalidAnnotationTargetAtMethod\n{\n    /**\n     * @param mixed $param\n     *\n     * @AnnotationTargetClass(\"functionName\")\n     */\n    public function functionName($param): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtProperty.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAnnotation;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass;\n\n/**\n * @AnnotationTargetClass(\"Some data\")\n */\nclass ClassWithInvalidAnnotationTargetAtProperty\n{\n    /**\n     * @var mixed\n     * @AnnotationTargetClass(\"Bar\")\n     */\n    public $foo;\n\n    /**\n     * @var mixed\n     * @AnnotationTargetAnnotation(\"Foo\")\n     */\n    public $bar;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithNotRegisteredAnnotationUsed.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @package Doctrine\\Tests\\Common\\Annotations\\Fixtures\n */\nclass ClassWithNotRegisteredAnnotationUsed\n{\n    /**\n     * @return bool\n     *\n     * @notRegisteredCustomAnnotation\n     */\n    public function methodWithNotRegisteredAnnotation()\n    {\n        return false;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithPHPCodeSnifferAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @codingStandardsIgnoreStart\n * @codingStandardsIgnoreEnd\n */\nclass ClassWithPHPCodeSnifferAnnotation\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithPHPStanGenericsAnnotations.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @template T\n */\ninterface WithPHPStanExtendsAnnotations\n{\n}\n\n/**\n * @template T\n */\nclass ClassWithPHPStanExtendsAnnotationsGeneric\n{\n}\n\n/**\n * @template T\n */\ntrait GenericPHPStanTrait\n{\n}\n\n/**\n * @template T\n * @implements WithPHPStanExtendsAnnotationsInterface<int>\n * @extends ClassWithPHPStanExtendsAnnotationsGeneric<int>\n */\nclass ClassWithPHPStanGenericsAnnotations extends ClassWithPHPStanExtendsAnnotationsGeneric implements\n    WithPHPStanExtendsAnnotations\n{\n    /**\n     * @use GenericPHPStanTrait<T>\n     */\n    use GenericPHPStanTrait;\n\n    /** @var array<T> */\n    private $bar;\n\n    /**\n     * @param array<T> $array\n     *\n     * @return array<T>\n     */\n    public function foo($array)\n    {\n        return $this->bar;\n    }\n\n    /**\n     * @Template(\"@foo.html.twig\")\n     */\n    public function twigTemplateFunctionName(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithPhpCsSuppressAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass ClassWithPhpCsSuppressAnnotation\n{\n    /**\n     * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint\n     */\n    public function foo($parameterWithoutTypehint): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithRequire.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n// Include a class named Api\nrequire_once __DIR__ . '/Api.php';\n\nuse Doctrine\\Tests\\Common\\Annotations\\DummyAnnotationWithIgnoredAnnotation;\n\n/**\n * @DummyAnnotationWithIgnoredAnnotation(dummyValue=\"hello\")\n */\nclass ClassWithRequire\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetPropertyMethod;\n\n/**\n * @AnnotationTargetClass(\"Some data\")\n */\nclass ClassWithValidAnnotationTarget\n{\n    /** @AnnotationTargetPropertyMethod(\"Some data\") */\n    public $foo;\n\n    /** @AnnotationTargetAll(\"Some data\",name=\"Some name\") */\n    public $name;\n\n    /**\n     * @AnnotationTargetPropertyMethod(\"Some data\",name=\"Some name\")\n     */\n    public function someFunction(): void\n    {\n    }\n\n    /** @AnnotationTargetAll(@AnnotationTargetAnnotation) */\n    public $nested;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n/**\n * @Route(\"/someprefix\")\n * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n */\nclass Controller\n{\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/\", name=\"_demo\")\n     * @Template()\n     */\n    public function indexAction(): array\n    {\n        return [];\n    }\n\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/hello/{name}\", name=\"_demo_hello\")\n     * @Template()\n     */\n    public function helloAction(string $name): array\n    {\n        return ['name' => $name];\n    }\n\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/contact\", name=\"_demo_contact\")\n     * @Template()\n     */\n    public function contactAction(): array\n    {\n        $form = ContactForm::create($this->get('form.context'), 'contact');\n\n        $form->bind($this->container->get('request'), $form);\n        if ($form->isValid()) {\n            $form->send($this->get('mailer'));\n\n            $this->get('session')->setFlash('notice', 'Message sent!');\n\n            return new RedirectResponse($this->generateUrl('_demo'));\n        }\n\n        return ['form' => $form];\n    }\n\n    /**\n     * Creates the ACL for the passed object identity\n     */\n    private function createObjectIdentity(ObjectIdentityInterface $oid): void\n    {\n        $classId = $this->createOrRetrieveClassId($oid->getType());\n\n        $this->connection->executeQuery($this->getInsertObjectIdentitySql($oid->getIdentifier(), $classId, true));\n    }\n\n    /**\n     * Returns the primary key for the passed class type.\n     *\n     * If the type does not yet exist in the database, it will be created.\n     *\n     * @param string $classType\n     *\n     * @return integer\n     */\n    private function createOrRetrieveClassId($classType)\n    {\n        $id = $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn();\n        if ($id !== false) {\n            return $id;\n        }\n\n        $this->connection->executeQuery($this->getInsertClassSql($classType));\n\n        return $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn();\n    }\n\n    /**\n     * Returns the primary key for the passed security identity.\n     *\n     * If the security identity does not yet exist in the database, it will be\n     * created.\n     *\n     * @return integer\n     */\n    private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid)\n    {\n        $id = $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn();\n        if ($id !== false) {\n            return $id;\n        }\n\n        $this->connection->executeQuery($this->getInsertSecurityIdentitySql($sid));\n\n        return $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn();\n    }\n\n    /**\n     * Deletes all ACEs for the given object identity primary key.\n     *\n     * @param integer $oidPK\n     */\n    private function deleteAccessControlEntries($oidPK): void\n    {\n        $this->connection->executeQuery($this->getDeleteAccessControlEntriesSql($oidPK));\n    }\n\n    /**\n     * Deletes the object identity from the database.\n     *\n     * @param integer $pk\n     */\n    private function deleteObjectIdentity($pk): void\n    {\n        $this->connection->executeQuery($this->getDeleteObjectIdentitySql($pk));\n    }\n\n    /**\n     * Deletes all entries from the relations table from the database.\n     *\n     * @param integer $pk\n     */\n    private function deleteObjectIdentityRelations($pk): void\n    {\n        $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk));\n    }\n\n    /**\n     * This regenerates the ancestor table which is used for fast read access.\n     */\n    private function regenerateAncestorRelations(AclInterface $acl): void\n    {\n        $pk = $acl->getId();\n        $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk));\n        $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk));\n\n        $parentAcl = $acl->getParentAcl();\n        while ($parentAcl !== null) {\n            $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $parentAcl->getId()));\n\n            $parentAcl = $parentAcl->getParentAcl();\n        }\n    }\n\n    /**\n     * This processes changes on an ACE related property (classFieldAces, or objectFieldAces).\n     *\n     * @param string  $name\n     * @param mixed[] $changes\n     */\n    private function updateFieldAceProperty($name, array $changes): void\n    {\n        $sids       = new \\SplObjectStorage();\n        $classIds   = new \\SplObjectStorage();\n        $currentIds = [];\n        foreach ($changes[1] as $field => $new) {\n            for ($i = 0,$c = count($new); $i < $c; $i++) {\n                $ace = $new[$i];\n\n                if ($ace->getId() === null) {\n                    if ($sids->contains($ace->getSecurityIdentity())) {\n                        $sid = $sids->offsetGet($ace->getSecurityIdentity());\n                    } else {\n                        $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity());\n                    }\n\n                    $oid = $ace->getAcl()->getObjectIdentity();\n                    if ($classIds->contains($oid)) {\n                        $classId = $classIds->offsetGet($oid);\n                    } else {\n                        $classId = $this->createOrRetrieveClassId($oid->getType());\n                    }\n\n                    $objectIdentityId = $name === 'classFieldAces' ? null : $ace->getAcl()->getId();\n\n                    $this->connection->executeQuery($this->getInsertAccessControlEntrySql(\n                        $classId,\n                        $objectIdentityId,\n                        $field,\n                        $i,\n                        $sid,\n                        $ace->getStrategy(),\n                        $ace->getMask(),\n                        $ace->isGranting(),\n                        $ace->isAuditSuccess(),\n                        $ace->isAuditFailure()\n                    ));\n                    $aceId                    = $this->connection->executeQuery(\n                        $this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, $field, $i)\n                    )->fetchColumn();\n                    $this->loadedAces[$aceId] = $ace;\n\n                    $aceIdProperty = new \\ReflectionProperty('Symfony\\Component\\Security\\Acl\\Domain\\Entry', 'id');\n                    if (PHP_VERSION_ID < 80100) {\n                        $aceIdProperty->setAccessible(true);\n                    }\n\n                    $aceIdProperty->setValue($ace, (int) $aceId);\n                } else {\n                    $currentIds[$ace->getId()] = true;\n                }\n            }\n        }\n\n        foreach ($changes[0] as $old) {\n            for ($i = 0,$c = count($old); $i < $c; $i++) {\n                $ace = $old[$i];\n\n                if (isset($currentIds[$ace->getId()])) {\n                    continue;\n                }\n\n                $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId()));\n                unset($this->loadedAces[$ace->getId()]);\n            }\n        }\n    }\n\n    /**\n     * This processes changes on an ACE related property (classAces, or objectAces).\n     *\n     * @param string  $name\n     * @param mixed[] $changes\n     */\n    private function updateAceProperty($name, array $changes): void\n    {\n        [$old, $new] = $changes;\n\n        $sids       = new \\SplObjectStorage();\n        $classIds   = new \\SplObjectStorage();\n        $currentIds = [];\n        for ($i = 0,$c = count($new); $i < $c; $i++) {\n            $ace = $new[$i];\n\n            if ($ace->getId() === null) {\n                if ($sids->contains($ace->getSecurityIdentity())) {\n                    $sid = $sids->offsetGet($ace->getSecurityIdentity());\n                } else {\n                    $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity());\n                }\n\n                $oid = $ace->getAcl()->getObjectIdentity();\n                if ($classIds->contains($oid)) {\n                    $classId = $classIds->offsetGet($oid);\n                } else {\n                    $classId = $this->createOrRetrieveClassId($oid->getType());\n                }\n\n                $objectIdentityId = $name === 'classAces' ? null : $ace->getAcl()->getId();\n\n                $this->connection->executeQuery($this->getInsertAccessControlEntrySql(\n                    $classId,\n                    $objectIdentityId,\n                    null,\n                    $i,\n                    $sid,\n                    $ace->getStrategy(),\n                    $ace->getMask(),\n                    $ace->isGranting(),\n                    $ace->isAuditSuccess(),\n                    $ace->isAuditFailure()\n                ));\n                $aceId                    = $this->connection->executeQuery(\n                    $this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, null, $i)\n                )->fetchColumn();\n                $this->loadedAces[$aceId] = $ace;\n\n                $aceIdProperty = new \\ReflectionProperty($ace, 'id');\n                if (PHP_VERSION_ID < 80100) {\n                    $aceIdProperty->setAccessible(true);\n                }\n\n                $aceIdProperty->setValue($ace, (int) $aceId);\n            } else {\n                $currentIds[$ace->getId()] = true;\n            }\n        }\n\n        for ($i = 0,$c = count($old); $i < $c; $i++) {\n            $ace = $old[$i];\n\n            if (isset($currentIds[$ace->getId()])) {\n                continue;\n            }\n\n            $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId()));\n            unset($this->loadedAces[$ace->getId()]);\n        }\n    }\n\n    /**\n     * Persists the changes which were made to ACEs to the database.\n     */\n    private function updateAces(\\SplObjectStorage $aces): void\n    {\n        foreach ($aces as $ace) {\n            $propertyChanges = $aces->offsetGet($ace);\n            $sets            = [];\n\n            if (isset($propertyChanges['mask'])) {\n                $sets[] = sprintf('mask = %d', $propertyChanges['mask'][1]);\n            }\n\n            if (isset($propertyChanges['strategy'])) {\n                $sets[] = sprintf('granting_strategy = %s', $this->connection->quote($propertyChanges['strategy']));\n            }\n\n            if (isset($propertyChanges['aceOrder'])) {\n                $sets[] = sprintf('ace_order = %d', $propertyChanges['aceOrder'][1]);\n            }\n\n            if (isset($propertyChanges['auditSuccess'])) {\n                $sets[] = sprintf(\n                    'audit_success = %s',\n                    $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditSuccess'][1])\n                );\n            }\n\n            if (isset($propertyChanges['auditFailure'])) {\n                $sets[] = sprintf(\n                    'audit_failure = %s',\n                    $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditFailure'][1])\n                );\n            }\n\n            $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets));\n        }\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ControllerWithParentClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n/**\n * @Route(\"/someprefix\")\n * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n */\nclass ControllerWithParentClass extends AbstractController\n{\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/\", name=\"_demo\")\n     * @Template()\n     */\n    public function indexAction(): array\n    {\n        return [];\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/ControllerWithTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits\\SecretRouteTrait;\n\n/**\n * @Route(\"/someprefix\")\n * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n */\nclass ControllerWithTrait\n{\n    use SecretRouteTrait;\n\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/\", name=\"_demo\")\n     * @Template()\n     */\n    public function indexAction(): array\n    {\n        return [];\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\n    class DifferentNamespacesPerFileWithClassAsFirst\n    {\n    }\n}\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Foo {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsLast.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Foo {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\n}\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n    class DifferentNamespacesPerFileWithClassAsLast\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/EmptyInterface.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\ninterface EmptyInterface\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsFirst.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\nclass EqualNamespacesPerFileWithClassAsFirst\n{\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsLast.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\nclass EqualNamespacesPerFileWithClassAsLast\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php",
    "content": "<?php\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\n    class GlobalNamespacesPerFileWithClassAsFirst\n    {\n    }\n}\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php",
    "content": "<?php\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\n}\n\nnamespace {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n    class GlobalNamespacesPerFileWithClassAsLast\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/GroupUseStatement.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\{Route, Secure as SuperSecure, Template};\n\nclass GroupUseStatement\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/HereForTesting.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\ninterface HereForTesting\n{\n    /**\n     * @Secure\n     */\n    public function foo();\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/IgnoreAnnotationClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass IgnoreAnnotationClass\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/IgnoredNamespaces/AnnotatedAtClassLevel.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces;\n\n/**\n * @SomeClassAnnotationNamespace\\Subnamespace\\Name\n */\nclass AnnotatedAtClassLevel\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/IgnoredNamespaces/AnnotatedAtMethodLevel.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces;\n\nclass AnnotatedAtMethodLevel\n{\n    /**\n     * @SomeMethodAnnotationNamespace\\Subnamespace\\Name\n     */\n    public function test(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/IgnoredNamespaces/AnnotatedAtPropertyLevel.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces;\n\nclass AnnotatedAtPropertyLevel\n{\n    /**\n     * @var mixed\n     * @SomePropertyAnnotationNamespace\\Subnamespace\\Name\n     */\n    public $property;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/IgnoredNamespaces/AnnotatedWithAlias.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IgnoredNamespaces;\n\nuse SomePropertyAnnotationNamespace\\Subnamespace as SomeAlias;\n\nclass AnnotatedWithAlias\n{\n    /**\n     * @var mixed\n     * @SomeAlias\\Name\n     */\n    public $property;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/InterfaceThatExtendsAnInterface.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\EmptyInterface;\n\n/**\n * @Route(\"/someprefix\")\n */\ninterface InterfaceThatExtendsAnInterface extends EmptyInterface\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/InterfaceWithConstants.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\ninterface InterfaceWithConstants\n{\n    public const SOME_VALUE = 'InterfaceWithConstants.SOME_VALUE';\n    public const SOME_KEY   = 'InterfaceWithConstants.SOME_KEY';\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageButIgnoredClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n\n/**\n * @NoAnnotation\n * @IgnoreAnnotation(\"NoAnnotation\")\n * @Route(\"foo\")\n */\nclass InvalidAnnotationUsageButIgnoredClass\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageClass.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\n/**\n * @NoAnnotation\n */\nclass InvalidAnnotationUsageClass\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleClassesInFile.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\nclass AnotherClass\n{\n}\nclass MultipleClassesInFile\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleImportsInUseStatement.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse\n    Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route,\n    Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\nclass MultipleImportsInUseStatement\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceAndClassCommentedOut.php",
    "content": "<?php\n\n// namespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Foo {\n\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\n\n    // class NamespaceAndClassCommentedOut {}\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures {\n\n    // class NamespaceAndClassCommentedOut {}\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\n// namespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n    use Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n    class NamespaceAndClassCommentedOut\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Secure;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n$var = 1;\nstatic function (): void {\n};\n\nclass NamespaceWithClosureDeclaration\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespacedSingleClassLOC1000.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass NamespacedSingleClassLOC1000\n{\n    public const TEST1 = 1234567890;\n    public const TEST2 = 1234567890;\n    public const TEST3 = 1234567890;\n    public const TEST4 = 1234567890;\n    public const TEST5 = 1234567890;\n    public const TEST6 = 1234567890;\n    public const TEST7 = 1234567890;\n    public const TEST8 = 1234567890;\n    public const TEST9 = 1234567890;\n\n    /** @var null */\n    private $test1 = null;\n    /** @var null */\n    private $test2 = null;\n    /** @var null */\n    private $test3 = null;\n    /** @var null */\n    private $test4 = null;\n    /** @var null */\n    private $test5 = null;\n    /** @var null */\n    private $test6 = null;\n    /** @var null */\n    private $test7 = null;\n    /** @var null */\n    private $test8 = null;\n    /** @var null */\n    private $test9 = null;\n\n    public function test1(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test2(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test3(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test4(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test5(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test6(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test7(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test8(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test9(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test10(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test11(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test12(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test13(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test14(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test15(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test16(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test17(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test18(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test19(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test20(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test21(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test22(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test23(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test24(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test25(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test26(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test27(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test28(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test29(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test30(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test31(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test32(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test33(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test34(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test35(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test36(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test37(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test38(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test39(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nclass NoAnnotation\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php",
    "content": "<?php\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\n/**\n * @Route(\"foo\")\n * @Template\n */\nclass AnnotationsTestsFixturesNonNamespacedClass\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php",
    "content": "<?php\n\nclass SingleClassLOC1000\n{\n    public const TEST1 = 1234567890;\n    public const TEST2 = 1234567890;\n    public const TEST3 = 1234567890;\n    public const TEST4 = 1234567890;\n    public const TEST5 = 1234567890;\n    public const TEST6 = 1234567890;\n    public const TEST7 = 1234567890;\n    public const TEST8 = 1234567890;\n    public const TEST9 = 1234567890;\n\n    /** @var null */\n    private $test1 = null;\n    /** @var null */\n    private $test2 = null;\n    /** @var null */\n    private $test3 = null;\n    /** @var null */\n    private $test4 = null;\n    /** @var null */\n    private $test5 = null;\n    /** @var null */\n    private $test6 = null;\n    /** @var null */\n    private $test7 = null;\n    /** @var null */\n    private $test8 = null;\n    /** @var null */\n    private $test9 = null;\n\n    public function test1(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test2(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test3(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test4(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test5(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test6(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test7(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test8(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test9(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test10(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test11(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test12(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test13(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test14(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test15(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test16(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test17(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test18(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test19(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test20(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test21(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test22(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test23(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test24(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test25(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test26(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test27(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test28(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test29(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test30(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test31(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test32(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test33(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test34(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test35(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test36(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test37(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test38(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n\n    public function test39(): string\n    {\n        echo $this->test1;\n        echo $this->test2;\n        echo $this->test3;\n        $array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n        foreach ($array as $key => $value) {\n            echo $key . ' => ' . $value;\n        }\n\n        $val  = (string) self::TEST1;\n        $val .= (string) self::TEST2;\n        $val .= (string) self::TEST3;\n        $val .= (string) self::TEST4;\n        $val .= (string) self::TEST5;\n        $val .= (string) self::TEST6;\n        $val .= (string) self::TEST7;\n        $val .= (string) self::TEST8;\n        $val .= (string) self::TEST9;\n\n        strtolower($val);\n\n        return $val;\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Suit.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nenum Suit\n{\n    case Hearts;\n    case Diamonds;\n    case Clubs;\n    case Spades;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/TraitWithAnnotatedMethod.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Autoload;\n\ntrait TraitWithAnnotatedMethod\n{\n    /**\n     * @var mixed\n     * @Autoload\n     */\n    public $traitProperty;\n\n    /**\n     * @Autoload\n     */\n    public function traitMethod(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Traits/EmptyTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits;\n\ntrait EmptyTrait\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Traits/SecretRouteTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Template;\n\ntrait SecretRouteTrait\n{\n    /**\n     * @return mixed[]\n     *\n     * @Route(\"/secret\", name=\"_secret\")\n     * @Template()\n     */\n    public function secretAction(): array\n    {\n        return [];\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Traits/TraitThatUsesAnotherTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits;\n\ntrait TraitThatUsesAnotherTrait\n{\n    use EmptyTrait;\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/Traits/TraitWithSelfConstantReferenceTrait.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Traits;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants;\n\ntrait TraitWithSelfConstantReferenceTrait\n{\n    /**\n     * @var mixed\n     * @AnnotationWithConstants(self::VALUE_FOR_TRAIT)\n     */\n    private $traitProperty;\n\n    /** @AnnotationWithConstants(self::VALUE_FOR_TRAIT) */\n    public function traitMethod(): void\n    {\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Autoload;\n\n/**\n * @Autoload()\n */\nfunction foo()\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Doctrine\\Common\\Annotations\\PhpParser;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\nuse stdClass;\n\nrequire_once __DIR__ . '/Fixtures/NonNamespacedClass.php';\nrequire_once __DIR__ . '/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php';\nrequire_once __DIR__ . '/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php';\n\nclass PhpParserTest extends TestCase\n{\n    public function testParseClassWithMultipleClassesInFile(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\MultipleClassesInFile');\n        $parser = new PhpParser();\n\n        self::assertEquals([\n            'route'  => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'secure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testParseClassWithMultipleImportsInUseStatement(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\MultipleImportsInUseStatement');\n        $parser = new PhpParser();\n\n        self::assertEquals([\n            'route'  => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'secure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n        ], $parser->parseUseStatements($class));\n    }\n\n    /**\n     * @requires PHP 7.0\n     */\n    public function testParseClassWithGroupUseStatement(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\GroupUseStatement');\n        $parser = new PhpParser();\n\n        self::assertEquals([\n            'route'  => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'supersecure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testParseClassWhenNotUserDefined(): void\n    {\n        $parser = new PhpParser();\n        self::assertEquals([], $parser->parseUseStatements(new ReflectionClass(stdClass::class)));\n    }\n\n    public function testClassFileDoesNotExist(): void\n    {\n        $class = $this->createMock(ReflectionClass::class);\n        $class->expects($this->once())\n             ->method('getFilename')\n             ->will($this->returnValue('/valid/class/Fake.php(35) : eval()d code'));\n\n        $parser = new PhpParser();\n        self::assertEquals([], $parser->parseUseStatements($class));\n    }\n\n    public function testParseClassWhenClassIsNotNamespaced(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(\\AnnotationsTestsFixturesNonNamespacedClass::class);\n\n        self::assertEquals([\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testParseClassWhenClassIsInterface(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\HereForTesting');\n\n        self::assertEquals([\n            'secure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testClassWithFullyQualifiedUseStatements(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\ClassWithFullyQualifiedUseStatements');\n\n        self::assertEquals([\n            'secure'   => '\\\\' . __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => '\\\\' . __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => '\\\\' . __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testNamespaceAndClassCommentedOut(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\NamespaceAndClassCommentedOut');\n\n        self::assertEquals([\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testEqualNamespacesPerFileWithClassAsFirst(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\EqualNamespacesPerFileWithClassAsFirst');\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testEqualNamespacesPerFileWithClassAsLast(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\EqualNamespacesPerFileWithClassAsLast');\n\n        self::assertEquals([\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testDifferentNamespacesPerFileWithClassAsFirst(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\DifferentNamespacesPerFileWithClassAsFirst');\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testDifferentNamespacesPerFileWithClassAsLast(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\DifferentNamespacesPerFileWithClassAsLast');\n\n        self::assertEquals([\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testGlobalNamespacesPerFileWithClassAsFirst(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(\\GlobalNamespacesPerFileWithClassAsFirst::class);\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testGlobalNamespacesPerFileWithClassAsLast(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(\\GlobalNamespacesPerFileWithClassAsLast::class);\n\n        self::assertEquals([\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testNamespaceWithClosureDeclaration(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\NamespaceWithClosureDeclaration');\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    public function testIfPointerResetsOnMultipleParsingTries(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\NamespaceWithClosureDeclaration');\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n\n        self::assertEquals([\n            'secure'   => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',\n            'route'    => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',\n            'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',\n        ], $parser->parseUseStatements($class));\n    }\n\n    /**\n     * @group DCOM-97\n     * @group regression\n     */\n    public function testClassWithClosure(): void\n    {\n        $parser = new PhpParser();\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\ClassWithClosure');\n\n        self::assertEquals([\n            'annotationtargetall'         => __NAMESPACE__ . '\\Fixtures\\AnnotationTargetAll',\n            'annotationtargetannotation'  => __NAMESPACE__ . '\\Fixtures\\AnnotationTargetAnnotation',\n        ], $parser->parseUseStatements($class));\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/PsrCachedReaderTest.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\nuse Closure;\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Doctrine\\Common\\Annotations\\PsrCachedReader;\nuse Doctrine\\Common\\Annotations\\Reader;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassThatUsesTraitThatUsesAnotherTraitWithMethods;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithClassAnnotationOnly;\nuse Psr\\Cache\\CacheItemInterface;\nuse Psr\\Cache\\CacheItemPoolInterface;\nuse ReflectionClass;\nuse ReflectionMethod;\nuse Symfony\\Component\\Cache\\Adapter\\ArrayAdapter;\nuse Symfony\\Component\\Cache\\CacheItem;\n\nuse function rawurlencode;\nuse function time;\nuse function touch;\n\nuse const PHP_VERSION_ID;\n\nfinal class PsrCachedReaderTest extends AbstractReaderTest\n{\n    /** @var CacheItemPoolInterface */\n    private $cache;\n\n    public function testIgnoresStaleCache(): void\n    {\n        $cache = time() - 10;\n        touch(__DIR__ . '/Fixtures/Controller.php', $cache + 10);\n\n        $this->doTestCacheStale(Fixtures\\Controller::class, $cache);\n    }\n\n    /**\n     * @group 62\n     */\n    public function testIgnoresStaleCacheWithParentClass(): void\n    {\n        $cache = time() - 10;\n        touch(__DIR__ . '/Fixtures/ControllerWithParentClass.php', $cache - 10);\n        touch(__DIR__ . '/Fixtures/AbstractController.php', $cache + 10);\n\n        $this->doTestCacheStale(Fixtures\\ControllerWithParentClass::class, $cache);\n    }\n\n    /**\n     * @group 62\n     */\n    public function testIgnoresStaleCacheWithTraits(): void\n    {\n        $cache = time() - 10;\n        touch(__DIR__ . '/Fixtures/ControllerWithTrait.php', $cache - 10);\n        touch(__DIR__ . '/Fixtures/Traits/SecretRouteTrait.php', $cache + 10);\n\n        $this->doTestCacheStale(Fixtures\\ControllerWithTrait::class, $cache);\n    }\n\n    /**\n     * @group 62\n     */\n    public function testIgnoresStaleCacheWithTraitsThatUseOtherTraits(): void\n    {\n        $cache = time() - 10;\n\n        touch(__DIR__ . '/Fixtures/ClassThatUsesTraitThatUsesAnotherTrait.php', $cache - 10);\n        touch(__DIR__ . '/Fixtures/Traits/EmptyTrait.php', $cache + 10);\n\n        $this->doTestCacheStale(\n            Fixtures\\ClassThatUsesTraitThatUsesAnotherTrait::class,\n            $cache\n        );\n    }\n\n    /**\n     * @group 62\n     */\n    public function testIgnoresStaleCacheWithInterfacesThatExtendOtherInterfaces(): void\n    {\n        $cache = time() - 10;\n\n        touch(__DIR__ . '/Fixtures/InterfaceThatExtendsAnInterface.php', $cache - 10);\n        touch(__DIR__ . '/Fixtures/EmptyInterface.php', $cache + 10);\n\n        $this->doTestCacheStale(\n            Fixtures\\InterfaceThatExtendsAnInterface::class,\n            $cache\n        );\n    }\n\n    /**\n     * @group 62\n     * @group 105\n     */\n    public function testUsesFreshCacheWithTraitsThatUseOtherTraits(): void\n    {\n        $cacheTime = time();\n\n        touch(__DIR__ . '/Fixtures/ClassThatUsesTraitThatUsesAnotherTrait.php', $cacheTime - 10);\n        touch(__DIR__ . '/Fixtures/Traits/EmptyTrait.php', $cacheTime - 10);\n\n        $this->doTestCacheFresh(\n            'Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassThatUsesTraitThatUsesAnotherTrait',\n            $cacheTime\n        );\n    }\n\n    /**\n     * @group 62\n     */\n    public function testPurgeLoadedAnnotations(): void\n    {\n        $cache = time() - 10;\n\n        touch(__DIR__ . '/Fixtures/ClassThatUsesTraitThatUsesAnotherTrait.php', $cache - 10);\n        touch(__DIR__ . '/Fixtures/Traits/EmptyTrait.php', $cache + 10);\n\n        $reader = $this->doTestCacheStale(\n            Fixtures\\ClassThatUsesTraitThatUsesAnotherTrait::class,\n            $cache\n        );\n\n        $classReader = new ReflectionClass(PsrCachedReader::class);\n\n        $loadedAnnotationsProperty = $classReader->getProperty('loadedAnnotations');\n        if (PHP_VERSION_ID < 80100) {\n            $loadedAnnotationsProperty->setAccessible(true);\n        }\n\n        $this->assertCount(1, $loadedAnnotationsProperty->getValue($reader));\n\n        $loadedFilemtimesProperty = $classReader->getProperty('loadedFilemtimes');\n        if (PHP_VERSION_ID < 80100) {\n            $loadedFilemtimesProperty->setAccessible(true);\n        }\n\n        $this->assertCount(3, $loadedFilemtimesProperty->getValue($reader));\n\n        $reader->clearLoadedAnnotations();\n\n        $this->assertCount(0, $loadedAnnotationsProperty->getValue($reader));\n        $this->assertCount(0, $loadedFilemtimesProperty->getValue($reader));\n    }\n\n    /**\n     * As there is a cache on loadedAnnotations, we need to test two different\n     * methods' annotations of the same file\n     *\n     * We test four things\n     * 1. we load the file (and its filemtime) for method1's annotation with fresh cache\n     * 2. we load the file for method2 with stale cache => but still no save, because seen as fresh\n     * 3. we purge loaded annotations and filemtime\n     * 4. same as 2, but this time without filemtime cache, so file seen as stale and new cache is saved\n     *\n     * @group 62\n     * @group 105\n     */\n    public function testAvoidCallingFilemtimeTooMuch(): void\n    {\n        $this->markTestSkipped('Skipped until further investigation');\n\n        $className = ClassThatUsesTraitThatUsesAnotherTraitWithMethods::class;\n        $cacheTime = time() - 10;\n\n        $cacheKeyMethod1 = rawurlencode($className . '#method1');\n        $cacheKeyMethod2 = rawurlencode($className . '#method2');\n\n        $route1          = new Route();\n        $route1->pattern = '/someprefix';\n        $route2          = new Route();\n        $route2->pattern = '/someotherprefix';\n\n        $cacheItem1     = $this->createCacheItem($cacheKeyMethod1, true, [$route1]);\n        $timeCacheItem1 = $this->createCacheItem('[C]' . $cacheKeyMethod1, true, $cacheTime);\n\n        $cacheItem2     = $this->createCacheItem($cacheKeyMethod2, true, [$route2]);\n        $timeCacheItem2 = $this->createCacheItem('[C]' . $cacheKeyMethod2, true, $cacheTime);\n\n        $cache = $this->createMock(CacheItemPoolInterface::class);\n        $cache\n            ->method('getItem')\n            ->willReturnMap([\n                [$cacheKeyMethod1, $cacheItem1],\n                [$cacheKeyMethod2, $cacheItem2],\n                ['[C]' . $cacheKeyMethod1, $timeCacheItem1],\n                ['[C]' . $cacheKeyMethod2, $timeCacheItem2],\n            ]);\n        $cache\n            ->expects($this->exactly(2))\n            ->method('save')\n            ->withConsecutive(\n                [$timeCacheItem2],\n                [$cacheItem2]\n            );\n\n        $reader = new PsrCachedReader(new AnnotationReader(), $cache, true);\n\n        touch(__DIR__ . '/Fixtures/ClassThatUsesTraitThatUsesAnotherTraitWithMethods.php', $cacheTime - 20);\n        touch(__DIR__ . '/Fixtures/Traits/EmptyTrait.php', $cacheTime - 20);\n        $this->assertEquals([$route1], $reader->getMethodAnnotations(new ReflectionMethod($className, 'method1')));\n\n        // only filemtime changes, but not cleared => no change\n        touch(__DIR__ . '/Fixtures/ClassThatUsesTraitThatUsesAnotherTrait.php', $cacheTime + 5);\n        touch(__DIR__ . '/Fixtures/Traits/EmptyTrait.php', $cacheTime + 5);\n        $this->assertEquals([$route2], $reader->getMethodAnnotations(new ReflectionMethod($className, 'method2')));\n\n        $reader->clearLoadedAnnotations();\n        $this->assertEquals([$route2], $reader->getMethodAnnotations(new ReflectionMethod($className, 'method2')));\n    }\n\n    public function testReaderIsNotHitIfCacheIsFresh(): void\n    {\n        $cache = new ArrayAdapter();\n\n        $readAnnotations = (new PsrCachedReader(new AnnotationReader(), $cache, true))\n            ->getClassAnnotations(new ReflectionClass(ClassWithClassAnnotationOnly::class));\n\n        $throwingReader = $this->createMock(Reader::class);\n        $throwingReader->expects(self::never())->method(self::anything());\n\n        self::assertEquals(\n            $readAnnotations,\n            (new PsrCachedReader($throwingReader, $cache, true))\n                ->getClassAnnotations(new ReflectionClass(ClassWithClassAnnotationOnly::class))\n        );\n    }\n\n    public function testReaderDoesNotCacheIfFileDoesNotExistSoLastModificationCannotBeDetermined(): void\n    {\n        $code = <<<'EOS'\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\n/**\n * @\\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetClass(\"Some data\")\n */\nclass PsrCachedEvalClass {\n\n}\nEOS;\n\n        eval($code);\n\n        $reader = new PsrCachedReader(new AnnotationReader(), new ArrayAdapter(), true);\n        // @phpstan-ignore class.notFound\n        $readAnnotations = $reader->getClassAnnotations(new ReflectionClass(PsrCachedEvalClass::class));\n\n        self::assertCount(1, $readAnnotations);\n    }\n\n    protected function doTestCacheStale(string $className, int $lastCacheModification): PsrCachedReader\n    {\n        $cacheKey = rawurlencode($className);\n\n        $route          = new Route();\n        $route->pattern = '/someprefix';\n\n        $cacheItem     = $this->createCacheItem($cacheKey, true, []);\n        $timeCacheItem = $this->createCacheItem('[C]' . $cacheKey, true, $lastCacheModification);\n\n        $cache = $this->createMock(CacheItemPoolInterface::class);\n        $cache\n            ->method('getItem')\n            ->willReturnMap([\n                [$cacheKey, $cacheItem],\n                ['[C]' . $cacheKey, $timeCacheItem],\n            ]);\n        $cache\n            ->expects($this->exactly(2))\n            ->method('save')\n            ->withConsecutive([$timeCacheItem], [$cacheItem]);\n\n        $reader = new PsrCachedReader(new AnnotationReader(), $cache, true);\n\n        self::assertEquals([$route], $reader->getClassAnnotations(new ReflectionClass($className)));\n\n        return $reader;\n    }\n\n    protected function doTestCacheFresh(string $className, int $lastCacheModification): void\n    {\n        $cacheKey       = rawurlencode($className);\n        $route          = new Route();\n        $route->pattern = '/someprefix';\n\n        $cacheItem = $this->createMock(CacheItemInterface::class);\n        $cacheItem\n            ->method('isHit')\n            ->willReturn(true);\n        $cacheItem\n            ->method('get')\n            ->willReturn([$route]);\n\n        $timeCacheItem = $this->createMock(CacheItemInterface::class);\n        $timeCacheItem\n            ->method('isHit')\n            ->willReturn(true);\n        $timeCacheItem\n            ->method('get')\n            ->willReturn($lastCacheModification);\n\n        $cache = $this->createMock(CacheItemPoolInterface::class);\n        $cache\n            ->method('getItem')\n            ->willReturnMap([\n                [$cacheKey, $cacheItem],\n                ['[C]' . $cacheKey, $timeCacheItem],\n            ]);\n        $cache->expects(self::never())->method('save');\n        $cache->expects(self::never())->method('commit');\n\n        $reader = new PsrCachedReader(new AnnotationReader(), $cache, true);\n\n        $this->assertEquals([$route], $reader->getClassAnnotations(new ReflectionClass($className)));\n    }\n\n    protected function getReader(): Reader\n    {\n        $this->cache = new ArrayAdapter();\n\n        return new PsrCachedReader(new AnnotationReader(), $this->cache);\n    }\n\n    /** @param mixed $value */\n    private function createCacheItem(string $key, bool $isHit, $value = null): CacheItemInterface\n    {\n        return Closure::bind(\n            static function (string $key, $value, bool $isHit): CacheItem {\n                $item        = new CacheItem();\n                $item->key   = $key;\n                $item->value = $value;\n                $item->isHit = $isHit;\n\n                return $item;\n            },\n            null,\n            CacheItem::class\n        )($key, $value, $isHit);\n    }\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/ReservedKeywordsClasses.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations;\n\n/** @Annotation */\nclass True\n{\n}\n\n/** @Annotation */\nclass False\n{\n}\n\n/** @Annotation */\nclass Null\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM141Test.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Ticket;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\nuse SimpleXMLElement;\n\n/**\n * @group\n */\nclass DCOM141Test extends TestCase\n{\n    public function testAnnotationPrefixed(): void\n    {\n        $class  = new ReflectionClass(DCOM141ConsumerPrefixed::class);\n        $reader = new AnnotationReader();\n        $annots = $reader->getClassAnnotations($class);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(DCOM141Annotation::class, $annots[0]);\n        self::assertEquals('SimpleXMLElement', $annots[0]->classPath);\n    }\n\n    public function testAnnotationNotPrefixed(): void\n    {\n        $class  = new ReflectionClass(DCOM141ConsumerNotPrefixed::class);\n        $reader = new AnnotationReader();\n        $annots = $reader->getClassAnnotations($class);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(DCOM141Annotation::class, $annots[0]);\n        self::assertEquals('SimpleXMLElement', $annots[0]->classPath);\n    }\n}\n\n/**\n * @Annotation\n */\nclass DCOM141Annotation\n{\n    /** @var mixed */\n    public $classPath;\n}\n\n/**\n * @DCOM141Annotation(SimpleXMLElement::class)\n */\nclass DCOM141ConsumerPrefixed\n{\n}\n\n/**\n * @DCOM141Annotation(SimpleXMLElement::class)\n */\nclass DCOM141ConsumerNotPrefixed\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Ticket;\n\nuse Doctrine\\Common\\Annotations\\AnnotationException;\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Controller;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\n\n/**\n * @group\n */\nclass DCOM55Test extends TestCase\n{\n    public function testIssue(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\\\Dummy');\n        $reader = new AnnotationReader();\n        $this->expectException(AnnotationException::class);\n        $this->expectExceptionMessage(\n            '[Semantical Error] The class \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Controller\"' .\n            ' is not annotated with @Annotation.\nAre you sure this class can be used as annotation?\nIf so, then you need to add @Annotation to the _class_ doc comment of' .\n            ' \"Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Controller\".\nIf it is indeed no annotation, then you need to add @IgnoreAnnotation(\"Controller\")' .\n            ' to the _class_ doc comment of class Doctrine\\Tests\\Common\\Annotations\\Ticket\\Dummy.'\n        );\n        $reader->getClassAnnotations($class);\n    }\n\n    public function testAnnotation(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\\\DCOM55Consumer');\n        $reader = new AnnotationReader();\n        $annots = $reader->getClassAnnotations($class);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(__NAMESPACE__ . '\\\\DCOM55Annotation', $annots[0]);\n    }\n\n    public function testParseAnnotationDocblocks(): void\n    {\n        $class  = new ReflectionClass(__NAMESPACE__ . '\\\\DCOM55Annotation');\n        $reader = new AnnotationReader();\n        $annots = $reader->getClassAnnotations($class);\n\n        self::assertEmpty($annots);\n    }\n}\n\n/**\n * @Controller\n */\nclass Dummy\n{\n}\n\n/**\n * @Annotation\n */\nclass DCOM55Annotation\n{\n}\n\n/**\n * @DCOM55Annotation\n */\nclass DCOM55Consumer\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php",
    "content": "<?php\n// Some class named Entity in the global namespace\n/**\n * @Annotation\n */\nclass Entity\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Test.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Ticket;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Doctrine\\Common\\Annotations\\DocParser;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\n\nuse function array_combine;\nuse function array_map;\n\n//Some class named Entity in the global namespace\ninclude __DIR__ . '/DCOM58Entity.php';\n\n/**\n * @group DCOM58\n */\nclass DCOM58Test extends TestCase\n{\n    public function testIssue(): void\n    {\n        $reader = new AnnotationReader();\n        $result = $reader->getClassAnnotations(new ReflectionClass(__NAMESPACE__ . '\\MappedClass'));\n\n        $classAnnotations = array_combine(\n            array_map('get_class', $result),\n            $result\n        );\n\n        self::assertArrayNotHasKey('', $classAnnotations, 'Class \"xxx\" is not a valid entity or mapped super class.');\n    }\n\n    public function testIssueGlobalNamespace(): void\n    {\n        $docblock = '@Entity';\n        $parser   = new DocParser();\n        $parser->setImports(['__NAMESPACE__' => 'Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM\\Mapping']);\n\n        $annots = $parser->parse($docblock);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(Doctrine\\ORM\\Mapping\\Entity::class, $annots[0]);\n    }\n\n    public function testIssueNamespaces(): void\n    {\n        $docblock = '@Entity';\n        $parser   = new DocParser();\n        $parser->addNamespace('Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM');\n\n        $annots = $parser->parse($docblock);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(Doctrine\\ORM\\Entity::class, $annots[0]);\n    }\n\n    public function testIssueMultipleNamespaces(): void\n    {\n        $docblock = '@Entity';\n        $parser   = new DocParser();\n        $parser->addNamespace('Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM\\Mapping');\n        $parser->addNamespace('Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM');\n\n        $annots = $parser->parse($docblock);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(Doctrine\\ORM\\Mapping\\Entity::class, $annots[0]);\n    }\n\n    public function testIssueWithNamespacesOrImports(): void\n    {\n        $docblock = '@Entity';\n        $parser   = new DocParser();\n        $annots   = $parser->parse($docblock);\n\n        self::assertCount(1, $annots);\n        self::assertInstanceOf(\\Entity::class, $annots[0]);\n    }\n}\n\n/**\n * @Entity\n */\nclass MappedClass\n{\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM\\Mapping;\n\n/**\n * @Annotation\n */\nclass Entity\n{\n}\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM;\n\n/**\n * @Annotation\n */\nclass Entity\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php",
    "content": "<?php\n\nuse Doctrine\\Common\\Annotations\\Annotation;\n\n/** @Annotation */\nclass TopLevelAnnotation extends Annotation\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/DoctrineTestCase.php",
    "content": "<?php\n\nnamespace Doctrine\\Tests;\n\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * Base testcase class for all Doctrine testcases.\n */\nabstract class DoctrineTestCase extends TestCase\n{\n}\n"
  },
  {
    "path": "tests/Doctrine/Tests/TestInit.php",
    "content": "<?php\n\n/*\n * This file bootstraps the test environment.\n */\nerror_reporting(E_ALL);\n\n// register silently failing autoloader\nspl_autoload_register(static function ($class) {\n    if (strpos($class, 'Doctrine\\Tests\\\\') !== 0) {\n        return;\n    }\n\n    $path = __DIR__ . '/../../' . strtr($class, '\\\\', '/') . '.php';\n    if (is_file($path) && is_readable($path)) {\n        require_once $path;\n\n        return true;\n    }\n});\n\nrequire_once __DIR__ . '/../../../vendor/autoload.php';\n"
  }
]