Code Duplication    Length = 7-9 lines in 4 locations

Subscribers/Article.php 1 location

@@ 173-179 (lines=7) @@
170
        $request = $subject->Request();
171
172
        switch ($request->getActionName()) {
173
            case 'index':
174
                $subject->View()->addTemplateDir($this->pluginPath . 'Views/', 'connect');
175
                $this->snippetManager->addConfigDir($this->pluginPath . 'Snippets/');
176
                $subject->View()->extendsTemplate(
177
                    'backend/article/connect.js'
178
                );
179
                break;
180
            case 'load':
181
                $subject->View()->addTemplateDir($this->pluginPath . 'Views/', 'connect');
182
                $this->snippetManager->addConfigDir($this->pluginPath . 'Snippets/');

Subscribers/ArticleList.php 1 location

@@ 87-93 (lines=7) @@
84
        $request = $subject->Request();
85
86
        switch ($request->getActionName()) {
87
            case 'load':
88
                $subject->View()->addTemplateDir($this->pluginPath . '/Views', 'connect');
89
                $this->snippetManager->addConfigDir($this->pluginPath . '/Snippets');
90
                $subject->View()->extendsTemplate(
91
                    'backend/article_list/connect.js'
92
                );
93
                break;
94
            case 'list':
95
            case 'filter':
96
                $subject->View()->data = $this->markConnectProducts(

Subscribers/Dispatches.php 1 location

@@ 110-118 (lines=9) @@
107
        $request = $subject->Request();
108
109
        switch ($request->getActionName()) {
110
            case 'load':
111
                $subject->View()->addTemplateDir($this->pluginPath . 'Views/', 'connect');
112
                $this->snippetManager->addConfigDir($this->pluginPath . 'Snippets/');
113
114
                $subject->View()->extendsTemplate(
115
                    'backend/shipping/connect.js'
116
                );
117
118
                break;
119
            default:
120
                break;
121
        }

Subscribers/ProductStreams.php 1 location

@@ 148-155 (lines=8) @@
145
        $request = $subject->Request();
146
147
        switch ($request->getActionName()) {
148
            case 'index':
149
                $subject->View()->addTemplateDir($this->pluginPath . 'Views/', 'connect');
150
                $this->snippetManager->addConfigDir($this->pluginPath . 'Snippets/');
151
152
                $subject->View()->extendsTemplate(
153
                    'backend/product_stream/connect_app.js'
154
                );
155
                break;
156
            case 'load':
157
                $subject->View()->addTemplateDir($this->pluginPath . 'Views/', 'connect');
158
                $this->snippetManager->addConfigDir($this->pluginPath . 'Snippets/');