Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3037-3039 (lines=3) @@
3034
				'minimum',
3035
				'none'
3036
			);
3037
		if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){
3038
			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)));
3039
		}
3040
		$universal_query_params = array();
3041
		if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){
3042
			$universal_query_params = $this->_get_default_where_conditions();
@@ 4933-4944 (lines=12) @@
4930
	 */
4931
	static public function verify_is_valid_cap_context( $context ) {
4932
		$valid_cap_contexts = EEM_Base::valid_cap_contexts();
4933
		if( in_array( $context, $valid_cap_contexts ) ) {
4934
			return true;
4935
		}else{
4936
			throw new EE_Error(
4937
				sprintf(
4938
					__( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ),
4939
					$context,
4940
					'EEM_Base' ,
4941
					implode(',', $valid_cap_contexts )
4942
				)
4943
			);
4944
		}
4945
	}
4946
4947
	/**

core/EE_Registry.core.php 1 location

@@ 683-693 (lines=11) @@
680
		// don't give up! you gotta...
681
		try {
682
			//does the file exist and can it be read ?
683
			if ( ! $path ) {
684
				// so sorry, can't find the file
685
				throw new EE_Error (
686
					sprintf(
687
						__( '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' ),
688
						trim( $type, '.' ),
689
						$class_name,
690
						'<br />' . implode( ',<br />', $file_paths )
691
					)
692
				);
693
			}
694
			// get the file
695
			require_once( $path );
696
			// if the class isn't already declared somewhere