Skip to content

Refactor ScreenManager for improved command execution #8

Refactor ScreenManager for improved command execution

Refactor ScreenManager for improved command execution #8

Triggered via push May 29, 2025 16:42
Status Success
Total duration 1m 15s
Artifacts

ci.yml

on: push
Dependency Validation
23s
Dependency Validation
Coding Guidelines
9s
Coding Guidelines
Static Analysis
18s
Static Analysis
Coverage
17s
Coverage
Mutation Tests
40s
Mutation Tests
Matrix: Unit Tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation Tests: src/Manager/ScreenManager.php#L54
Escaped Mutant for Mutator "LogicalNot": @@ @@ $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); - if (!$shell || !is_executable($shell)) { + if (!$shell || is_executable($shell)) { $shell = '/bin/sh'; } $process = new Process(['screen', '-L', '-Logfile', $logFile, '-dmS', $screenName, $shell, '-c', $escapedCommand], $this->getBaseDirectory(), ['APP_ENV' => $this->environment], null, 5);
Mutation Tests: src/Manager/ScreenManager.php#L54
Escaped Mutant for Mutator "LogicalNot": @@ @@ $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); - if (!$shell || !is_executable($shell)) { + if ($shell || !is_executable($shell)) { $shell = '/bin/sh'; } $process = new Process(['screen', '-L', '-Logfile', $logFile, '-dmS', $screenName, $shell, '-c', $escapedCommand], $this->getBaseDirectory(), ['APP_ENV' => $this->environment], null, 5);
Mutation Tests: src/Manager/ScreenManager.php#L47
Escaped Mutant for Mutator "ArrayItem": @@ @@ } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile); - $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); + $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' > $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); if (!$shell || !is_executable($shell)) {
Mutation Tests: src/Manager/ScreenManager.php#L46
Escaped Mutant for Mutator "ArrayItem": @@ @@ } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile); - $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); + $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' > $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); if (!$shell || !is_executable($shell)) {
Mutation Tests: src/Manager/ScreenManager.php#L45
Escaped Mutant for Mutator "ArrayItem": @@ @@ } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile); - $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); + $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' > $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); if (!$shell || !is_executable($shell)) {
Mutation Tests: src/Manager/ScreenManager.php#L44
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile); - $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); + $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); if (!$shell || !is_executable($shell)) {
Mutation Tests: src/Manager/ScreenManager.php#L44
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile); - $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); + $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['command' => $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL'); if (!$shell || !is_executable($shell)) {
Mutation Tests: src/Manager/ScreenManager.php#L42
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ $this->filesystem->mkdir($logDir); } $logFile = $this->getLogFile($screenName); - $this->filesystem->remove($logFile); + $this->logger->info(\sprintf('Starting screen "%s"', $screen->getName()), ['screen' => $screen->getName(), 'command' => $screen->getCommand(), 'environment' => $this->environment]); $escapedCommand = implode(' ', array_map('escapeshellarg', $screen->getCommand())); $shell = getenv('SHELL');
Mutation Tests: src/Manager/ScreenManager.php#L37
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ $screenName = $this->generateScreenName($screen); $logDir = $this->getLogDirectory(); if (!$this->filesystem->exists($logDir)) { - $this->filesystem->mkdir($logDir); + } $logFile = $this->getLogFile($screenName); $this->filesystem->remove($logFile);
Mutation Tests: src/Manager/ScreenManager.php#L36
Escaped Mutant for Mutator "LogicalNot": @@ @@ } $screenName = $this->generateScreenName($screen); $logDir = $this->getLogDirectory(); - if (!$this->filesystem->exists($logDir)) { + if ($this->filesystem->exists($logDir)) { $this->filesystem->mkdir($logDir); } $logFile = $this->getLogFile($screenName);