Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 32359e9

Browse files
derrabusnicolas-grekas
authored andcommitted
Fix inconsistent return points.
1 parent 7664549 commit 32359e9

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

Command/ServerStartCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
155155

156156
return 1;
157157
}
158+
159+
return null;
158160
}
159161
}

Command/ServerStatusCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8888
return 1;
8989
}
9090
}
91+
92+
return null;
9193
}
9294
}

Command/ServerStopCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6262

6363
return 1;
6464
}
65+
66+
return null;
6567
}
6668
}

WebServerConfig.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ public function getAddress()
101101
return $this->hostname.':'.$this->port;
102102
}
103103

104+
/**
105+
* @param string $documentRoot
106+
* @param string $env
107+
*
108+
* @return string|null
109+
*/
104110
private function findFrontController($documentRoot, $env)
105111
{
106112
$fileNames = $this->getFrontControllerFileNames($env);
@@ -110,13 +116,23 @@ private function findFrontController($documentRoot, $env)
110116
return $fileName;
111117
}
112118
}
119+
120+
return null;
113121
}
114122

123+
/**
124+
* @param string $env
125+
*
126+
* @return array
127+
*/
115128
private function getFrontControllerFileNames($env)
116129
{
117130
return ['app_'.$env.'.php', 'app.php', 'index_'.$env.'.php', 'index.php'];
118131
}
119132

133+
/**
134+
* @return int
135+
*/
120136
private function findBestPort()
121137
{
122138
$port = 8000;

0 commit comments

Comments
 (0)