Total Complexity | 2 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ArgumentBag { |
||
16 | /** |
||
17 | * The argument this bag is for. |
||
18 | * @var \CharlotteDunois\Livia\Arguments\Argument |
||
19 | */ |
||
20 | public $argument; |
||
21 | |||
22 | /** |
||
23 | * The values. |
||
24 | * @var mixed[] |
||
25 | */ |
||
26 | public $values = array(); |
||
27 | |||
28 | /** |
||
29 | * Maximum number of times to prompt for the argument. |
||
30 | * @var int|float |
||
31 | */ |
||
32 | public $promptLimit; |
||
33 | |||
34 | /** |
||
35 | * The prompt messages. |
||
36 | * @var \CharlotteDunois\Yasmin\Models\Message[] |
||
37 | */ |
||
38 | public $prompts = array(); |
||
39 | |||
40 | /** |
||
41 | * The answer messages. |
||
42 | * @var \CharlotteDunois\Yasmin\Models\Message[] |
||
43 | */ |
||
44 | public $answers = array(); |
||
45 | |||
46 | /** |
||
47 | * Whether the bag got cancelled. |
||
48 | * @var string|null |
||
49 | */ |
||
50 | public $cancelled; |
||
51 | |||
52 | /** |
||
53 | * Whether we are done. |
||
54 | * @var bool |
||
55 | */ |
||
56 | public $done = false; |
||
57 | |||
58 | /** |
||
59 | * Constructor. |
||
60 | * @param \CharlotteDunois\Livia\Arguments\Argument $argument |
||
61 | * @param int|float $promptLimit |
||
62 | * @internal |
||
63 | */ |
||
64 | function __construct(\CharlotteDunois\Livia\Arguments\Argument $argument, $promptLimit = \INF) { |
||
65 | $this->argument = $argument; |
||
66 | $this->promptLimit = $promptLimit; |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * Closes the bag formally and returns itself. |
||
71 | * @return $this |
||
72 | */ |
||
73 | function done() { |
||
76 | } |
||
77 | } |
||
78 |