Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-gutenberg.php 1 location

@@ 191-193 (lines=3) @@
188
	 * @return string The unprefixed extension name.
189
	 */
190
	public static function remove_extension_prefix( $extension_name ) {
191
		if ( 0 === strpos( $extension_name, 'jetpack/' ) || 0 === strpos( $extension_name, 'jetpack-' ) ) {
192
			return substr( $extension_name, strlen( 'jetpack/' ) );
193
		}
194
		return $extension_name;
195
	}
196

packages/blocks/src/class-blocks.php 1 location

@@ 107-109 (lines=3) @@
104
	 * @return string The unprefixed extension name.
105
	 */
106
	public static function remove_extension_prefix( $extension_name ) {
107
		if ( 0 === strpos( $extension_name, 'jetpack/' ) || 0 === strpos( $extension_name, 'jetpack-' ) ) {
108
			return substr( $extension_name, strlen( 'jetpack/' ) );
109
		}
110
		return $extension_name;
111
	}
112