Skip to content

Commit

Permalink
Corrects implode() usage and uses wraps ints in '' to satisfy PHP 7.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Apr 11, 2020
1 parent 1768181 commit 2ef0296
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
@@ -1,9 +1,8 @@
sudo: false
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
cache:
directories:
- $HOME/.composer/cache
Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -9,6 +9,7 @@
],
"license": "MIT",
"require": {
"php": ">=7.1",
"typhonius/acquia-php-sdk-v2": "^2.0.0",
"typhonius/acquia-logstream": "^0.5",
"consolidation/robo": "^2",
Expand Down
6 changes: 4 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Commands/DomainCommand.php
Expand Up @@ -79,8 +79,8 @@ public function domainInfo(OutputInterface $output, Domains $domainAdapter, $uui
$domain->hostname,
$domain->flags->active ? '✓' : '',
$domain->flags->dns_resolves ? '✓' : '',
implode($domain->ip_addresses, "\n"),
implode($domain->cnames, "\n"),
implode("\n", $domain->ip_addresses),
implode("\n", $domain->cnames),
],
]
);
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/EnvironmentsCommand.php
Expand Up @@ -50,7 +50,7 @@ public function environmentList(Environments $environmentsAdapter, OutputInterfa
$environment->uuid,
$environment->name,
$environment->label,
implode($environment->domains, "\n"),
implode("\n", $environment->domains),
],
]
);
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/LogForwardCommand.php
Expand Up @@ -86,7 +86,7 @@ public function logforwardInfo(
$this->say(sprintf('Expires at: %s', $logForward->credentials->certificate->expires_at));
$this->say(sprintf('Token: %s', $logForward->credentials->token));
$this->say(sprintf('Key: %s', $logForward->credentials->key));
$this->say(sprintf('Sources: %s%s', "\n", implode($logForward->sources, "\n")));
$this->say(sprintf('Sources: %s%s', "\n", implode("\n", $logForward->sources)));
$this->say(sprintf('Health: %s', $logForward->health->summary));
}
}
2 changes: 1 addition & 1 deletion src/Commands/SslCertificateCommand.php
Expand Up @@ -49,7 +49,7 @@ public function sslCertificateList(
[
$certificate->id,
$certificate->label,
implode($certificate->domains, "\n"),
implode("\n", $certificate->domains),
$certificate->expires_at,
$certificate->flags->active ? '✓' : '',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/Commands/DbBackupCommandTest.php
Expand Up @@ -97,7 +97,7 @@ public function dbBackupProvider()

return [
[
['database:backup:restore', 'devcloud:devcloud2', 'dev', 'dbName', 1234],
['database:backup:restore', 'devcloud:devcloud2', 'dev', 'dbName', '1234'],
'> Restoring backup 1234 to dbName on Dev' . PHP_EOL
],
[
Expand All @@ -117,7 +117,7 @@ public function dbBackupProvider()
$dbBackupList . PHP_EOL
],
[
['database:backup:link', 'devcloud:devcloud2', 'dev', 'dbName', 1234],
['database:backup:link', 'devcloud:devcloud2', 'dev', 'dbName', '1234'],
$dbLink . PHP_EOL
],
];
Expand Down
2 changes: 1 addition & 1 deletion tests/Commands/LogForwardCommandTest.php
Expand Up @@ -48,7 +48,7 @@ public function logForwardProvider()
$listResponse . PHP_EOL
],
[
['lf:info', 'devcloud:devcloud2', 'dev', 1234],
['lf:info', 'devcloud:devcloud2', 'dev', '1234'],
$infoResponse . PHP_EOL,
]
];
Expand Down
2 changes: 1 addition & 1 deletion tests/Commands/SslCertificateCommandTest.php
Expand Up @@ -53,7 +53,7 @@ public function sslCertificateProvider()
$listResponse . PHP_EOL
],
[
['ssl:info', 'devcloud:devcloud2', 'dev', 1234],
['ssl:info', 'devcloud:devcloud2', 'dev', '1234'],
$infoResponse . PHP_EOL,
]
];
Expand Down

0 comments on commit 2ef0296

Please sign in to comment.