Code Duplication    Length = 13-13 lines in 3 locations

app/src/Console/Commands/GenerateCommandCommand.php 1 location

@@ 82-94 (lines=13) @@
79
     * @param string $resultPath
80
     * @return bool|int
81
     */
82
    public function generateCode($placeHolders, $replacements, $templateName, $resultPath)
83
    {
84
        $templatePath = CODE_TEMPLATE_PATH . '/' . $templateName;
85
        if (false === file_exists($templatePath)) {
86
            throw new \RunTimeException(sprintf('Not found template %s', $templatePath));
87
        }
88
89
        $template = file_get_contents($templatePath);
90
91
        $code = str_replace($placeHolders, $replacements, $template);
92
93
        return file_put_contents($resultPath, $code);
94
    }
95
96
    /**
97
     * @param string $commandClass

app/src/Console/Commands/GenerateMigrationCommand.php 1 location

@@ 77-89 (lines=13) @@
74
     * @param string $resultPath
75
     * @return bool|int
76
     */
77
    public function generateCode($placeHolders, $replacements, $templateName, $resultPath)
78
    {
79
        $templatePath = CODE_TEMPLATE_PATH . '/' . $templateName;
80
        if (false === file_exists($templatePath)) {
81
            throw new \RunTimeException(sprintf('Not found template %s', $templatePath));
82
        }
83
84
        $template = file_get_contents($templatePath);
85
86
        $code = str_replace($placeHolders, $replacements, $template);
87
88
        return file_put_contents($resultPath, $code);
89
    }
90
91
    /**
92
     * @param string $migrationName

app/src/Console/Commands/GenerateSeedCommand.php 1 location

@@ 74-86 (lines=13) @@
71
     * @param string $resultPath
72
     * @return bool|int
73
     */
74
    public function generateCode($placeHolders, $replacements, $templateName, $resultPath)
75
    {
76
        $templatePath = CODE_TEMPLATE_PATH . '/' . $templateName;
77
        if (false === file_exists($templatePath)) {
78
            throw new \RunTimeException(sprintf('Not found template %s', $templatePath));
79
        }
80
81
        $template = file_get_contents($templatePath);
82
83
        $code = str_replace($placeHolders, $replacements, $template);
84
85
        return file_put_contents($resultPath, $code);
86
    }
87
88
    /**
89
     * @param string $seedName