mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Add deprecations
This commit is contained in:
@@ -92,6 +92,7 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): ?self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -58,12 +58,16 @@ final class Param extends TagWithType implements Factory\StaticMethod
|
||||
$this->isReference = $isReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Create using static factory is deprecated, this method should not be called directly by library consumers
|
||||
*/
|
||||
public static function create(
|
||||
string $body,
|
||||
?TypeResolver $typeResolver = null,
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -53,6 +53,7 @@ final class Property extends TagWithType implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -53,6 +53,7 @@ final class PropertyRead extends TagWithType implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -53,6 +53,7 @@ final class PropertyWrite extends TagWithType implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -38,6 +38,7 @@ final class Return_ extends TagWithType implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ final class Var_ extends TagWithType implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($typeResolver);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
Reference in New Issue
Block a user