Code Duplication    Length = 28-28 lines in 5 locations

src/Actions/Processors/StoreGroupUpdateProcessor.php 1 location

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

src/Actions/Processors/StoreUpdateProcessor.php 1 location

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

src/Actions/Processors/StoreWebsiteUpdateProcessor.php 1 location

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

src/Actions/Processors/UrlRewriteUpdateProcessor.php 1 location

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

src/Actions/Processors/ImportHistoryUpdateProcessor.php 1 location

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