-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Fratily\Tests\AttributeLoader\Helper; | ||
|
||
class BarNotAttribute extends FooAttribute {} | ||
class BarNotAttribute extends FooAttribute | ||
{ | ||
} |
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Fratily\Tests\AttributeLoader\Helper; | ||
|
||
use Attribute; | ||
|
||
#[Attribute()] | ||
class BazAttribute extends BarNotAttribute {} | ||
class BazAttribute extends BarNotAttribute | ||
{ | ||
} |
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Fratily\Tests\AttributeLoader\Helper; | ||
|
||
use Attribute; | ||
|
||
#[Attribute()] | ||
class FooAttribute {} | ||
class FooAttribute | ||
{ | ||
} |
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
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
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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Fratily\Tests\AttributeLoader\Unit\LoadTest; | ||
declare(strict_types=1); | ||
|
||
use Fratily\Tests\AttributeLoader\Helper\FooAttribute; | ||
use Fratily\Tests\AttributeLoader\Helper\BarNotAttribute; | ||
use Fratily\Tests\AttributeLoader\Helper\BazAttribute; | ||
|
||
#[FooAttribute] | ||
function func_foo_attribute(): void {} | ||
function func_foo_attribute(): void | ||
{ | ||
} | ||
|
||
// @phpstan-ignore-next-line not an Attribute class. | ||
#[BarNotAttribute] | ||
function func_bar_not_attribute(): void {} | ||
function func_bar_not_attribute(): void | ||
{ | ||
} | ||
|
||
#[BazAttribute] | ||
function func_baz_attribute(): void {} | ||
function func_baz_attribute(): void | ||
{ | ||
} | ||
|
||
#[BazAttribute, FooAttribute] | ||
function func_baz_and_foo_attribute(): void {} | ||
function func_baz_and_foo_attribute(): void | ||
{ | ||
} |