Code Duplication    Length = 20-20 lines in 2 locations

lib/Jms/YamlConverter.php 1 location

@@ 102-121 (lines=20) @@
99
        return $ret;
100
    }
101
102
    private function navigate(Schema $schema, array &$visited)
103
    {
104
        if (isset($visited[spl_object_hash($schema)])) {
105
            return;
106
        }
107
        $visited[spl_object_hash($schema)] = true;
108
109
        foreach ($schema->getTypes() as $type) {
110
            $this->visitType($type);
111
        }
112
        foreach ($schema->getElements() as $element) {
113
            $this->visitElementDef($schema, $element);
114
        }
115
116
        foreach ($schema->getSchemas() as $schildSchema) {
117
            if (!in_array($schildSchema->getTargetNamespace(), $this->baseSchemas, true)) {
118
                $this->navigate($schildSchema, $visited);
119
            }
120
        }
121
    }
122
123
    private function visitTypeBase(&$class, &$data, Type $type, $name)
124
    {

lib/Php/PhpConverter.php 1 location

@@ 82-101 (lines=20) @@
79
        return $ret;
80
    }
81
82
    private function navigate(Schema $schema, array &$visited)
83
    {
84
        if (isset($visited[spl_object_hash($schema)])) {
85
            return;
86
        }
87
        $visited[spl_object_hash($schema)] = true;
88
89
        foreach ($schema->getTypes() as $type) {
90
            $this->visitType($type);
91
        }
92
        foreach ($schema->getElements() as $element) {
93
            $this->visitElementDef($element);
94
        }
95
96
        foreach ($schema->getSchemas() as $schildSchema) {
97
            if (!in_array($schildSchema->getTargetNamespace(), $this->baseSchemas, true)) {
98
                $this->navigate($schildSchema, $visited);
99
            }
100
        }
101
    }
102
103
    private function visitTypeBase(PHPClass $class, Type $type)
104
    {