/** * get a string of CLI-formatted subjects * * @throws \RuntimeException * @return string The subjects string */ private function getCLISubjects() { $command = ''; if (!is_null($this->commandSubject)) { $command .= ' '; if ($this->commandSubject instanceof SubCommandCommand) { $command .= $this->commandSubject->getCommand(); } else { if (is_array($this->commandSubject)) { $command .= implode(' ', array_map('escapeshellarg', $this->commandSubject)); } else { $command .= escapeshellarg($this->commandSubject); } } } if (!is_null($this->commandSubject2)) { $command .= ' '; if ($this->commandSubject2 instanceof SubCommandCommand) { $command .= $this->commandSubject2->getCommand(); } else { if (is_array($this->commandSubject2)) { $command .= implode(' ', array_map('escapeshellarg', $this->commandSubject2)); } else { $command .= escapeshellarg($this->commandSubject2); } } } return $command; }
/** * get a string of CLI-formatted subjects * * @throws \RuntimeException * @return string The subjects string */ private function getCLISubjects() { $command = ''; if (!is_null($this->commandSubject)) { $command .= ' '; if ($this->commandSubject instanceof SubCommandCommand) { $command .= $this->commandSubject->getCommand(); } else { $command .= escapeshellarg($this->commandSubject); } } if (!is_null($this->commandSubject2)) { $command .= ' '; if ($this->commandSubject2 instanceof SubCommandCommand) { $command .= $this->commandSubject2->getCommand(); } else { $command .= escapeshellarg($this->commandSubject2); } } return $command; }