Skip to content

Commit

Permalink
Run phpstan on code base
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Di Rocco committed Jul 22, 2018
1 parent 4a7f869 commit 7f519a7
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 103 deletions.
168 changes: 84 additions & 84 deletions composer.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/Client/SoapClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class SoapClient extends \SoapClient implements LoggerAwareInterface

protected $structs;
protected $methods;
protected $_requestXml;

public function __construct($endpoint, $options = [])
{
Expand Down Expand Up @@ -171,7 +172,7 @@ protected function __parseAllStructs()
if (true === empty($types)) {
$this->logger->debug('Found 0 structs in WSDL');
} else {
$this->logger->debug('Found following structs in WSDL: ' . print_r($types, 1));
$this->logger->debug('Found following structs in WSDL: ' . print_r($types, true));
}

foreach ($types as $raw_struct) {
Expand All @@ -182,7 +183,7 @@ protected function __parseAllStructs()
continue;
}

$this->logger->debug('Found struct `' . $struct['name'] . '` with arguments ' .print_r($struct['body'], 1));
$this->logger->debug('Found struct `' . $struct['name'] . '` with arguments ' . print_r($struct['body'], true));

$this->structs[$struct['name']] = $struct['body'];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/CallMethodCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->logger->debug('Calling method took ' . (microtime(true) - $start_time) . ' seconds');
unset($start_time);

$output->writeln(print_r($response, true));
$output->writeln((string) print_r($response, true));
}
}
2 changes: 1 addition & 1 deletion src/Command/ListMethodsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
foreach (array_keys($this->soapClient->__getMethods()) as $method) {
$output->writeln($method);
$output->writeln((string) $method);
}
}
}
2 changes: 1 addition & 1 deletion src/File/TmpFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct()
{
$tmpfile = tmpfile();

if (false === $tmpfile) {
if (!is_resource($tmpfile)) {
throw new \RuntimeException('Unable to create a tmp file');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Helper/StdinHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function read($blocking = null)
}

if (false === is_null($blocking)) {
stream_set_blocking($stream, (bool) $blocking ? 1 : 0);
stream_set_blocking($stream, (bool) $blocking);
}

$buffer = null;
Expand Down
13 changes: 0 additions & 13 deletions src/Listener/CommandEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,4 @@ public function onCommandAction(ConsoleCommandEvent $event)

$command->setSoapClient($this->container->get('soap_client'));
}

// protected function getEndpoint(InputInterface $input)
// {
// $endpoint = $input->getOption('endpoint');

// if (false === is_null($endpoint)) {
// return $endpoint;
// } elseif (true === array_key_exists('SOAPCLIENT_ENDPOINT', $_SERVER)) {
// return $_SERVER['SOAPCLIENT_ENDPOINT'];
// } else {
// throw new \InvalidArgumentException('You must specify an endpoint.');
// }
// }
}

0 comments on commit 7f519a7

Please sign in to comment.