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

@@ 3043-3045 (lines=3) @@
3040
				'minimum',
3041
				'none'
3042
			);
3043
		if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){
3044
			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)));
3045
		}
3046
		$universal_query_params = array();
3047
		if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){
3048
			$universal_query_params = $this->_get_default_where_conditions();
@@ 4962-4973 (lines=12) @@
4959
	 */
4960
	static public function verify_is_valid_cap_context( $context ) {
4961
		$valid_cap_contexts = EEM_Base::valid_cap_contexts();
4962
		if( in_array( $context, $valid_cap_contexts ) ) {
4963
			return true;
4964
		}else{
4965
			throw new EE_Error(
4966
				sprintf(
4967
					__( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ),
4968
					$context,
4969
					'EEM_Base' ,
4970
					implode(',', $valid_cap_contexts )
4971
				)
4972
			);
4973
		}
4974
	}
4975
4976
	/**