Code Duplication    Length = 7-7 lines in 10 locations

src/Kunstmaan/GeneratorBundle/Command/GenerateArticleCommand.php 1 location

@@ 99-105 (lines=7) @@
96
    /**
97
     * @return ArticleGenerator
98
     */
99
    protected function createGenerator()
100
    {
101
        $filesystem = $this->getContainer()->get('filesystem');
102
        $registry = $this->getContainer()->get('doctrine');
103
104
        return new ArticleGenerator($filesystem, $registry, '/article', $this->parentPages, $this->assistant, $this->getContainer());
105
    }
106
107
    /**
108
     * Do the interaction with the end user.

src/Kunstmaan/GeneratorBundle/Command/GenerateEntityCommand.php 1 location

@@ 69-75 (lines=7) @@
66
    /**
67
     * @return DefaultEntityGenerator
68
     */
69
    protected function createGenerator()
70
    {
71
        $filesystem = $this->getContainer()->get('filesystem');
72
        $registry = $this->getContainer()->get('doctrine');
73
74
        return new DefaultEntityGenerator($filesystem, $registry, '/entity', $this->assistant, $this->getContainer());
75
    }
76
77
    /**
78
     * The text to be displayed on top of the generator.

src/Kunstmaan/GeneratorBundle/Command/GenerateConfigCommand.php 1 location

@@ 140-146 (lines=7) @@
137
    /**
138
     * @return ConfigGenerator
139
     */
140
    protected function createGenerator()
141
    {
142
        $filesystem = $this->getContainer()->get('filesystem');
143
        $registry = $this->getContainer()->get('doctrine');
144
145
        return new ConfigGenerator($filesystem, $registry, '/config', $this->assistant, $this->getContainer());
146
    }
147
}
148

src/Kunstmaan/GeneratorBundle/Command/GenerateDefaultPagePartsCommand.php 1 location

@@ 150-156 (lines=7) @@
147
     *
148
     * @return DefaultPagePartGenerator
149
     */
150
    protected function createGenerator()
151
    {
152
        $filesystem = $this->getContainer()->get('filesystem');
153
        $registry = $this->getContainer()->get('doctrine');
154
155
        return new DefaultPagePartGenerator($filesystem, $registry, '/pagepart', $this->assistant, $this->getContainer());
156
    }
157
}
158

src/Kunstmaan/GeneratorBundle/Command/GenerateDefaultSiteCommand.php 1 location

@@ 157-163 (lines=7) @@
154
     *
155
     * @return DefaultSiteGenerator
156
     */
157
    protected function createGenerator()
158
    {
159
        $filesystem = $this->getContainer()->get('filesystem');
160
        $registry = $this->getContainer()->get('doctrine');
161
162
        return new DefaultSiteGenerator($filesystem, $registry, '/defaultsite', $this->assistant, $this->getContainer());
163
    }
164
}
165

src/Kunstmaan/GeneratorBundle/Command/GenerateFormPageCommand.php 1 location

@@ 224-230 (lines=7) @@
221
     *
222
     * @return FormPageGenerator
223
     */
224
    protected function createGenerator()
225
    {
226
        $filesystem = $this->getContainer()->get('filesystem');
227
        $registry = $this->getContainer()->get('doctrine');
228
229
        return new FormPageGenerator($filesystem, $registry, '/page', $this->assistant, $this->getContainer());
230
    }
231
}
232

src/Kunstmaan/GeneratorBundle/Command/GenerateFormPagePartsCommand.php 1 location

@@ 111-117 (lines=7) @@
108
     *
109
     * @return DefaultPagePartGenerator
110
     */
111
    protected function createGenerator()
112
    {
113
        $filesystem = $this->getContainer()->get('filesystem');
114
        $registry = $this->getContainer()->get('doctrine');
115
116
        return new DefaultPagePartGenerator($filesystem, $registry, '/pagepart', $this->assistant, $this->getContainer());
117
    }
118
}
119

src/Kunstmaan/GeneratorBundle/Command/GenerateLayoutCommand.php 1 location

@@ 100-106 (lines=7) @@
97
     *
98
     * @return LayoutGenerator
99
     */
100
    protected function createGenerator()
101
    {
102
        $filesystem = $this->getContainer()->get('filesystem');
103
        $registry = $this->getContainer()->get('doctrine');
104
105
        return new LayoutGenerator($filesystem, $registry, '/layout', $this->assistant, $this->getContainer());
106
    }
107
108
    /**
109
     * Check that the command is ran as sub command or not.

src/Kunstmaan/GeneratorBundle/Command/GeneratePageCommand.php 1 location

@@ 237-243 (lines=7) @@
234
     *
235
     * @return PageGenerator
236
     */
237
    protected function createGenerator()
238
    {
239
        $filesystem = $this->getContainer()->get('filesystem');
240
        $registry = $this->getContainer()->get('doctrine');
241
242
        return new PageGenerator($filesystem, $registry, '/page', $this->assistant, $this->getContainer());
243
    }
244
245
    /**
246
     * Get all the available default templates.

src/Kunstmaan/GeneratorBundle/Command/GeneratePagePartCommand.php 1 location

@@ 185-191 (lines=7) @@
182
     *
183
     * @return PagePartGenerator
184
     */
185
    protected function createGenerator()
186
    {
187
        $filesystem = $this->getContainer()->get('filesystem');
188
        $registry = $this->getContainer()->get('doctrine');
189
190
        return new PagePartGenerator($filesystem, $registry, '/pagepart', $this->assistant, $this->getContainer());
191
    }
192
}
193