Commit 1811e00c authored by Ludovic Ganée's avatar Ludovic Ganée

correction tests

parent f0a32c97
Pipeline #8477 failed with stage
in 19 seconds
......@@ -128,7 +128,7 @@ class WorkerShell extends Shell
public function main($worker = null)
{
// On récupère la liste des workers selon les valeurs par défaut ou le param dir
$workers = WorkerShell::availablesWorkers($this->param('dir'), $this->param('suffix'), $dir);
$workers = WorkerShell::availablesWorkers($this->param('dir'), $this->param('suffix'));
$availables = array_keys($workers);
// On récupère le worker défini en s'assurant qu'il soit parmis les dispos
......@@ -219,9 +219,11 @@ class WorkerShell extends Shell
* @return array[\ReflectionClass]
* @throws \ReflectionException
*/
public static function availablesWorkers($dirs = [], string $suffix = 'Worker')
public static function availablesWorkers($dirs = [], $suffix = 'Worker')
{
if (is_string($dirs)) {
if (is_null($dirs)) {
$dirs = [];
} elseif (is_string($dirs)) {
$dirs = (array)$dirs;
}
$dirs = array_filter($dirs);
......@@ -252,7 +254,7 @@ class WorkerShell extends Shell
* @param string $suffix
* @throws \ReflectionException
*/
protected static function parseWorkerClassname($filename, &$workers, string $suffix = 'Worker')
protected static function parseWorkerClassname($filename, &$workers, $suffix = 'Worker')
{
$tokens = token_get_all(file_get_contents($filename));
$inNamespace = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment