Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
describeCommands example
$this
->
describeInputDefinition
(
$definition
)
;
}
}
protected
function
describeApplication
(
Application
$application
, array
$options
=
[
]
)
: void
{
$description
=
new
ApplicationDescription
(
$application
,
$options
[
'namespace'
]
?? null
)
;
$title
=
$this
->
getApplicationTitle
(
$application
)
;
$this
->
write
(
$title
."\n".
str_repeat
(
$this
->partChar, Helper::
width
(
$title
)
)
)
;
$this
->
createTableOfContents
(
$description
,
$application
)
;
$this
->
describeCommands
(
$application
,
$options
)
;
}
private
function
getApplicationTitle
(
Application
$application
)
: string
{
if
(
'UNKNOWN' ===
$application
->
getName
(
)
)
{
return
'Console Tool';
}
if
(
'UNKNOWN' !==
$application
->
getVersion
(
)
)
{
return
sprintf
(
'%s %s',
$application
->
getName
(
)
,
$application
->
getVersion
(
)
)
;
}
$this
->
describeInputDefinition
(
$definition
)
;
}
}
protected
function
describeApplication
(
Application
$application
, array
$options
=
[
]
)
: void
{
$description
=
new
ApplicationDescription
(
$application
,
$options
[
'namespace'
]
?? null
)
;
$title
=
$this
->
getApplicationTitle
(
$application
)
;
$this
->
write
(
$title
."\n".
str_repeat
(
$this
->partChar, Helper::
width
(
$title
)
)
)
;
$this
->
createTableOfContents
(
$description
,
$application
)
;
$this
->
describeCommands
(
$application
,
$options
)
;
}
private
function
getApplicationTitle
(
Application
$application
)
: string
{
if
(
'UNKNOWN' ===
$application
->
getName
(
)
)
{
return
'Console Tool';
}
if
(
'UNKNOWN' !==
$application
->
getVersion
(
)
)
{
return
sprintf
(
'%s %s',
$application
->
getName
(
)
,
$application
->
getVersion
(
)
)
;
}