Code Duplication    Length = 4-8 lines in 3 locations

core/EE_Module_Request_Router.core.php 1 location

@@ 186-189 (lines=4) @@
183
	 * @return    EED_Module | NULL
184
	 */
185
	public static function module_factory( $module_name ) {
186
		if ( $module_name == 'EED_Module' ) {
187
			EE_Error::add_error( sprintf( __( 'EED_Module is an abstract parent class an can not be instantiated. Please provide a proper module name.', 'event_espresso' ), $module_name ), __FILE__, __FUNCTION__, __LINE__ );
188
			return NULL;
189
		}
190
		// let's pause to reflect on this...
191
		$mod_reflector = new ReflectionClass( $module_name );
192
		// ensure that class is actually a module

core/libraries/plugin_api/EE_Register_Messages_Template_Pack.lib.php 1 location

@@ 166-169 (lines=4) @@
163
164
		//loop through the existing registry and see if the classname is already present.
165
		foreach ( self::$_registry as $ref => $args ) {
166
			if ( $args['classname'] == $classname ) {
167
				EE_Error::add_error( sprintf( __('The %s template pack that you just activated cannot be registered with the messages system because there is already a template pack active using the same classname.  Contact the author of this template pack to let them know of the conflict.  To stop seeing this message you will need to deactivate this template pack.', 'event_espresso' ), (string) $setup_args['classname'] ), __FILE__, __LINE__, __FUNCTION__ );
168
				return false;
169
			}
170
		}
171
		return true;
172
	}

core/helpers/EEH_Activation.helper.php 1 location

@@ 564-571 (lines=8) @@
561
	 */
562
	private static function _track_critical_page_post_shortcodes( $critical_page = array() ) {
563
		// check the goods
564
		if ( ! $critical_page['post'] instanceof WP_Post ) {
565
			$msg = sprintf(
566
				__( 'The Event Espresso critical page shortcode for the page %s can not be tracked because it is not a WP_Post object.', 'event_espresso' ),
567
				$critical_page['name']
568
			);
569
			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
570
			return;
571
		}
572
		$EE_Core_Config = EE_Registry::instance()->CFG->core;
573
		// map shortcode to post
574
		$EE_Core_Config->post_shortcodes[ $critical_page['post']->post_name ][ $critical_page['code'] ] = $critical_page['post']->ID;