function DocParserTest::getAnnotationVarTypeProviderInvalid
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::getAnnotationVarTypeProviderInvalid()
- 9 core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::getAnnotationVarTypeProviderInvalid()
- 8.9.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::getAnnotationVarTypeProviderInvalid()
- main core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::getAnnotationVarTypeProviderInvalid()
@phpstan-ignore missingType.return
File
-
core/
tests/ Drupal/ Tests/ Component/ Annotation/ Doctrine/ DocParserTest.php, line 462
Class
- DocParserTest
- This class is a near-copy of Doctrine\Tests\Common\Annotations\DocParserTest, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.
Namespace
Drupal\Tests\Component\Annotation\DoctrineCode
public static function getAnnotationVarTypeProviderInvalid() {
//({attribute name}, {type declared type}, {attribute value} , {given type or class})
return array(
// boolean type
array(
'boolean',
'boolean',
'1',
'integer',
),
array(
'boolean',
'boolean',
'1.2',
'double',
),
array(
'boolean',
'boolean',
'"str"',
'string',
),
array(
'boolean',
'boolean',
'{1,2,3}',
'array',
),
array(
'boolean',
'boolean',
'@Name',
'an instance of Drupal\\Tests\\Component\\Annotation\\Doctrine\\Name',
),
// alias for internal type boolean
array(
'bool',
'bool',
'1',
'integer',
),
array(
'bool',
'bool',
'1.2',
'double',
),
array(
'bool',
'bool',
'"str"',
'string',
),
array(
'bool',
'bool',
'{"str"}',
'array',
),
// integer type
array(
'integer',
'integer',
'true',
'boolean',
),
array(
'integer',
'integer',
'false',
'boolean',
),
array(
'integer',
'integer',
'1.2',
'double',
),
array(
'integer',
'integer',
'"str"',
'string',
),
array(
'integer',
'integer',
'{"str"}',
'array',
),
array(
'integer',
'integer',
'{1,2,3,4}',
'array',
),
// alias for internal type double
array(
'float',
'float',
'true',
'boolean',
),
array(
'float',
'float',
'false',
'boolean',
),
array(
'float',
'float',
'123',
'integer',
),
array(
'float',
'float',
'"str"',
'string',
),
array(
'float',
'float',
'{"str"}',
'array',
),
array(
'float',
'float',
'{12.34}',
'array',
),
array(
'float',
'float',
'{1,2,3}',
'array',
),
// string type
array(
'string',
'string',
'true',
'boolean',
),
array(
'string',
'string',
'false',
'boolean',
),
array(
'string',
'string',
'12',
'integer',
),
array(
'string',
'string',
'1.2',
'double',
),
array(
'string',
'string',
'{"str"}',
'array',
),
array(
'string',
'string',
'{1,2,3,4}',
'array',
),
// annotation instance
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'true',
'boolean',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'false',
'boolean',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'12',
'integer',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'1.2',
'double',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'{"str"}',
'array',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'{1,2,3,4}',
'array',
),
array(
'annotation',
'Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
'@Name',
'an instance of Drupal\\Tests\\Component\\Annotation\\Doctrine\\Name',
),
);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.