Skip to content

Commit

Permalink
Merge pull request #55 from godaddy-wordpress/fix-stans
Browse files Browse the repository at this point in the history
fix phpstan issues
  • Loading branch information
dsmith4-godaddy authored Nov 13, 2024
2 parents 697248a + e64859e commit 193e45f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Client/GuzzleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function ($retries,
if ($exception) {
return false;
}
if ($response && $response instanceof Response && $response->getStatusCode() !== 502) {
if ($response instanceof Response && $response->getStatusCode() !== 502) {
return false;
}
return $retries < $this->maxRetries;
Expand Down
3 changes: 1 addition & 2 deletions src/Command/Accounts/AddCollabToAcctCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
return 0;
}

private function roleToInt(string $role)
private function roleToInt(string $role)
{
$role = strtolower($role);
switch($role) {
Expand Down Expand Up @@ -94,6 +94,5 @@ private function roleToInt(string $role)
default:
return false;
}
// return false;
}
}
1 change: 1 addition & 0 deletions src/Command/Ares/RedirectsUploadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$file = file_get_contents($file);

// parse the csv
/** @var array $data */
$data = array_map('str_getcsv', explode("\n", trim($file)));

$columns = array_values($data[0]);
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Auth/LoginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Pagely\AtomicClient\Command\Command;
use GuzzleHttp\Exception\BadResponseException;
use Pagely\AtomicClient\API\AuthApi;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -43,6 +44,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$question = new Question('Password: ');
$question->setHidden(true);

/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
$password = $helper->ask($input, $output, $question);

Expand Down
2 changes: 1 addition & 1 deletion src/Command/SSL/AppCertUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function configure()
->addArgument('certID', InputArgument::REQUIRED, 'Certificate ID')
->addArgument('aliasID', InputArgument::REQUIRED, 'Alias ID')
;
$this->addCertLinkOptions();
$this->addCertLinkOptions($this);
$this->addOauthOptions();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Command/SSL/CertLinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function configure()
->addArgument('certID', InputArgument::REQUIRED, 'Certificate ID')
->addArgument('aliasID', InputArgument::REQUIRED, 'Alias ID')
;
$this->addCertLinkOptions();
$this->addCertLinkOptions($this);
$this->addOauthOptions();
}

Expand Down
5 changes: 2 additions & 3 deletions src/Command/SSL/CertLinkCommandTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
*/
trait CertLinkCommandTrait
{
public function addCertLinkOptions() {
/** @var Command $this */
$this
public function addCertLinkOptions(Command $cmd) {
$cmd
->addOption('hsts', null, InputOption::VALUE_REQUIRED, 'HSTS Cache Length in Seconds')
->addOption('http2', null, InputOption::VALUE_REQUIRED, 'En/Disable HTTP2 protocol (0 or 1)')
->addOption('tlsConfig', null, InputOption::VALUE_REQUIRED, 'Custom TLS configuration')
Expand Down

0 comments on commit 193e45f

Please sign in to comment.