Code Duplication    Length = 8-10 lines in 2 locations

lib/PhpFlo/Fbp/FbpParser.php 2 locations

@@ 151-158 (lines=8) @@
148
149
            //define states
150
            switch (true) {
151
                case !empty($step[self::DATA_LABEL]) && ($hasInport && $hasOutport):
152
                    // initializer + inport
153
                    $nextSrc = $resolved;
154
                    $step[self::TARGET_LABEL] = $this->addPort($resolved, self::INPORT_LABEL);
155
                    // multi def oneliner initializer resolved
156
                    array_push($this->definition[self::INITIALIZERS_LABEL], $step);
157
                    $step = [];
158
                    break;
159
                case !empty($nextSrc) && ($hasInport && $hasOutport):
160
                    // if there was an initializer, we get a full touple with this iteration
161
                    $step = [
@@ 169-178 (lines=10) @@
166
                    array_push($subset, $step);
167
                    $step = [];
168
                    break;
169
                case $hasInport && $hasOutport:
170
                    // tgt + multi def
171
                    $nextSrc = $resolved;
172
                    $step[self::TARGET_LABEL] = $this->addPort($resolved, self::INPORT_LABEL);
173
                    // check if we've already got the touple ready
174
                    if (!empty($step[self::SOURCE_LABEL])) {
175
                        array_push($subset, $step);
176
                        $step = [];
177
                    }
178
                    break;
179
                case $hasInport && $nextSrc:
180
                    // use previous OUT as src to fill touple
181
                    $step[self::SOURCE_LABEL] = $this->addPort($nextSrc, self::OUTPORT_LABEL);