Skip to content

Instantly share code, notes, and snippets.

@crazywhalecc
Created April 3, 2022 12:37
Show Gist options
  • Save crazywhalecc/47b3e53f9604a797578feebd0a0803c1 to your computer and use it in GitHub Desktop.
Save crazywhalecc/47b3e53f9604a797578feebd0a0803c1 to your computer and use it in GitHub Desktop.
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Annotations\Annotation\Required;
use ZM\Annotation\AnnotationBase;
/**
* Class CommandArgument
* @Annotation
* @NamedArgumentConstructor()
* @Target("ALL")
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_ALL)]
class CommandArgument extends AnnotationBase
{
/**
* @var string
* @Required()
*/
public $name;
/**
* @var string
*/
public $description = '';
/**
* @var bool
*/
public $required = false;
/**
* @var string
*/
public $prompt = '';
/**
* @var string
*/
public $default = '';
public function __construct($name, $description = '', $required = false, $prompt = '', $default = '')
{
$this->name = $name;
$this->description = $description;
$this->required = $required;
$this->prompt = $prompt;
$this->default = $default;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment