Skip to content

Commit

Permalink
Merge branch 'release/0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelcom committed Jan 13, 2025
2 parents 0266d66 + 7b5bb86 commit 4067dc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 1.0.7 - 2025/01/13
- issue #5, pr #6 - fix call to parent class

## 1.0.6 - 2024/12/10
- Add Sonar tools
- Minor type hinting
Expand Down
12 changes: 3 additions & 9 deletions src/Wsdl.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,14 @@ public function getElementsByNameAndAttributes(string $name, array $attributes,
}

/**
* Handles any method that exist within the parent class,
* Handles any method that exists within the parent class,
* in addition it handles the case when we want to use the external schemas to search in.
*
* @return mixed
*/
protected function useParentMethodAndExternals(string $method, array $parameters, bool $includeExternals = false, bool $returnOne = false)
{
$result = call_user_func_array([
$this,
sprintf('parent::%s', $method),
], $parameters);
$result = parent::{$method}(...$parameters);

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

foreach ($this->getExternalSchemas() as $externalSchema) {
$externalResult = call_user_func_array([
$externalSchema,
$method,
], $parameters);
$externalResult = call_user_func_array([$externalSchema, $method], $parameters);

if ($returnOne && !is_null($externalResult)) {
$result = $externalResult;
Expand Down

0 comments on commit 4067dc4

Please sign in to comment.