Skip to content

Commit 83c8eae

Browse files
authored
Apply fixes from StyleCI (#130)
Co-authored-by: Gregor Becker <[email protected]>
1 parent 8ce9782 commit 83c8eae

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

src/Driver/ExtSoap/AbusedClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __doRequest($request, $location, $action, $version, $oneWay = 0)
6262

6363
public function collectRequest(): SoapRequest
6464
{
65-
if (!$this->storedRequest) {
65+
if (! $this->storedRequest) {
6666
throw new \RuntimeException('No request has been registered yet.');
6767
}
6868

@@ -80,12 +80,12 @@ public function cleanUpTemporaryState()
8080
$this->storedResponse = null;
8181
}
8282

83-
public function __getLastRequest() : string
83+
public function __getLastRequest(): string
8484
{
8585
return $this->__last_request;
8686
}
8787

88-
public function __getLastResponse() : string
88+
public function __getLastResponse(): string
8989
{
9090
return $this->__last_response;
9191
}

src/Driver/ExtSoap/ExtSoapDecoder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function decode(string $method, SoapResponse $response)
3434
} finally {
3535
$this->client->cleanUpTemporaryState();
3636
}
37+
3738
return $decoded;
3839
}
3940
}

src/Driver/ExtSoap/ExtSoapDriver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function __construct(
4040
DecoderInterface $decoder,
4141
MetadataInterface $metadata
4242
) {
43-
4443
$this->client = $client;
4544
$this->encoder = $encoder;
4645
$this->decoder = $decoder;

src/Driver/ExtSoap/Metadata/MethodsParser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function (string $methodString) {
3636
private function parseMethodFromString(string $methodString): Method
3737
{
3838
$methodString = $this->transformListResponseToArray($methodString);
39+
3940
return new Method(
4041
$this->parseName($methodString),
4142
$this->parseParameters($methodString),
@@ -54,15 +55,15 @@ private function transformListResponseToArray(string $methodString): string
5455
private function parseParameters(string $methodString): array
5556
{
5657
preg_match('/\((.*)\)/', $methodString, $properties);
57-
if (!$properties[1]) {
58+
if (! $properties[1]) {
5859
return [];
5960
}
6061

6162
$parameters = preg_split('/,\s?/', $properties[1]);
6263

6364
return array_map(
6465
function (string $parameter): Parameter {
65-
list($type, $name) = explode(' ', trim($parameter));
66+
[$type, $name] = explode(' ', trim($parameter));
6667

6768
return new Parameter(
6869
ltrim($name, '$'),

src/Driver/ExtSoap/Metadata/TypesParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function parse(AbusedClient $abusedClient): TypeCollection
3030
foreach ($soapTypes as $soapType) {
3131
$properties = [];
3232
$lines = explode("\n", $soapType);
33-
if (!preg_match('/struct (?P<typeName>.*) {/', $lines[0], $matches)) {
33+
if (! preg_match('/struct (?P<typeName>.*) {/', $lines[0], $matches)) {
3434
continue;
3535
}
3636
$xsdType = XsdType::create($matches['typeName']);

tests/Unit/SoapClientTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,17 @@ public function testSoapOptions(): void
137137
self::assertStringContainsString('application/soap+xml; charset="utf-8', $lastRequestInfo->getLastRequestHeaders());
138138
}
139139

140-
/**
141-
*
142-
*/
143140
public function testRealSoapCall(): void
144141
{
145142
$this->markTestSkipped('Real Soap Call Testing. Comment the line out for testing');
146143
// location has to be set because the wsdl has a wrong location declaration
147144
$client = Soap::baseWsdl('https://www.w3schools.com/xml/tempconvert.asmx?wsdl')
148145
->withOptions([
149146
'soap_version' => SOAP_1_2,
150-
'location' => 'https://www.w3schools.com/xml/tempconvert.asmx?wsdl'
147+
'location' => 'https://www.w3schools.com/xml/tempconvert.asmx?wsdl',
151148
]);
152149
$result = $client->call('FahrenheitToCelsius', [
153-
'Fahrenheit' => 75
150+
'Fahrenheit' => 75,
154151
]);
155152
self::assertArrayHasKey('FahrenheitToCelsiusResult', $result->json());
156153
}

0 commit comments

Comments
 (0)