Code Duplication    Length = 6-8 lines in 2 locations

Command/StartScheduledWorkerCommand.php 1 location

@@ 97-104 (lines=8) @@
94
        // In windows: When you pass an environment to CMD it replaces the old environment
95
        // That means we create a lot of problems with respect to user accounts and missing vars
96
        // this is a workaround where we add the vars to the existing environment.
97
        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
98
            foreach ($env as $key => $value) {
99
                putenv($key . "=" . $value);
100
            }
101
            $env = NULL;
102
        }
103
104
        $process = new Process($workerCommand, NULL, $env, NULL, NULL);
105
106
        $output->writeln(\sprintf('Starting worker <info>%s</info>', $process->getCommandLine()));
107

Command/StartWorkerCommand.php 1 location

@@ 120-125 (lines=6) @@
117
        // In windows: When you pass an environment to CMD it replaces the old environment
118
        // That means we create a lot of problems with respect to user accounts and missing vars
119
        // this is a workaround where we add the vars to the existing environment.
120
        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
121
            foreach ($env as $key => $value) {
122
                putenv($key . "=" . $value);
123
            }
124
            $env = NULL;
125
        }
126
127
        $process = new Process($workerCommand, NULL, $env, NULL, NULL);
128