Code Duplication    Length = 3-12 lines in 3 locations

core/EE_Registry.core.php 1 location

@@ 751-761 (lines=11) @@
748
		// don't give up! you gotta...
749
		try {
750
			//does the file exist and can it be read ?
751
			if ( ! $path ) {
752
				// so sorry, can't find the file
753
				throw new EE_Error (
754
					sprintf(
755
						__( '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' ),
756
						trim( $type, '.' ),
757
						$class_name,
758
						'<br />' . implode( ',<br />', $file_paths )
759
					)
760
				);
761
			}
762
			// get the file
763
			require_once( $path );
764
			// if the class isn't already declared somewhere

core/db_models/EEM_Base.model.php 2 locations

@@ 3073-3075 (lines=3) @@
3070
				'minimum',
3071
				'none'
3072
			);
3073
		if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){
3074
			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)));
3075
		}
3076
		$universal_query_params = array();
3077
		if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){
3078
			$universal_query_params = $this->_get_default_where_conditions();
@@ 4992-5003 (lines=12) @@
4989
	 */
4990
	static public function verify_is_valid_cap_context( $context ) {
4991
		$valid_cap_contexts = EEM_Base::valid_cap_contexts();
4992
		if( in_array( $context, $valid_cap_contexts ) ) {
4993
			return true;
4994
		}else{
4995
			throw new EE_Error(
4996
				sprintf(
4997
					__( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ),
4998
					$context,
4999
					'EEM_Base' ,
5000
					implode(',', $valid_cap_contexts )
5001
				)
5002
			);
5003
		}
5004
	}
5005
5006
	/**