.
This commit is contained in:
commit
a5ce423afe
30 changed files with 1807 additions and 0 deletions
33
tests/Classes/StackedAspectsClass.php
Normal file
33
tests/Classes/StackedAspectsClass.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Classes;
|
||||
|
||||
use Tests\Aspects\BasicAspect;
|
||||
use Tests\Aspects\LoggingAspect;
|
||||
|
||||
class StackedAspectsClass
|
||||
{
|
||||
#[BasicAspect]
|
||||
#[LoggingAspect]
|
||||
public function multipleAspects(int $value, object $tracker): int
|
||||
{
|
||||
return $value * 2;
|
||||
}
|
||||
|
||||
#[BasicAspect]
|
||||
public function onlyBasic(int $value, object $tracker): int
|
||||
{
|
||||
return $value + 1;
|
||||
}
|
||||
|
||||
#[LoggingAspect]
|
||||
public function onlyLogging(string $message): string
|
||||
{
|
||||
return strtoupper($message);
|
||||
}
|
||||
|
||||
public function noAspects(): string
|
||||
{
|
||||
return 'plain';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue