for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Annotations\Fixtures\Metadata;
use Doctrine\Annotations\Metadata\AnnotationMetadata;
use Doctrine\Annotations\Metadata\AnnotationTarget;
use Doctrine\Annotations\Metadata\PropertyMetadata;
use Doctrine\Annotations\Metadata\Type\BooleanType;
use Doctrine\Annotations\Metadata\Type\FloatType;
use Doctrine\Annotations\Metadata\Type\IntegerType;
use Doctrine\Annotations\Metadata\Type\ListType;
use Doctrine\Annotations\Metadata\Type\MapType;
use Doctrine\Annotations\Metadata\Type\MixedType;
use Doctrine\Annotations\Metadata\Type\ObjectType;
use Doctrine\Annotations\Metadata\Type\StringType;
use Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAll;
use Doctrine\Tests\Annotations\Fixtures\AnnotationWithVarType;
final class AnnotationWithVarTypeMetadata
{
public static function get(): AnnotationMetadata
return new AnnotationMetadata(
AnnotationWithVarType::class,
new AnnotationTarget(AnnotationTarget::TARGET_ALL),
false,
[
new PropertyMetadata(
'mixed',
new MixedType(),
true
),
'boolean',
new BooleanType()
'bool',
'float',
new FloatType()
'string',
new StringType()
'integer',
new IntegerType()
'array',
new ListType(new MixedType())
'arrayMap',
new MapType(new StringType(), new MixedType())
'annotation',
new ObjectType(AnnotationTargetAll::class)
'arrayOfIntegers',
new ListType(new IntegerType())
'arrayOfStrings',
new ListType(new StringType())
'arrayOfAnnotations',
new ListType(new ObjectType(AnnotationTargetAll::class))
]
);
}