Code Duplication    Length = 8-8 lines in 2 locations

src/Manager/Controllers/LineController.php 1 location

@@ 124-131 (lines=8) @@
121
122
            $value = cleanupHTML($value);
123
124
            if(is_null($value) || "" === $value)
125
            {
126
                $line->removeValue($locale);
127
            }
128
            else
129
            {
130
                $line->saveValue($locale,$value);
131
            }
132
        });
133
    }
134
}

src/Manager/Controllers/TranslationController.php 1 location

@@ 51-58 (lines=8) @@
48
                // If line value is not meant to contain tags, we should strip them
49
                if(!$line->editInEditor()) $value = cleanupString($value);
50
51
                if(is_null($value) || "" === $value)
52
                {
53
                    $line->removeValue($locale);
54
                }
55
                else
56
                {
57
                    $line->saveValue($locale,$value);
58
                }
59
60
            });
61
        });