Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2986-2988 (lines=3) @@
2983
				'minimum',
2984
				'none'
2985
			);
2986
		if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){
2987
			throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s", "event_espresso"),$use_default_where_conditions,implode(", ",$allowed_used_default_where_conditions_values)));
2988
		}
2989
		$universal_query_params = array();
2990
		if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){
2991
			$universal_query_params = $this->_get_default_where_conditions();
@@ 4879-4890 (lines=12) @@
4876
	 */
4877
	static public function verify_is_valid_cap_context( $context ) {
4878
		$valid_cap_contexts = EEM_Base::valid_cap_contexts();
4879
		if( in_array( $context, $valid_cap_contexts ) ) {
4880
			return true;
4881
		}else{
4882
			throw new EE_Error(
4883
				sprintf(
4884
					__( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ),
4885
					$context,
4886
					'EEM_Base' ,
4887
					implode(',', $valid_cap_contexts )
4888
				)
4889
			);
4890
		}
4891
	}
4892
4893
	/**

core/EE_Registry.core.php 1 location

@@ 680-690 (lines=11) @@
677
		// don't give up! you gotta...
678
		try {
679
			//does the file exist and can it be read ?
680
			if ( ! $path ) {
681
				// so sorry, can't find the file
682
				throw new EE_Error (
683
					sprintf(
684
						__( 'The %1$s file %2$s could not be located or is not readable due to file permissions. Please ensure that the following filepath(s) are correct: %3$s', 'event_espresso' ),
685
						trim( $type, '.' ),
686
						$class_name,
687
						'<br />' . implode( ',<br />', $file_paths )
688
					)
689
				);
690
			}
691
			// get the file
692
			require_once( $path );
693
			// if the class isn't already declared somewhere