Skip to content

Commit

Permalink
Fix spelling of oneOf (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Feb 7, 2023
1 parent e449670 commit df82d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Processors/CleanUnusedComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function cleanup(Analysis $analysis): bool
$usedRefs[$annotation->ref] = $annotation->ref;
}

foreach (['allOf', 'anyOf', 'oneOff'] as $sub) {
foreach (['allOf', 'anyOf', 'oneOf'] as $sub) {
if (property_exists($annotation, $sub) && !Generator::isDefault($annotation->{$sub})) {
foreach ($annotation->{$sub} as $subElem) {
if (is_object($subElem) && property_exists($subElem, 'ref') && !Generator::isDefault($subElem->ref) && $subElem->ref !== null) {
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/Concerns/CollectorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function traverse(OA\AbstractAnnotation $annotation): \SplObjectStorage

$storage->attach($annotation);

foreach (array_merge($annotation::$_nested, ['allOf', 'anyOf', 'oneOff', 'callbacks']) as $properties) {
foreach (array_merge($annotation::$_nested, ['allOf', 'anyOf', 'oneOf', 'callbacks']) as $properties) {
foreach ((array) $properties as $property) {
if (isset($annotation->{$property})) {
$storage->addAll($this->traverseNested($annotation->{$property}));
Expand Down

0 comments on commit df82d1b

Please sign in to comment.