Code Duplication    Length = 10-10 lines in 2 locations

src/console/PhpunitController.php 2 locations

@@ 51-60 (lines=10) @@
48
    /**
49
     * Generates skeleton class for fake.
50
     */
51
    public function actionGenfake($file)
52
    {
53
        $path = $this->buildFakePath($file);
54
        if (!$this->force && file_exists($path)) {
55
            Yii::warning("already exists: $path");
56
            return 1;
57
        }
58
59
        return $this->genFake($file, $path);
60
    }
61
62
    protected function genFake($file, $path)
63
    {
@@ 75-84 (lines=10) @@
72
    /**
73
     * Generates skeleton class for test.
74
     */
75
    public function actionGentest($file)
76
    {
77
        $path = $this->buildTestPath($file);
78
        if (!$this->force && file_exists($path)) {
79
            Yii::warning("already exists: $path");
80
            return 1;
81
        }
82
83
        return $this->genSkel($file);
84
    }
85
86
    protected static function prepareFile($file)
87
    {