File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Argument
9
9
/** @var callable */
10
10
private $ validation ;
11
11
/** @var string */
12
- private $ description ;
12
+ private $ name ;
13
13
14
14
/**
15
15
* Creates a new argument.
@@ -18,15 +18,15 @@ class Argument
18
18
* @param callable|null $validation a validation function (optional)
19
19
* @throws \InvalidArgumentException
20
20
*/
21
- public function __construct ($ default = null , $ validation = null , $ description = "arg " )
21
+ public function __construct ($ default = null , $ validation = null , $ name = "arg " )
22
22
{
23
23
if (!is_null ($ default )) {
24
24
$ this ->setDefaultValue ($ default );
25
25
}
26
26
if (!is_null ($ validation )) {
27
27
$ this ->setValidation ($ validation );
28
28
}
29
- $ this ->description = $ description ;
29
+ $ this ->name = $ name ;
30
30
}
31
31
32
32
/**
@@ -104,12 +104,12 @@ public function getDefaultValue()
104
104
}
105
105
106
106
/**
107
- * Retrieve the descriptopm
107
+ * Retrieve the argument name
108
108
*
109
109
* @return string
110
110
*/
111
- public function getDescription ()
111
+ public function getName ()
112
112
{
113
- return $ this ->description ;
113
+ return $ this ->name ;
114
114
}
115
- }
115
+ }
Original file line number Diff line number Diff line change @@ -225,10 +225,10 @@ public function getHelpText($padding = 25)
225
225
$ mode = '' ;
226
226
break ;
227
227
case self ::REQUIRED_ARGUMENT :
228
- $ mode = "< " .$ option ->getArgument ()->getDescription ()."> " ;
228
+ $ mode = "< " .$ option ->getArgument ()->getName ()."> " ;
229
229
break ;
230
230
case self ::OPTIONAL_ARGUMENT :
231
- $ mode = "[< " .$ option ->getArgument ()->getDescription ().">] " ;
231
+ $ mode = "[< " .$ option ->getArgument ()->getName ().">] " ;
232
232
break ;
233
233
}
234
234
$ short = ($ option ->short ()) ? '- ' .$ option ->short () : '' ;
You can’t perform that action at this time.
0 commit comments