Code Duplication    Length = 11-11 lines in 2 locations

mod/missions/api/v0/api.php 2 locations

@@ 177-187 (lines=11) @@
174
          $data->annotations[$v->name] = $v->value;
175
        }
176
      }
177
      if ($relationships) {
178
        foreach ($relationships as $v) {
179
          $data->relationships[] = array(
180
            'direction' => 'OUT',
181
            'time_created' => $v->time_created,
182
            'id' => $v->id,
183
            'entity' => exportEntity($v->guid_two),
184
            'relationship' => $v->relationship,
185
          );
186
        }
187
      }
188
      if ($relationships2) {
189
        foreach ($relationships2 as $v) {
190
          $data->relationships[] = array(
@@ 188-198 (lines=11) @@
185
          );
186
        }
187
      }
188
      if ($relationships2) {
189
        foreach ($relationships2 as $v) {
190
          $data->relationships[] = array(
191
            'direction' => 'IN',
192
            'time_created' => $v->time_created,
193
            'id' => $v->id,
194
            'entity' => exportEntity($v->guid_one),
195
            'relationship' => $v->relationship,
196
          );
197
        }
198
      }
199
      yield [ 'object' => $object, 'export' => $data ];
200
    }
201
  }