Code Duplication    Length = 17-17 lines in 3 locations

src/Observers/CategoryProductObserver.php 1 location

@@ 76-92 (lines=17) @@
73
     * @return array The modified row
74
     * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle()
75
     */
76
    public function handle(array $row)
77
    {
78
79
        // initialize the row
80
        $this->setRow($row);
81
82
        // query whether or not, we've found a new SKU => means we've found a new product
83
        if ($this->isLastSku($this->getValue(ColumnKeys::SKU))) {
84
            return $row;
85
        }
86
87
        // process the functionality and return the row
88
        $this->process();
89
90
        // return the processed row
91
        return $this->getRow();
92
    }
93
94
    /**
95
     * Process the observer's business logic.

src/Observers/ProductInventoryObserver.php 1 location

@@ 47-63 (lines=17) @@
44
     * @return array The modified row
45
     * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle()
46
     */
47
    public function handle(array $row)
48
    {
49
50
        // initialize the row
51
        $this->setRow($row);
52
53
        // query whether or not, we've found a new SKU => means we've found a new product
54
        if ($this->isLastSku($this->getValue(ColumnKeys::SKU))) {
55
            return $this->getRow();
56
        }
57
58
        // process the functionality and return the row
59
        $this->process();
60
61
        // return the processed row
62
        return $this->getRow();
63
    }
64
65
    /**
66
     * Process the observer's business logic.

src/Observers/UrlRewriteObserver.php 1 location

@@ 83-99 (lines=17) @@
80
     * @return array The modified row
81
     * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle()
82
     */
83
    public function handle(array $row)
84
    {
85
86
        // initialize the row
87
        $this->setRow($row);
88
89
        // query whether or not, we've found a new SKU => means we've found a new product
90
        if ($this->isLastSku($this->getValue(ColumnKeys::SKU))) {
91
            return $this->getRow();
92
        }
93
94
        // process the functionality and return the row
95
        $this->process();
96
97
        // return the processed row
98
        return $this->getRow();
99
    }
100
101
    /**
102
     * Set's the prepared URL key.