Skip to content

Commit e472e08

Browse files
authored
Merge pull request #142 from MotaWord/master
refactor deprecated join() usage
2 parents 27f2a3b + ad3df39 commit e472e08

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/cli/Arguments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ private function _parseOption($option) {
482482
}
483483
}
484484

485-
$this[$option->key] = join($values, ' ');
485+
$this[$option->key] = join(' ', $values);
486486
return true;
487487
}
488488
}

lib/cli/arguments/HelpScreen.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function render() {
5656
array_push($help, $this->_renderFlags());
5757
array_push($help, $this->_renderOptions());
5858

59-
return join($help, "\n\n");
59+
return join("\n\n", $help);
6060
}
6161

6262
private function _renderFlags() {
@@ -97,7 +97,7 @@ private function _renderScreen($options, $max) {
9797
array_push($help, $formatted);
9898
}
9999

100-
return join($help, "\n");
100+
return join("\n", $help);
101101
}
102102

103103
private function _consume($options) {
@@ -111,7 +111,7 @@ private function _consume($options) {
111111
array_push($names, '-' . $alias);
112112
}
113113

114-
$names = join($names, ', ');
114+
$names = join(', ', $names);
115115
$max = max(strlen($names), $max);
116116
$out[$names] = $settings;
117117
}

lib/cli/arguments/InvalidArguments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function getArguments() {
3838
private function _generateMessage() {
3939
return 'unknown argument' .
4040
(count($this->arguments) > 1 ? 's' : '') .
41-
': ' . join($this->arguments, ', ');
41+
': ' . join(', ', $this->arguments);
4242
}
4343
}

0 commit comments

Comments
 (0)