for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Ray\Di\Di;
use Attribute;
use function is_array;
use function is_string;
#[Attribute(Attribute::TARGET_PARAMETER)]
/**
* Annotates named things
*
* @Annotation
* @Target("METHOD")
*/
final class Named
{
/** @var string */
public $value = '';
* @param array{value: string}|string $value
public function __construct($value)
if (is_array($value)) {
// doctrine/annotations
$this->value = $value['value'];
}
if (is_string($value)) {
// php8 attribute
$this->value = $value;