Skip to content

Commit 9ff6705

Browse files
authored
Merge pull request #6 from WsdlToPhp/feature/issue-5
issue #5 - fix call to parent class
2 parents a1b759d + e9b7d60 commit 9ff6705

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Wsdl.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,14 @@ public function getElementsByNameAndAttributes(string $name, array $attributes,
7272
}
7373

7474
/**
75-
* Handles any method that exist within the parent class,
75+
* Handles any method that exists within the parent class,
7676
* in addition it handles the case when we want to use the external schemas to search in.
7777
*
7878
* @return mixed
7979
*/
8080
protected function useParentMethodAndExternals(string $method, array $parameters, bool $includeExternals = false, bool $returnOne = false)
8181
{
82-
$result = call_user_func_array([
83-
$this,
84-
sprintf('parent::%s', $method),
85-
], $parameters);
82+
$result = parent::{$method}(...$parameters);
8683

8784
if ($includeExternals && (!$returnOne || empty($result))) {
8885
$result = $this->useExternalSchemas($method, $parameters, $result, $returnOne);
@@ -96,10 +93,7 @@ protected function useExternalSchemas(string $method, array $parameters, ?array
9693
$result = $parentResult;
9794

9895
foreach ($this->getExternalSchemas() as $externalSchema) {
99-
$externalResult = call_user_func_array([
100-
$externalSchema,
101-
$method,
102-
], $parameters);
96+
$externalResult = call_user_func_array([$externalSchema, $method], $parameters);
10397

10498
if ($returnOne && !is_null($externalResult)) {
10599
$result = $externalResult;

0 commit comments

Comments
 (0)