Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
0a108b48
Commit
0a108b48
authored
May 14, 2014
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#598 - Minor CS/cleanups in the ConsoleRunner
parent
4b9da747
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
ConsoleRunner.php
lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php
+11
-4
No files found.
lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php
View file @
0a108b48
...
...
@@ -19,7 +19,10 @@
namespace
Doctrine\DBAL\Tools\Console
;
use
Doctrine\DBAL\Driver\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Tools\Console\Command\ImportCommand
;
use
Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand
;
use
Doctrine\DBAL\Tools\Console\Command\RunSqlCommand
;
use
Symfony\Component\Console\Helper\HelperSet
;
use
Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper
;
use
Symfony\Component\Console\Application
;
...
...
@@ -34,6 +37,7 @@ class ConsoleRunner
* Create a Symfony Console HelperSet
*
* @param Connection $connection
*
* @return HelperSet
*/
static
public
function
createHelperSet
(
Connection
$connection
)
...
...
@@ -54,9 +58,12 @@ class ConsoleRunner
static
public
function
run
(
HelperSet
$helperSet
,
$commands
=
array
())
{
$cli
=
new
Application
(
'Doctrine Command Line Interface'
,
Version
::
VERSION
);
$cli
->
setCatchExceptions
(
true
);
$cli
->
setHelperSet
(
$helperSet
);
self
::
addCommands
(
$cli
);
$cli
->
addCommands
(
$commands
);
$cli
->
run
();
}
...
...
@@ -69,9 +76,9 @@ class ConsoleRunner
static
public
function
addCommands
(
Application
$cli
)
{
$cli
->
addCommands
(
array
(
new
\Doctrine\DBAL\Tools\Console\Command\
RunSqlCommand
(),
new
\Doctrine\DBAL\Tools\Console\Command\
ImportCommand
(),
new
\Doctrine\DBAL\Tools\Console\Command\
ReservedWordsCommand
(),
new
RunSqlCommand
(),
new
ImportCommand
(),
new
ReservedWordsCommand
(),
));
}
...
...
Write
Preview
Markdown
is supported
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