git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58ef35a
)
PRS-2 formatting: else and braces
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 11 Apr 2015 23:49:34 +0000
(
00:49
+0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 11 Apr 2015 23:49:34 +0000
(
00:49
+0100)
src/Client.php
patch
|
blob
|
history
src/Encoder.php
patch
|
blob
|
history
src/Helper/Http.php
patch
|
blob
|
history
src/Request.php
patch
|
blob
|
history
src/Server.php
patch
|
blob
|
history
tests/3LocalhostTest.php
patch
|
blob
|
history
diff --git
a/src/Client.php
b/src/Client.php
index
00195af
..
7473afe
100644
(file)
--- a/
src/Client.php
+++ b/
src/Client.php
@@
-1081,8
+1081,7
@@
class Client
{
if (PHP_SAPI != 'cli') {
print "<PRE>\n".htmlentities($message)."\n</PRE>";
{
if (PHP_SAPI != 'cli') {
print "<PRE>\n".htmlentities($message)."\n</PRE>";
- }
- else {
+ } else {
print "\n$message\n";
}
// let the client see this now in case http times out...
print "\n$message\n";
}
// let the client see this now in case http times out...
diff --git
a/src/Encoder.php
b/src/Encoder.php
index
2955f44
..
e19dada
100644
(file)
--- a/
src/Encoder.php
+++ b/
src/Encoder.php
@@
-244,8
+244,7
@@
class Encoder
if (!in_array($valEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($xmlVal)) {
if ($valEncoding == 'ISO-8859-1') {
$xmlVal = utf8_encode($xmlVal);
if (!in_array($valEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($xmlVal)) {
if ($valEncoding == 'ISO-8859-1') {
$xmlVal = utf8_encode($xmlVal);
- }
- else {
+ } else {
if (extension_loaded('mbstring')) {
$xmlVal = mb_convert_encoding($xmlVal, 'UTF-8', $valEncoding);
} else {
if (extension_loaded('mbstring')) {
$xmlVal = mb_convert_encoding($xmlVal, 'UTF-8', $valEncoding);
} else {
diff --git
a/src/Helper/Http.php
b/src/Helper/Http.php
index
141cfe4
..
2fc7b80
100644
(file)
--- a/
src/Helper/Http.php
+++ b/
src/Helper/Http.php
@@
-253,8
+253,7
@@
class Http
{
if (PHP_SAPI != 'cli') {
print "<PRE>\n".htmlentities($message)."\n</PRE>";
{
if (PHP_SAPI != 'cli') {
print "<PRE>\n".htmlentities($message)."\n</PRE>";
- }
- else {
+ } else {
print "\n$message\n";
}
}
print "\n$message\n";
}
}
diff --git
a/src/Request.php
b/src/Request.php
index
e6816a3
..
66e723f
100644
(file)
--- a/
src/Request.php
+++ b/
src/Request.php
@@
-239,8
+239,7
@@
class Request
if (!in_array($respEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($data)) {
if ($respEncoding == 'ISO-8859-1') {
$data = utf8_encode($data);
if (!in_array($respEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($data)) {
if ($respEncoding == 'ISO-8859-1') {
$data = utf8_encode($data);
- }
- else {
+ } else {
if (extension_loaded('mbstring')) {
$data = mb_convert_encoding($data, 'UTF-8', $respEncoding);
} else {
if (extension_loaded('mbstring')) {
$data = mb_convert_encoding($data, 'UTF-8', $respEncoding);
} else {
@@
-370,8
+369,7
@@
class Request
print "<PRE>\n".htmlentities($message)."\n</PRE>";
else
print "<PRE>\n".htmlspecialchars($message)."\n</PRE>";
print "<PRE>\n".htmlentities($message)."\n</PRE>";
else
print "<PRE>\n".htmlspecialchars($message)."\n</PRE>";
- }
- else {
+ } else {
print "\n$message\n";
}
}
print "\n$message\n";
}
}
diff --git
a/src/Server.php
b/src/Server.php
index
40afa9b
..
8a378c3
100644
(file)
--- a/
src/Server.php
+++ b/
src/Server.php
@@
-457,8
+457,7
@@
class Server
if (!in_array($reqEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($data)) {
if ($reqEncoding == 'ISO-8859-1') {
$data = utf8_encode($data);
if (!in_array($reqEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($data)) {
if ($reqEncoding == 'ISO-8859-1') {
$data = utf8_encode($data);
- }
- else {
+ } else {
if (extension_loaded('mbstring')) {
$data = mb_convert_encoding($data, 'UTF-8', $reqEncoding);
} else {
if (extension_loaded('mbstring')) {
$data = mb_convert_encoding($data, 'UTF-8', $reqEncoding);
} else {
diff --git
a/tests/3LocalhostTest.php
b/tests/3LocalhostTest.php
index
0e34bc8
..
99bb490
100644
(file)
--- a/
tests/3LocalhostTest.php
+++ b/
tests/3LocalhostTest.php
@@
-107,8
+107,7
@@
class LocalhostTest extends PHPUnit_Framework_TestCase
}
if (is_array($errrorcode)) {
$this->assertContains($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
}
if (is_array($errrorcode)) {
$this->assertContains($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
- }
- else {
+ } else {
$this->assertEquals($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
}
if (!$r->faultCode()) {
$this->assertEquals($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
}
if (!$r->faultCode()) {