Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-cs-fixer, PhpStorm #34

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e10d4c0
php-cs-fixer
mambax7 Jun 10, 2018
f6c868c
update version to 0.9.6
mambax7 Jun 10, 2018
eb64ea1
Case mismatch in function/method call
mambax7 Jun 10, 2018
cdaa69a
Array short syntax
mambax7 Jun 10, 2018
98f13da
private access
mambax7 Jun 10, 2018
2c1f783
Field 'namespaces' is already defined in \nusoap_base
mambax7 Jun 10, 2018
460228e
Unnecessary double quotes
mambax7 Jun 10, 2018
98d3071
Yoda conditions style
mambax7 Jun 11, 2018
ea470d4
mt_rand
mambax7 Jun 11, 2018
871a4e6
Alias functions usage
mambax7 Jun 11, 2018
9904f0e
Elvis operator
mambax7 Jun 11, 2018
ba8839e
null comparison
mambax7 Jun 11, 2018
0c93041
PHPDoc
mambax7 Jun 11, 2018
6f77a6e
access level
mambax7 Jun 11, 2018
d6b7c42
Callable calls in loops termination condition
mambax7 Jun 11, 2018
802aa09
'str(i)str(...)' could be replaced with 'str(i)pos(...)'
mambax7 Jun 11, 2018
3470885
'substr(...)' short-hand usage
mambax7 Jun 11, 2018
a1b48e8
Alias functions usage
mambax7 Jun 11, 2018
d19c175
Type casting
mambax7 Jun 11, 2018
79403f5
Callable parameter usage violates definition
mambax7 Jun 11, 2018
c730cc2
Short syntax for applied operation
mambax7 Jun 11, 2018
bcf47f1
remove break;
mambax7 Jun 11, 2018
89a8e1d
strict comparison
mambax7 Jun 11, 2018
114746d
Null assignment can be safely removed.
mambax7 Jun 11, 2018
fef779f
Assignment in condition
mambax7 Jun 11, 2018
4b8bd2b
Countable
mambax7 Jun 11, 2018
6f5676d
Return value type is not compatible with declared
mambax7 Jun 11, 2018
cfc1972
PHPDoc
mambax7 Jun 11, 2018
af769a0
file_get_contents(...)
mambax7 Jun 11, 2018
dfb4d0c
strict comparison
mambax7 Jun 11, 2018
76651cc
missing function, types
mambax7 Jun 11, 2018
1c51d8d
Missing @return tag
mambax7 Jun 11, 2018
59a55fd
'safe_mode' was removed in PHP 5.4.0.
mambax7 Jun 11, 2018
8049be8
'substr(...)' replaced with 'strpos(...)'
mambax7 Jun 11, 2018
263a85a
PHPDoc
mambax7 Jun 11, 2018
538bacf
cosmetics
mambax7 Jun 12, 2018
e26730a
fixes
mambax7 Jun 12, 2018
60ba9d6
cosmetics
mambax7 Jun 13, 2018
09bfdb0
cosmetics
mambax7 Jun 13, 2018
65758be
fixes
mambax7 Jun 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cosmetics
  • Loading branch information
mambax7 committed Jun 13, 2018
commit 09bfdb09e4a2a59be5759ce1e2aa90e0b04f7c19
28 changes: 19 additions & 9 deletions src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ public function serialize_val($val, $name = false, $type = false, $name_ns = fal
break;
case (is_array($val) || $type):
// detect if struct or array

$array_types = [];
$tt_ns = $tt = '';
$valueType = $this->isArraySimpleOrStruct($val);
if ('arraySimple' === $valueType || preg_match('/^ArrayOf/', $type)) {
$this->debug('serialize_val: serialize array');
Expand Down Expand Up @@ -1161,9 +1162,9 @@ class Nusoap_xmlschema extends Nusoap_base
/**
* Constructor
*
* @param string $schema schema document URI
* @param string $xml xml document URI
* @param array|string $namespaces namespaces defined in enclosing XML
* @param string $schema schema document URI
* @param string $xml xml document URI
* @param array $namespaces namespaces defined in enclosing XML
*/
public function __construct($schema = '', $xml = '', $namespaces = [])
{
Expand Down Expand Up @@ -1285,6 +1286,8 @@ private function CreateTypeName($ename)
public function schemaStartElement($parser, $name, $attrs)
{
// position in the total number of elements, starting from 0
$eAttrs = [];
$aname = '';
$pos = $this->position++;
$depth = $this->depth++;
// set self as current value for this depth
Expand Down Expand Up @@ -1853,6 +1856,7 @@ public function getPHPType($type, $ns)
*/
public function getTypeDef($type)
{
$typeDef = [];
//$this->debug("in getTypeDef for type $type");
if ('^' === mb_substr($type, -1)) {
$is_element = 1;
Expand Down Expand Up @@ -1940,6 +1944,7 @@ public function getTypeDef($type)
*/
public function serializeTypeDef($type)
{
$str = '';
//print "in sTD() for type $type<br>";
if (false !== ($typeDef = $this->getTypeDef($type))) {
$str .= '<' . $type;
Expand Down Expand Up @@ -1978,6 +1983,7 @@ public function serializeTypeDef($type)
*/
public function typeToForm($name, $type)
{
$buffer .= '';
// get typedef
if (false !== ($typeDef = $this->getTypeDef($type))) {
// if struct
Expand Down Expand Up @@ -2219,7 +2225,7 @@ class Soap_transport_http extends Nusoap_base
public $digest_uri = '';
public $scheme = '';
public $host = '';
public $port = '';
public $port = 0;
public $path = '';
public $request_method = 'POST';
public $protocol_version = '1.0';
Expand All @@ -2240,7 +2246,9 @@ class Soap_transport_http extends Nusoap_base
public $password = '';
public $authtype = '';
public $digestRequest = [];
public $certRequest = []; // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional)
public $certRequest = [];
public $tryagain;
// keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional)
// cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem'
// sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem'
// sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem'
Expand Down Expand Up @@ -2602,13 +2610,14 @@ private function connect($connection_timeout = 0, $response_timeout = 30)
* @param int $timeout set connection timeout in seconds
* @param int $response_timeout set response timeout in seconds
* @param array $cookies cookies to send
* @return string data
* @return string|bool data
*/
public function send($data, $timeout = 0, $response_timeout = 30, $cookies = null)
{
$this->debug('entered send() with data of length: ' . mb_strlen($data));
$this->tryagain = true;
$tries = 0;
$respdata = '';
while ($this->tryagain) {
$this->tryagain = false;
if (++$tries < 2) {
Expand Down Expand Up @@ -2997,10 +3006,11 @@ private function sendRequest($data, $cookies = null)
/**
* Gets the SOAP response via HTTP[S]
*
* @return string the response (also sets member variables like incoming_payload)
* @return string|bool the response (also sets member variables like incoming_payload)
*/
private function getResponse()
{
$header_array = [];
$this->incoming_payload = '';
if ('socket' === $this->io_method()) {
// loop until headers have been retrieved
Expand Down Expand Up @@ -4084,7 +4094,7 @@ private function invoke_method()
$instance = new $class();
$call_arg = [&$instance, $method];
}
if (is_array($this->methodparams)) {
if (is_array($this->methodparams) && count($this->methodparams) > 0) {
$this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams));
} else {
$this->methodreturn = call_user_func_array($call_arg, []);
Expand Down