src/Resource/FileResource.php
private function importResource(ResourceProvider $provider, $imported_resources)
    {
        $content = $provider->getContent();
        $parent_content = $provider->getParentContent();

        if (!empty($content)) {
            $imported_resources = array_replace_recursive($imported_resources, $content);
        }

        if (!empty($parent_content)) {
            $this->provider->addParentContent($parent_content);
        }

        return $imported_resources;
    }
private function importResource(ResourceProvider $provider, $imported_resources)
    {
        $content = $provider->getContent();
        $parent_content = $provider->getParentContent();

        if (!empty($content)) {
            $imported_resources = array_replace_recursive($imported_resources, $content);
        }

        if (!empty($parent_content)) {
            $this->provider->addParentContent($parent_content);
        }

        return $imported_resources;
    }
Import resource into the imported resources and merge contents

@param ResourceProvider $provider The new imported resource
@param array            $imported_resources The imported resources

@return array The modified imported resources