Skip to content

Commit

Permalink
Merge pull request #142 from MotaWord/master
Browse files Browse the repository at this point in the history
refactor deprecated join() usage
  • Loading branch information
schlessera committed Mar 3, 2021
2 parents 27f2a3b + ad3df39 commit e472e08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/cli/Arguments.php
Expand Up @@ -482,7 +482,7 @@ private function _parseOption($option) {
}
}

$this[$option->key] = join($values, ' ');
$this[$option->key] = join(' ', $values);
return true;
}
}
6 changes: 3 additions & 3 deletions lib/cli/arguments/HelpScreen.php
Expand Up @@ -56,7 +56,7 @@ public function render() {
array_push($help, $this->_renderFlags());
array_push($help, $this->_renderOptions());

return join($help, "\n\n");
return join("\n\n", $help);
}

private function _renderFlags() {
Expand Down Expand Up @@ -97,7 +97,7 @@ private function _renderScreen($options, $max) {
array_push($help, $formatted);
}

return join($help, "\n");
return join("\n", $help);
}

private function _consume($options) {
Expand All @@ -111,7 +111,7 @@ private function _consume($options) {
array_push($names, '-' . $alias);
}

$names = join($names, ', ');
$names = join(', ', $names);
$max = max(strlen($names), $max);
$out[$names] = $settings;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/arguments/InvalidArguments.php
Expand Up @@ -38,6 +38,6 @@ public function getArguments() {
private function _generateMessage() {
return 'unknown argument' .
(count($this->arguments) > 1 ? 's' : '') .
': ' . join($this->arguments, ', ');
': ' . join(', ', $this->arguments);
}
}

0 comments on commit e472e08

Please sign in to comment.