Code Duplication    Length = 12-12 lines in 2 locations

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

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