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

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