rector/rules/DowngradePhp80/ValueObject/DowngradeAttributeToAnnotation.php
Tomas Votruba 98ca09597d Updated Rector to commit 0c035c390d4afd73b76f186313d4b7f7d906e072
5689cbe017 remove passing extra fileInfo with file, already included 7bba40aa32 remove OPTION_ prefix c2ce6104d3 remove extra parma in value object 77a90c5fd4 remove is cache debug ff3de640d4 add shot options constant 0c035c390d misc
2021-06-22 15:56:17 +00:00

37 lines
779 B
PHP

<?php
declare (strict_types=1);
namespace Rector\DowngradePhp80\ValueObject;
final class DowngradeAttributeToAnnotation
{
/**
* @var string
*/
private $attributeClass;
/**
* @var string|null
*/
private $tag;
/**
* @param class-string $attributeClass
* @param class-string|string|null $tag
*/
public function __construct(string $attributeClass, ?string $tag = null)
{
$this->attributeClass = $attributeClass;
$this->tag = $tag;
}
public function getAttributeClass() : string
{
return $this->attributeClass;
}
public function getTag() : string
{
if ($this->tag === null) {
return $this->attributeClass;
}
return $this->tag;
}
}