Skip to content

Commit 0b3e5e3

Browse files
authored
Remove unnecessary use (#2023)
1 parent 467bcbd commit 0b3e5e3

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/Generator/InputGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,15 +627,13 @@ private function addUse(StructureShape $shape, ClassBuilder $classBuilder, array
627627
$fqdn = $this->namespaceRegistry->getObject($memberShape)->getFqdn();
628628
if (!\in_array($fqdn, $addedFqdn)) {
629629
$addedFqdn[] = $fqdn;
630-
$this->addUse($memberShape, $classBuilder, $addedFqdn);
631630
$classBuilder->addUse($fqdn);
632631
}
633632
} elseif ($memberShape instanceof MapShape) {
634633
if (($valueShape = $memberShape->getValue()->getShape()) instanceof StructureShape) {
635634
$fqdn = $this->namespaceRegistry->getObject($valueShape)->getFqdn();
636635
if (!\in_array($fqdn, $addedFqdn)) {
637636
$addedFqdn[] = $fqdn;
638-
$this->addUse($valueShape, $classBuilder, $addedFqdn);
639637
$classBuilder->addUse($fqdn);
640638
}
641639
}
@@ -647,7 +645,6 @@ private function addUse(StructureShape $shape, ClassBuilder $classBuilder, array
647645
$fqdn = $this->namespaceRegistry->getObject($memberShape)->getFqdn();
648646
if (!\in_array($fqdn, $addedFqdn)) {
649647
$addedFqdn[] = $fqdn;
650-
$this->addUse($memberShape, $classBuilder, $addedFqdn);
651648
$classBuilder->addUse($fqdn);
652649
}
653650
}

src/Generator/ResultGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,13 @@ private function addUse(StructureShape $shape, ClassBuilder $classBuilder, array
106106
$fqdn = $this->namespaceRegistry->getObject($memberShape)->getFqdn();
107107
if (!\in_array($fqdn, $addedFqdn)) {
108108
$addedFqdn[] = $fqdn;
109-
$this->addUse($memberShape, $classBuilder, $addedFqdn);
110109
$classBuilder->addUse($fqdn);
111110
}
112111
} elseif ($memberShape instanceof MapShape) {
113112
if (($valueShape = $memberShape->getValue()->getShape()) instanceof StructureShape) {
114113
$fqdn = $this->namespaceRegistry->getObject($valueShape)->getFqdn();
115114
if (!\in_array($fqdn, $addedFqdn)) {
116115
$addedFqdn[] = $fqdn;
117-
$this->addUse($valueShape, $classBuilder, $addedFqdn);
118116
$classBuilder->addUse($fqdn);
119117
}
120118
}
@@ -126,7 +124,6 @@ private function addUse(StructureShape $shape, ClassBuilder $classBuilder, array
126124
$fqdn = $this->namespaceRegistry->getObject($memberShape)->getFqdn();
127125
if (!\in_array($fqdn, $addedFqdn)) {
128126
$addedFqdn[] = $fqdn;
129-
$this->addUse($memberShape, $classBuilder, $addedFqdn);
130127
$classBuilder->addUse($fqdn);
131128
}
132129
}

0 commit comments

Comments
 (0)