Code Duplication    Length = 12-12 lines in 2 locations

Commands/ImageImportCommand.php 1 location

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

Subscribers/CronJob.php 1 location

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