Skip to content

Commit 195ecd3

Browse files
author
Andrew Carter
committed
Moved default values into DaemonRunCommand
1 parent 8327fab commit 195ecd3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/ApplicationFactory.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,13 @@ class ApplicationFactory implements ApplicationFactoryInterface
2121
*/
2222
public function __construct(DaemonFactoryInterface $daemonFactory = null)
2323
{
24-
if (null === $daemonFactory) {
25-
$this->daemonFactory = new DaemonFactory;
26-
} else {
27-
$this->daemonFactory = $daemonFactory;
28-
}
24+
$this->daemonFactory = $daemonFactory;
2925
}
3026

3127
/**
3228
* {@inheritdoc}
3329
*/
34-
public function createApplication($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon')
30+
public function createApplication($kernel, $commandName = null, $commandDescription = null)
3531
{
3632
$command = $this->createCommand($kernel, $commandName, $commandDescription);
3733

@@ -44,8 +40,8 @@ public function createApplication($kernel, $commandName = 'run', $commandDescrip
4440
/**
4541
* {@inheritdoc}
4642
*/
47-
public function createCommand($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon')
43+
public function createCommand($kernel, $commandName = null, $commandDescription = null)
4844
{
49-
return new DaemonRunCommand($commandName, $commandDescription, $this->daemonFactory, $kernel);
45+
return new DaemonRunCommand($kernel, $this->daemonFactory, $commandName, $commandDescription);
5046
}
5147
}

0 commit comments

Comments
 (0)