Code Duplication    Length = 12-12 lines in 2 locations

src/RunOpenCode/AbstractBuilder/Ast/Metadata/ClassMetadata.php 1 location

@@ 217-228 (lines=12) @@
214
            }
215
        }
216
217
        if ($traverse && $this->hasTraits()) {
218
219
            /**
220
             * @var TraitMetadata $trait
221
             */
222
            foreach ($this->traits as $trait) {
223
224
                if ($trait->hasPublicMethod($name, $traverse)) {
225
                    return true;
226
                }
227
            }
228
        }
229
230
        if ($traverse && $this->hasParent()) {
231
            return $this->getParent()->hasPublicMethod($name, $traverse);

src/RunOpenCode/AbstractBuilder/Ast/Metadata/TraitMetadata.php 1 location

@@ 145-156 (lines=12) @@
142
            }
143
        }
144
145
        if ($traverse && $this->hasTraits()) {
146
147
            /**
148
             * @var TraitMetadata $trait
149
             */
150
            foreach ($this->traits as $trait) {
151
152
                if ($trait->hasPublicMethod($name, $traverse)) {
153
                    return true;
154
                }
155
            }
156
        }
157
158
        return false;
159
    }