Code Duplication    Length = 3-3 lines in 2 locations

src/AppBundle/Controller/NooliteController.php 2 locations

@@ 139-141 (lines=3) @@
136
                }
137
            }
138
139
            if (($changeSet['state'] == 'off') && !isset($changeSet['percent'])) {
140
                $changeSet['percent'] = 0;
141
            }
142
143
            if (($changeSet['state'] == 'on') && !isset($changeSet['percent'])) {
144
                $changeSet['percent'] = 100; // ? I don't really know if they restore their states
@@ 143-145 (lines=3) @@
140
                $changeSet['percent'] = 0;
141
            }
142
143
            if (($changeSet['state'] == 'on') && !isset($changeSet['percent'])) {
144
                $changeSet['percent'] = 100; // ? I don't really know if they restore their states
145
            }
146
147
            if (!$resultAction) {
148
                return $this->sendResponse(true, ['message'=>'State was changed, but no action was found']);