Code Duplication    Length = 12-12 lines in 2 locations

src/RunOpenCode/AbstractBuilder/Ast/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/TraitMetadata.php 1 location

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