Code Duplication    Length = 6-7 lines in 2 locations

projects/plugins/jetpack/_inc/lib/class-jetpack-tweetstorm-helper.php 2 locations

@@ 385-391 (lines=7) @@
382
383
				// This line is too long, and lines *must* be split to a new tweet if they don't fit
384
				// into the current tweet. If this isn't the first line, record where we split the block.
385
				if ( $line_count > 0 ) {
386
					// Increment by 1 to allow for the \n between lines to be counted by ::get_boundary().
387
					$current_character_count  += strlen( $current_tweet['text'] ) + 1;
388
					$current_tweet['boundary'] = self::get_boundary( $block, $current_character_count );
389
390
					self::save_current_tweet( $current_tweet );
391
				}
392
393
				// Start a new tweet.
394
				$current_tweet = self::start_new_tweet();
@@ 436-441 (lines=6) @@
433
					if ( $current_tweet['changed'] ) {
434
						// If we're already in the middle of a block, record the boundary
435
						// before creating a new tweet.
436
						if ( $line_count > 0 || $sentence_count > 0 ) {
437
							$current_character_count  += strlen( $current_tweet['text'] );
438
							$current_tweet['boundary'] = self::get_boundary( $block, $current_character_count );
439
440
							self::save_current_tweet( $current_tweet );
441
						}
442
443
						$current_tweet = self::start_new_tweet();
444
					}