Code Duplication    Length = 14-14 lines in 2 locations

src/Resource/GenericResource.php 1 location

@@ 110-123 (lines=14) @@
107
    /**
108
     * {@inheritdoc}
109
     */
110
    public function listChildren()
111
    {
112
        $children = new ArrayResourceCollection();
113
114
        if (!$this->getRepository()) {
115
            return $children;
116
        }
117
118
        foreach ($this->getRepository()->listChildren($this->getRepositoryPath()) as $child) {
119
            $children[$child->getName()] = $child;
120
        }
121
122
        return $children;
123
    }
124
125
    /**
126
     * {@inheritdoc}

src/Resource/LinkResource.php 1 location

@@ 119-132 (lines=14) @@
116
    /**
117
     * {@inheritdoc}
118
     */
119
    public function listChildren()
120
    {
121
        $children = new ArrayResourceCollection();
122
123
        if (!$this->getRepository()) {
124
            return $children;
125
        }
126
127
        foreach ($this->getRepository()->listChildren($this->getTargetPath()) as $child) {
128
            $children[$child->getName()] = $child;
129
        }
130
131
        return $children;
132
    }
133
}
134