Code Duplication    Length = 28-28 lines in 5 locations

src/Actions/Processors/StoreCreateProcessor.php 1 location

@@ 34-61 (lines=28) @@
31
 * @link      https://github.com/techdivision/import
32
 * @link      http://www.techdivision.com
33
 */
34
class StoreCreateProcessor extends AbstractCreateProcessor
35
{
36
37
    /**
38
     * Return's the array with the SQL statements that has to be prepared.
39
     *
40
     * @return array The SQL statements to be prepared
41
     * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements()
42
     */
43
    protected function getStatements()
44
    {
45
        return array(SqlStatementKeys::CREATE_STORE => $this->loadStatement(SqlStatementKeys::CREATE_STORE));
46
    }
47
48
    /**
49
     * Persist's the passed row.
50
     *
51
     * @param array       $row  The row to persist
52
     * @param string|null $name The name of the prepared statement that has to be executed
53
     *
54
     * @return string The last inserted ID
55
     */
56
    public function execute($row, $name = null)
57
    {
58
        parent::execute($row, $name);
59
        return $this->getConnection()->lastInsertId();
60
    }
61
}
62

src/Actions/Processors/StoreGroupCreateProcessor.php 1 location

@@ 34-61 (lines=28) @@
31
 * @link      https://github.com/techdivision/import
32
 * @link      http://www.techdivision.com
33
 */
34
class StoreGroupCreateProcessor extends AbstractCreateProcessor
35
{
36
37
    /**
38
     * Return's the array with the SQL statements that has to be prepared.
39
     *
40
     * @return array The SQL statements to be prepared
41
     * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements()
42
     */
43
    protected function getStatements()
44
    {
45
        return array(SqlStatementKeys::CREATE_STORE_GROUP => $this->loadStatement(SqlStatementKeys::CREATE_STORE_GROUP));
46
    }
47
48
    /**
49
     * Persist's the passed row.
50
     *
51
     * @param array       $row  The row to persist
52
     * @param string|null $name The name of the prepared statement that has to be executed
53
     *
54
     * @return string The last inserted ID
55
     */
56
    public function execute($row, $name = null)
57
    {
58
        parent::execute($row, $name);
59
        return $this->getConnection()->lastInsertId();
60
    }
61
}
62

src/Actions/Processors/StoreWebsiteCreateProcessor.php 1 location

@@ 34-61 (lines=28) @@
31
 * @link      https://github.com/techdivision/import
32
 * @link      http://www.techdivision.com
33
 */
34
class StoreWebsiteCreateProcessor extends AbstractCreateProcessor
35
{
36
37
    /**
38
     * Return's the array with the SQL statements that has to be prepared.
39
     *
40
     * @return array The SQL statements to be prepared
41
     * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements()
42
     */
43
    protected function getStatements()
44
    {
45
        return array(SqlStatementKeys::CREATE_STORE_WEBSITE => $this->loadStatement(SqlStatementKeys::CREATE_STORE_WEBSITE));
46
    }
47
48
    /**
49
     * Persist's the passed row.
50
     *
51
     * @param array       $row  The row to persist
52
     * @param string|null $name The name of the prepared statement that has to be executed
53
     *
54
     * @return string The last inserted ID
55
     */
56
    public function execute($row, $name = null)
57
    {
58
        parent::execute($row, $name);
59
        return $this->getConnection()->lastInsertId();
60
    }
61
}
62

src/Actions/Processors/UrlRewriteCreateProcessor.php 1 location

@@ 34-61 (lines=28) @@
31
 * @link      https://github.com/techdivision/import
32
 * @link      http://www.techdivision.com
33
 */
34
class UrlRewriteCreateProcessor extends AbstractCreateProcessor
35
{
36
37
    /**
38
     * Return's the array with the SQL statements that has to be prepared.
39
     *
40
     * @return array The SQL statements to be prepared
41
     * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements()
42
     */
43
    protected function getStatements()
44
    {
45
        return array(SqlStatementKeys::CREATE_URL_REWRITE => $this->loadStatement(SqlStatementKeys::CREATE_URL_REWRITE));
46
    }
47
48
    /**
49
     * Persist's the passed row.
50
     *
51
     * @param array       $row  The row to persist
52
     * @param string|null $name The name of the prepared statement that has to be executed
53
     *
54
     * @return string The last inserted ID
55
     */
56
    public function execute($row, $name = null)
57
    {
58
        parent::execute($row, $name);
59
        return $this->getConnection()->lastInsertId();
60
    }
61
}
62

src/Actions/Processors/ImportHistoryCreateProcessor.php 1 location

@@ 34-61 (lines=28) @@
31
 * @link      https://github.com/techdivision/import
32
 * @link      http://www.techdivision.com
33
 */
34
class ImportHistoryCreateProcessor extends AbstractCreateProcessor
35
{
36
37
    /**
38
     * Return's the array with the SQL statements that has to be prepared.
39
     *
40
     * @return array The SQL statements to be prepared
41
     * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements()
42
     */
43
    protected function getStatements()
44
    {
45
        return array(SqlStatementKeys::CREATE_IMPORT_HISTORY => $this->loadStatement(SqlStatementKeys::CREATE_IMPORT_HISTORY));
46
    }
47
48
    /**
49
     * Persist's the passed row.
50
     *
51
     * @param array       $row  The row to persist
52
     * @param string|null $name The name of the prepared statement that has to be executed
53
     *
54
     * @return string The last inserted ID
55
     */
56
    public function execute($row, $name = null)
57
    {
58
        parent::execute($row, $name);
59
        return $this->getConnection()->lastInsertId();
60
    }
61
}
62