mirror of
https://github.com/danog/Valinor.git
synced 2024-12-02 17:48:14 +01:00
38 lines
958 B
PHP
38 lines
958 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace CuyZ\Valinor\Tests\Fixture\Object;
|
||
|
|
||
|
use CuyZ\Valinor\Tests\Fixture\Attribute\AttributeWithArguments;
|
||
|
use CuyZ\Valinor\Tests\Fixture\Attribute\BasicAttribute;
|
||
|
use CuyZ\Valinor\Tests\Fixture\Attribute\NestedAttribute;
|
||
|
|
||
|
#[BasicAttribute]
|
||
|
#[AttributeWithArguments('foo', 'bar')]
|
||
|
#[NestedAttribute([
|
||
|
new BasicAttribute(),
|
||
|
new AttributeWithArguments('foo', 'bar'),
|
||
|
])]
|
||
|
// @PHP8.0 move to anonymous class
|
||
|
final class ObjectWithNestedAttributes
|
||
|
{
|
||
|
#[BasicAttribute]
|
||
|
#[AttributeWithArguments('foo', 'bar')]
|
||
|
#[NestedAttribute([
|
||
|
new BasicAttribute(),
|
||
|
new AttributeWithArguments('foo', 'bar'),
|
||
|
])]
|
||
|
public bool $property;
|
||
|
|
||
|
#[BasicAttribute]
|
||
|
#[AttributeWithArguments('foo', 'bar')]
|
||
|
#[NestedAttribute([
|
||
|
new BasicAttribute(),
|
||
|
new AttributeWithArguments('foo', 'bar'),
|
||
|
])]
|
||
|
public function method(#[BasicAttribute] string $parameter): void
|
||
|
{
|
||
|
}
|
||
|
}
|