mirror of
https://github.com/danog/Valinor.git
synced 2024-11-26 20:24:40 +01:00
misc: remove unused code
This commit is contained in:
parent
ad0f8fee17
commit
b2889a3ba0
@ -9,13 +9,6 @@ use CuyZ\Valinor\Definition\EmptyAttributes;
|
||||
use CuyZ\Valinor\Definition\ParameterDefinition;
|
||||
use CuyZ\Valinor\Definition\PropertyDefinition;
|
||||
use CuyZ\Valinor\Type\Type;
|
||||
use CuyZ\Valinor\Type\Types\NonEmptyStringType;
|
||||
use CuyZ\Valinor\Type\Types\NullType;
|
||||
use CuyZ\Valinor\Type\Types\PositiveIntegerType;
|
||||
use CuyZ\Valinor\Type\Types\ShapedArrayElement;
|
||||
use CuyZ\Valinor\Type\Types\ShapedArrayType;
|
||||
use CuyZ\Valinor\Type\Types\StringValueType;
|
||||
use CuyZ\Valinor\Type\Types\UnionType;
|
||||
|
||||
/** @internal */
|
||||
final class Argument
|
||||
@ -37,24 +30,6 @@ final class Argument
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public static function forDateTime(): self
|
||||
{
|
||||
return new self('value', new UnionType(
|
||||
new UnionType(PositiveIntegerType::get(), NonEmptyStringType::get()),
|
||||
new ShapedArrayType(
|
||||
new ShapedArrayElement(
|
||||
new StringValueType('datetime'),
|
||||
new UnionType(PositiveIntegerType::get(), NonEmptyStringType::get())
|
||||
),
|
||||
new ShapedArrayElement(
|
||||
new StringValueType('format'),
|
||||
new UnionType(NullType::get(), NonEmptyStringType::get()),
|
||||
true
|
||||
),
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public static function fromParameter(ParameterDefinition $parameter): self
|
||||
{
|
||||
$instance = new self($parameter->name(), $parameter->type());
|
||||
|
Loading…
Reference in New Issue
Block a user