Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
code
Commits
6fbed43f
Commit
6fbed43f
authored
8 months ago
by
Laurent Lecluse
Browse files
Options
Downloads
Patches
Plain Diff
Amélioration du templace command
parent
65426743
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#32058
failed
8 months ago
Stage: publish
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/template/Command.php
+6
-3
6 additions, 3 deletions
code/template/Command.php
with
6 additions
and
3 deletions
code/template/Command.php
+
6
−
3
View file @
6fbed43f
...
@@ -2,19 +2,22 @@
...
@@ -2,19 +2,22 @@
namespace
<
namespace
>
;
namespace
<
namespace
>
;
use
Symfony\Component\Console\Command\Command
as
SymfonyCommand
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
use
Symfony\Component\Console\Style\SymfonyStyle
;
/**
/**
* Description of <classname>
* Description of <classname>
*
*
* @author <author>
* @author <author>
*/
*/
class
<
classname
>
extends
Symfony
Command
class
<
classname
>
extends
Command
{
{
protected
function
execute
(
InputInterface
$input
,
OutputInterface
$output
):
int
protected
function
execute
(
InputInterface
$input
,
OutputInterface
$output
):
int
{
{
$io
=
new
SymfonyStyle
(
$input
,
$output
);
// ... put here the code to create the user
// ... put here the code to create the user
// this method must return an integer number with the "exit status code"
// this method must return an integer number with the "exit status code"
...
@@ -22,7 +25,7 @@ class <classname> extends SymfonyCommand
...
@@ -22,7 +25,7 @@ class <classname> extends SymfonyCommand
// return this if there was no problem running the command
// return this if there was no problem running the command
// (it's equivalent to returning int(0))
// (it's equivalent to returning int(0))
return
Symfony
Command
::
SUCCESS
;
return
Command
::
SUCCESS
;
// or return this if some error happened during the execution
// or return this if some error happened during the execution
// (it's equivalent to returning int(1))
// (it's equivalent to returning int(1))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment