-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test fixture for rectorphp/rector#6928
- Loading branch information
1 parent
e27e483
commit 56f80d2
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/nested_array.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\GenericAnnotation; | ||
use Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\ConstantReference; | ||
|
||
/** | ||
* @GenericAnnotation( | ||
* properties={ | ||
* ConstantReference::FIRST_NAME = "John", | ||
* } | ||
* ) | ||
*/ | ||
final class NestedArray | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\GenericAnnotation; | ||
use Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\ConstantReference; | ||
|
||
#[GenericAnnotation(properties: [ConstantReference::FIRST_NAME => 'John'])] | ||
final class NestedArray | ||
{ | ||
} | ||
|
||
?> |
10 changes: 10 additions & 0 deletions
10
rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Source/ConstantReference.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source; | ||
|
||
final class ConstantReference | ||
{ | ||
public const FIRST_NAME = 'firstName'; | ||
} |