Code Duplication    Length = 19-19 lines in 2 locations

Generator/GenRepositoryGenerator.php 1 location

@@ 137-155 (lines=19) @@
134
        );
135
    }
136
137
    protected function generateTestClass()
138
    {
139
        $parts = explode('\\', $this->entity);
140
        $entityClass = array_pop($parts);
141
142
        $dir = sprintf('%s/../tests/%s/Model/', $this->rootDir, $this->bundle->getName());
143
144
        $target = $dir.$entityClass.'RepositoryTest.php';
145
146
        $this->processRenderFile(
147
            'crud/tests/repositoryTest.php.twig',
148
            $target,
149
            sprintf('%sRepositoryTest', $entityClass),
150
            $entityClass,
151
            'Model',
152
            null
153
        );
154
    }
155
156
    /**
157
     * @param $file
158
     * @param $target

Generator/GenCrudGenerator.php 1 location

@@ 135-153 (lines=19) @@
132
        ));
133
    }
134
135
    protected function generateTestClass()
136
    {
137
        $parts = explode('\\', $this->entity);
138
        $entityClass = array_pop($parts);
139
140
        $dir = sprintf('%s/../tests/%s/Controller/', $this->rootDir, $this->bundle->getName());
141
142
        $target = $dir.$entityClass.'ControllerTest.php';
143
144
        $this->processRenderFile(
145
            'crud/tests/controllerTest.php.twig',
146
            $target,
147
            sprintf('%sControllerTest', $entityClass),
148
            $entityClass,
149
            'Controller',
150
            null
151
        );
152
    }
153
154
    /**
155
     * @param $file
156
     * @param $target