Code Duplication    Length = 8-9 lines in 2 locations

projects/packages/sync/src/modules/class-constants.php 1 location

@@ 301-309 (lines=9) @@
298
		}
299
300
		$objects = array();
301
		foreach ( (array) $ids as $id ) {
302
			$object = $this->get_object_by_id( $object_type, $id );
303
304
			if ( 'all' === $id ) {
305
				// If all was requested it contains all options and can simply be returned.
306
				return $object;
307
			}
308
			$objects[ $id ] = $object;
309
		}
310
311
		return $objects;
312
	}

projects/packages/sync/src/modules/class-module.php 1 location

@@ 505-512 (lines=8) @@
502
		}
503
504
		$objects = array();
505
		foreach ( (array) $ids as $id ) {
506
			$object = $this->get_object_by_id( $object_type, $id );
507
508
			// Only add object if we have the object.
509
			if ( $object ) {
510
				$objects[ $id ] = $object;
511
			}
512
		}
513
514
		return $objects;
515
	}