Code Duplication    Length = 6-6 lines in 2 locations

src/Observers/AttributeObserverTrait.php 1 location

@@ 131-136 (lines=6) @@
128
        }
129
130
        // remove all the empty values from the row, expected the columns has to be cleaned-up
131
        foreach ($this->row as $key => $value) {
132
            // query whether or not the value is empty AND the column has NOT to be cleaned-up
133
            if (($value === null || $value === '') && in_array($key, $this->cleanUpEmptyColumnKeys) === false) {
134
                unset($this->row[$key]);
135
            }
136
        }
137
138
        // finally return the clean row
139
        return $this->row;

src/Observers/CleanUpEmptyColumnsTrait.php 1 location

@@ 73-78 (lines=6) @@
70
        }
71
72
        // remove all the empty values from the row, expected the columns has to be cleaned-up
73
        foreach ($this->row as $key => $value) {
74
            // query whether or not the value is empty AND the column has NOT to be cleaned-up
75
            if (($value === null || $value === '') && in_array($key, $this->cleanUpEmptyColumnKeys) === false) {
76
                unset($this->row[$key]);
77
            }
78
        }
79
80
        // finally return the clean row
81
        return $this->row;