Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
MagicWord
Commits
895dd44e
Commit
895dd44e
authored
Jan 17, 2019
by
Arnaud Bey
Browse files
clean code
parent
73683629
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/src/MagicWordBundle/Command/GetMassiveJSONCommand.php
View file @
895dd44e
...
...
@@ -24,12 +24,13 @@ class GetMassiveJSONCommand extends ContainerAwareCommand
$em
=
$this
->
getContainer
()
->
get
(
'doctrine'
)
->
getEntityManager
(
'default'
);
$exportManager
=
$this
->
getContainer
()
->
get
(
'mw_manager.export'
);
$massiveId
=
$input
->
getArgument
(
'massiveId'
);
$massive
=
$em
->
getRepository
(
'MagicWordBundle:GameType\Massive'
)
->
find
(
$massiveId
);
if
(
$massive
)
{
$output
->
writeln
(
'<info>#########################</info>'
);
if
(
$massive
=
$em
->
getRepository
(
'MagicWordBundle:GameType\Massive'
)
->
find
(
$massiveId
))
{
$output
->
writeln
(
'<info>############ JSON EXPORT (id: '
.
$massiveId
.
') #############</info>'
);
$array
=
$exportManager
->
exportGame
(
$massive
);
$output
->
writeln
(
json_encode
(
$array
));
$output
->
writeln
(
'<info>#########################</info>'
);
$output
->
writeln
(
'<info>################################################</info>'
);
}
else
{
$output
->
writeln
(
'<error>No massive game found for this id ('
.
$massiveId
.
')</error>'
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment