Code Duplication    Length = 12-12 lines in 2 locations

Commands/ImageImportCommand.php 1 location

@@ 61-72 (lines=12) @@
58
    /**
59
     * @return ImageImport
60
     */
61
    private function getImageImport()
62
    {
63
        // do not use thumbnail_manager as a dependency!!!
64
        // MediaService::__construct uses Shop entity
65
        // this also could break the session in backend when it's used in subscriber
66
        return new ImageImport(
67
            Shopware()->Models(),
68
            $this->helper,
69
            $this->container->get('thumbnail_manager'),
70
            new Logger(Shopware()->Db())
71
        );
72
    }
73
}
74

Subscribers/CronJob.php 1 location

@@ 111-122 (lines=12) @@
108
    /**
109
     * @return ImageImport
110
     */
111
    public function getImageImport()
112
    {
113
        // do not use thumbnail_manager as a dependency!!!
114
        // MediaService::__construct uses Shop entity
115
        // this also could break the session in backend when it's used in subscriber
116
        return new ImageImport(
117
            Shopware()->Models(),
118
            $this->helper,
119
            $this->container->get('thumbnail_manager'),
120
            new Logger(Shopware()->Db())
121
        );
122
    }
123
124
    /**
125
     * Import images of new products