@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | * @param WP $WP |
51 | 51 | * @return void |
52 | 52 | */ |
53 | - public function run( WP $WP ) { |
|
54 | - if ( did_action( 'pre_get_posts' ) && did_action( 'send_headers' ) ) { |
|
53 | + public function run(WP $WP) { |
|
54 | + if (did_action('pre_get_posts') && did_action('send_headers')) { |
|
55 | 55 | EED_Events_Archive::instance()->event_list(); |
56 | 56 | } else { |
57 | 57 | // this will trigger the EED_Events_Archive module's event_list() method during the pre_get_posts hook point, |
58 | 58 | // this allows us to initialize things, enqueue assets, etc, |
59 | 59 | // as well, this saves an instantiation of the module in an array using 'espresso_events' as the key, so that we can retrieve it |
60 | - add_action( 'pre_get_posts', array( EED_Events_Archive::instance(), 'event_list' ) ); |
|
60 | + add_action('pre_get_posts', array(EED_Events_Archive::instance(), 'event_list')); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | * @param array $attributes |
80 | 80 | * @return string |
81 | 81 | */ |
82 | - public function process_shortcode( $attributes = array() ) { |
|
82 | + public function process_shortcode($attributes = array()) { |
|
83 | 83 | // make sure EED_Events_Archive is setup properly |
84 | - if ( apply_filters( 'FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE )) { |
|
84 | + if (apply_filters('FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE)) { |
|
85 | 85 | EED_Events_Archive::instance()->event_list(); |
86 | 86 | } |
87 | 87 | //set default attributes |
@@ -102,24 +102,24 @@ discard block |
||
102 | 102 | $default_espresso_events_shortcode_atts |
103 | 103 | ); |
104 | 104 | // grab attributes and merge with defaults, then extract |
105 | - $attributes = array_merge( (array) $default_espresso_events_shortcode_atts, (array) $attributes ); |
|
105 | + $attributes = array_merge((array) $default_espresso_events_shortcode_atts, (array) $attributes); |
|
106 | 106 | // make sure we use the_excerpt() |
107 | - add_filter( 'FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true' ); |
|
107 | + add_filter('FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true'); |
|
108 | 108 | // apply query filters |
109 | - add_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' ); |
|
109 | + add_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true'); |
|
110 | 110 | // run the query |
111 | 111 | global $wp_query; |
112 | - $wp_query = new EE_Event_List_Query( $attributes ); |
|
112 | + $wp_query = new EE_Event_List_Query($attributes); |
|
113 | 113 | // check what template is loaded and load filters accordingly |
114 | - EED_Events_Archive::instance()->template_include( 'loop-espresso_events.php' ); |
|
114 | + EED_Events_Archive::instance()->template_include('loop-espresso_events.php'); |
|
115 | 115 | // load our template |
116 | - $event_list = EEH_Template::locate_template( 'loop-espresso_events.php', array(), TRUE, TRUE ); |
|
116 | + $event_list = EEH_Template::locate_template('loop-espresso_events.php', array(), TRUE, TRUE); |
|
117 | 117 | // now reset the query and postdata |
118 | 118 | wp_reset_query(); |
119 | 119 | wp_reset_postdata(); |
120 | 120 | EED_Events_Archive::remove_all_events_archive_filters(); |
121 | 121 | // remove query filters |
122 | - remove_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' ); |
|
122 | + remove_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true'); |
|
123 | 123 | // pull our content from the output buffer and return it |
124 | 124 | return $event_list; |
125 | 125 | } |
@@ -164,44 +164,44 @@ discard block |
||
164 | 164 | * @param array $args |
165 | 165 | * @return \EE_Event_List_Query |
166 | 166 | */ |
167 | - function __construct( $args = array() ) { |
|
167 | + function __construct($args = array()) { |
|
168 | 168 | // EEH_Debug_Tools::printr( $args, '$args <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
169 | 169 | // incoming args could be a mix of WP query args + EE shortcode args |
170 | - foreach ( $args as $key =>$value ) { |
|
171 | - $property = '_' . $key; |
|
170 | + foreach ($args as $key =>$value) { |
|
171 | + $property = '_'.$key; |
|
172 | 172 | // if the arg is a property of this class, then it's an EE shortcode arg |
173 | - if ( property_exists( $this, $property )) { |
|
173 | + if (property_exists($this, $property)) { |
|
174 | 174 | // set the property value |
175 | 175 | $this->{$property} = $value; |
176 | 176 | // then remove it from the array of args that will later be passed to WP_Query() |
177 | - unset( $args[ $key ] ); |
|
177 | + unset($args[$key]); |
|
178 | 178 | } |
179 | 179 | } |
180 | 180 | //add query filters |
181 | 181 | EEH_Event_Query::add_query_filters(); |
182 | 182 | // set params that will get used by the filters |
183 | - EEH_Event_Query::set_query_params( $this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort ); |
|
183 | + EEH_Event_Query::set_query_params($this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort); |
|
184 | 184 | // first off, let's remove any filters from previous queries |
185 | - remove_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' )); |
|
186 | - remove_all_filters( 'FHEE__content_espresso_events__event_class' ); |
|
185 | + remove_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title')); |
|
186 | + remove_all_filters('FHEE__content_espresso_events__event_class'); |
|
187 | 187 | // Event List Title ? |
188 | - add_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' ), 10, 1 ); |
|
188 | + add_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'), 10, 1); |
|
189 | 189 | // add the css class |
190 | - add_filter( 'FHEE__content_espresso_events__event_class', array( $this, 'event_list_css' ), 10, 1 ); |
|
190 | + add_filter('FHEE__content_espresso_events__event_class', array($this, 'event_list_css'), 10, 1); |
|
191 | 191 | // the current "page" we are viewing |
192 | - $paged = max( 1, get_query_var( 'paged' )); |
|
192 | + $paged = max(1, get_query_var('paged')); |
|
193 | 193 | // Force these args |
194 | - $args = array_merge( $args, array( |
|
194 | + $args = array_merge($args, array( |
|
195 | 195 | 'post_type' => 'espresso_events', |
196 | 196 | 'posts_per_page' => $this->_limit, |
197 | 197 | 'update_post_term_cache' => FALSE, |
198 | 198 | 'update_post_meta_cache' => FALSE, |
199 | 199 | 'paged' => $paged, |
200 | - 'offset' => ( $paged - 1 ) * $this->_limit |
|
200 | + 'offset' => ($paged - 1) * $this->_limit |
|
201 | 201 | )); |
202 | 202 | |
203 | 203 | // run the query |
204 | - parent::__construct( $args ); |
|
204 | + parent::__construct($args); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | * @param string $event_list_title |
215 | 215 | * @return string |
216 | 216 | */ |
217 | - public function event_list_title( $event_list_title = '' ) { |
|
218 | - if ( ! empty( $this->_title )) { |
|
217 | + public function event_list_title($event_list_title = '') { |
|
218 | + if ( ! empty($this->_title)) { |
|
219 | 219 | return $this->_title; |
220 | 220 | } |
221 | 221 | return $event_list_title; |
@@ -230,11 +230,11 @@ discard block |
||
230 | 230 | * @param string $event_list_css |
231 | 231 | * @return array |
232 | 232 | */ |
233 | - public function event_list_css( $event_list_css = '' ) { |
|
234 | - $event_list_css .= ! empty( $event_list_css ) ? ' ' : ''; |
|
235 | - $event_list_css .= ! empty( $this->_css_class ) ? $this->_css_class : ''; |
|
236 | - $event_list_css .= ! empty( $event_list_css ) ? ' ' : ''; |
|
237 | - $event_list_css .= ! empty( $this->_category_slug ) ? $this->_category_slug : ''; |
|
233 | + public function event_list_css($event_list_css = '') { |
|
234 | + $event_list_css .= ! empty($event_list_css) ? ' ' : ''; |
|
235 | + $event_list_css .= ! empty($this->_css_class) ? $this->_css_class : ''; |
|
236 | + $event_list_css .= ! empty($event_list_css) ? ' ' : ''; |
|
237 | + $event_list_css .= ! empty($this->_category_slug) ? $this->_category_slug : ''; |
|
238 | 238 | return $event_list_css; |
239 | 239 | } |
240 | 240 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @author Mike Nelson |
20 | 20 | * |
21 | 21 | */ |
22 | -class EED_Mijireh_Payment_Checker extends EED_Module{ |
|
22 | +class EED_Mijireh_Payment_Checker extends EED_Module { |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * set_hooks - for hooking into EE Core, other modules, etc |
@@ -40,14 +40,14 @@ discard block |
||
40 | 40 | * @return void |
41 | 41 | */ |
42 | 42 | public static function set_hooks_admin() { |
43 | - add_action( 'AHEE__Transactions_Admin_Page__transaction_details__start', array( 'EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction' ), 10, 1 ); |
|
43 | + add_action('AHEE__Transactions_Admin_Page__transaction_details__start', array('EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction'), 10, 1); |
|
44 | 44 | } |
45 | 45 | |
46 | - public static function check_for_payment_update_on_transaction( $transaction ) { |
|
47 | - if( $transaction instanceof EE_Transaction ) { |
|
46 | + public static function check_for_payment_update_on_transaction($transaction) { |
|
47 | + if ($transaction instanceof EE_Transaction) { |
|
48 | 48 | $last_payment = $transaction->last_payment(); |
49 | 49 | //if this payment is from Mijireh and so far unapproved |
50 | - if( |
|
50 | + if ( |
|
51 | 51 | $last_payment instanceof EE_Payment && |
52 | 52 | $last_payment->payment_method() instanceof EE_Payment_Method && |
53 | 53 | $last_payment->payment_method()->type_obj() instanceof EE_PMT_Mijireh && |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | ) { |
56 | 56 | add_action( |
57 | 57 | 'AHEE__EE_Registration_Processor__trigger_registration_update_notifications', |
58 | - array( 'EED_Mijireh_Payment_Checker', 'send_notifications_after_mijireh_ipn' ), |
|
58 | + array('EED_Mijireh_Payment_Checker', 'send_notifications_after_mijireh_ipn'), |
|
59 | 59 | 5, 2 |
60 | 60 | ); |
61 | - EE_Payment_Processor::instance()->process_ipn( array(), $transaction, $last_payment->payment_method() ); |
|
61 | + EE_Payment_Processor::instance()->process_ipn(array(), $transaction, $last_payment->payment_method()); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | } |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | * @param EE_Registration $registration |
75 | 75 | * @param array $additional_details |
76 | 76 | */ |
77 | - public static function send_notifications_after_mijireh_ipn( $registration, $additional_details ) { |
|
78 | - $last_payment = isset( $additional_details[ 'last_payment' ] ) ? $additional_details[ 'last_payment' ] : null; |
|
79 | - if ( ! $last_payment instanceof EE_Payment || $last_payment->status() != EEM_Payment::status_id_approved ) { |
|
80 | - add_filter( 'FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15 ); |
|
77 | + public static function send_notifications_after_mijireh_ipn($registration, $additional_details) { |
|
78 | + $last_payment = isset($additional_details['last_payment']) ? $additional_details['last_payment'] : null; |
|
79 | + if ( ! $last_payment instanceof EE_Payment || $last_payment->status() != EEM_Payment::status_id_approved) { |
|
80 | + add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * @access public |
90 | 90 | * @param WP_Query $WP_Query |
91 | 91 | */ |
92 | - public function run( $WP_Query = null ) { |
|
92 | + public function run($WP_Query = null) { |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | |
4 | 4 | use EventEspresso\core\libraries\rest_api\Model_Data_Translator; |
5 | 5 | |
6 | -if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
7 | - exit( 'No direct script access allowed' ); |
|
6 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
7 | + exit('No direct script access allowed'); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | /** |
@@ -25,20 +25,20 @@ discard block |
||
25 | 25 | * @param \WP_REST_Request $request |
26 | 26 | * @return array|\WP_REST_Response |
27 | 27 | */ |
28 | - public static function handle_request_models_meta( \WP_REST_Request $request ) { |
|
28 | + public static function handle_request_models_meta(\WP_REST_Request $request) { |
|
29 | 29 | $controller = new Meta(); |
30 | - try{ |
|
30 | + try { |
|
31 | 31 | $matches = $controller->parse_route( |
32 | 32 | $request->get_route(), |
33 | - '~' . \EED_Core_Rest_Api::ee_api_namespace_for_regex . 'resources~', |
|
34 | - array( 'version' ) ); |
|
35 | - if( $matches instanceof \WP_REST_Response ) { |
|
33 | + '~'.\EED_Core_Rest_Api::ee_api_namespace_for_regex.'resources~', |
|
34 | + array('version') ); |
|
35 | + if ($matches instanceof \WP_REST_Response) { |
|
36 | 36 | return $matches; |
37 | 37 | } |
38 | - $controller->set_requested_version( $matches[ 'version' ] ); |
|
39 | - return $controller->send_response( $controller->_get_models_metadata_entity() ); |
|
40 | - } catch( \Exception $e ) { |
|
41 | - return $controller->send_response( $e ); |
|
38 | + $controller->set_requested_version($matches['version']); |
|
39 | + return $controller->send_response($controller->_get_models_metadata_entity()); |
|
40 | + } catch (\Exception $e) { |
|
41 | + return $controller->send_response($e); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -46,22 +46,22 @@ discard block |
||
46 | 46 | * Gets the model metadata resource entity |
47 | 47 | * @return array for JSON response, describing all the models available in teh requested version |
48 | 48 | */ |
49 | - protected function _get_models_metadata_entity(){ |
|
49 | + protected function _get_models_metadata_entity() { |
|
50 | 50 | $response = array(); |
51 | - foreach( $this->get_model_version_info()->models_for_requested_version() as $model_name => $model_classname ){ |
|
52 | - $model = $this->get_model_version_info()->load_model( $model_name ); |
|
51 | + foreach ($this->get_model_version_info()->models_for_requested_version() as $model_name => $model_classname) { |
|
52 | + $model = $this->get_model_version_info()->load_model($model_name); |
|
53 | 53 | $fields_json = array(); |
54 | - foreach( $this->get_model_version_info()->fields_on_model_in_this_version( $model ) as $field_name => $field_obj ) { |
|
55 | - if( $this->get_model_version_info()->field_is_ignored( $field_obj ) ) { |
|
54 | + foreach ($this->get_model_version_info()->fields_on_model_in_this_version($model) as $field_name => $field_obj) { |
|
55 | + if ($this->get_model_version_info()->field_is_ignored($field_obj)) { |
|
56 | 56 | continue; |
57 | 57 | } |
58 | - if( $field_obj instanceof \EE_Boolean_Field ) { |
|
58 | + if ($field_obj instanceof \EE_Boolean_Field) { |
|
59 | 59 | $datatype = 'Boolean'; |
60 | - }elseif( $field_obj->get_wpdb_data_type() == '%d' ) { |
|
60 | + }elseif ($field_obj->get_wpdb_data_type() == '%d') { |
|
61 | 61 | $datatype = 'Number'; |
62 | - }elseif( $field_name instanceof \EE_Serialized_Text_Field ) { |
|
62 | + }elseif ($field_name instanceof \EE_Serialized_Text_Field) { |
|
63 | 63 | $datatype = 'Object'; |
64 | - }else{ |
|
64 | + } else { |
|
65 | 65 | $datatype = 'String'; |
66 | 66 | } |
67 | 67 | $default_value = Model_Data_Translator::prepare_field_value_for_json( |
@@ -72,30 +72,30 @@ discard block |
||
72 | 72 | $field_json = array( |
73 | 73 | 'name' => $field_name, |
74 | 74 | 'nicename' => $field_obj->get_nicename(), |
75 | - 'has_rendered_format' => $this->get_model_version_info()->field_has_rendered_format( $field_obj ), |
|
76 | - 'has_pretty_format' => $this->get_model_version_info()->field_has_pretty_format( $field_obj ), |
|
77 | - 'type' => str_replace('EE_', '', get_class( $field_obj ) ), |
|
75 | + 'has_rendered_format' => $this->get_model_version_info()->field_has_rendered_format($field_obj), |
|
76 | + 'has_pretty_format' => $this->get_model_version_info()->field_has_pretty_format($field_obj), |
|
77 | + 'type' => str_replace('EE_', '', get_class($field_obj)), |
|
78 | 78 | 'datatype' => $datatype, |
79 | 79 | 'nullable' => $field_obj->is_nullable(), |
80 | 80 | 'default' => $default_value, |
81 | 81 | 'table_alias' => $field_obj->get_table_alias(), |
82 | 82 | 'table_column' => $field_obj->get_table_column(), |
83 | 83 | ); |
84 | - $fields_json[ $field_json[ 'name' ] ] = $field_json; |
|
84 | + $fields_json[$field_json['name']] = $field_json; |
|
85 | 85 | |
86 | 86 | } |
87 | - $fields_json = array_merge( $fields_json, $this->get_model_version_info()->extra_resource_properties_for_model( $model ) ); |
|
88 | - $response[ $model_name ]['fields'] = apply_filters( 'FHEE__Meta__handle_request_models_meta__fields', $fields_json, $model ); |
|
87 | + $fields_json = array_merge($fields_json, $this->get_model_version_info()->extra_resource_properties_for_model($model)); |
|
88 | + $response[$model_name]['fields'] = apply_filters('FHEE__Meta__handle_request_models_meta__fields', $fields_json, $model); |
|
89 | 89 | $relations_json = array(); |
90 | - foreach( $model->relation_settings() as $relation_name => $relation_obj ) { |
|
90 | + foreach ($model->relation_settings() as $relation_name => $relation_obj) { |
|
91 | 91 | $relation_json = array( |
92 | 92 | 'name' => $relation_name, |
93 | - 'type' => str_replace( 'EE_', '', get_class( $relation_obj ) ), |
|
93 | + 'type' => str_replace('EE_', '', get_class($relation_obj)), |
|
94 | 94 | 'single' => $relation_obj instanceof \EE_Belongs_To_Relation ? true : false, |
95 | 95 | ); |
96 | - $relations_json[ $relation_name ] = $relation_json; |
|
96 | + $relations_json[$relation_name] = $relation_json; |
|
97 | 97 | } |
98 | - $response[ $model_name ][ 'relations' ] = apply_filters( 'FHEE__Meta__handle_request_models_meta__relations', $relations_json, $model ); |
|
98 | + $response[$model_name]['relations'] = apply_filters('FHEE__Meta__handle_request_models_meta__relations', $relations_json, $model); |
|
99 | 99 | } |
100 | 100 | return $response; |
101 | 101 | } |
@@ -105,24 +105,24 @@ discard block |
||
105 | 105 | * @param \WP_REST_Response $rest_response_obj |
106 | 106 | * @return \WP_REST_Response |
107 | 107 | */ |
108 | - public static function filter_ee_metadata_into_index( \WP_REST_Response $rest_response_obj ) { |
|
108 | + public static function filter_ee_metadata_into_index(\WP_REST_Response $rest_response_obj) { |
|
109 | 109 | $response_data = $rest_response_obj->get_data(); |
110 | 110 | $addons = array(); |
111 | - foreach( \EE_Registry::instance()->addons as $addon){ |
|
111 | + foreach (\EE_Registry::instance()->addons as $addon) { |
|
112 | 112 | $addon_json = array( |
113 | 113 | 'name' => $addon->name(), |
114 | 114 | 'version' => $addon->version() |
115 | 115 | ); |
116 | - $addons[ $addon_json[ 'name' ] ] = $addon_json; |
|
116 | + $addons[$addon_json['name']] = $addon_json; |
|
117 | 117 | } |
118 | - $response_data[ 'ee' ] = array( |
|
118 | + $response_data['ee'] = array( |
|
119 | 119 | 'version' => \EEM_System_Status::instance()->get_ee_version(), |
120 | 120 | 'documentation_url' => 'https://github.com/eventespresso/event-espresso-core/tree/master/docs/C--REST-API', |
121 | 121 | 'addons' => $addons, |
122 | 122 | 'maintenance_mode' => \EE_Maintenance_Mode::instance()->real_level(), |
123 | - 'served_core_versions' => array_keys( \EED_Core_Rest_Api::versions_served() ), |
|
123 | + 'served_core_versions' => array_keys(\EED_Core_Rest_Api::versions_served()), |
|
124 | 124 | ); |
125 | - $rest_response_obj->set_data( $response_data ); |
|
125 | + $rest_response_obj->set_data($response_data); |
|
126 | 126 | return $rest_response_obj; |
127 | 127 | } |
128 | 128 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | 6 | * Event Espresso |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <li><?php printf( |
40 | 40 | __('To find the sandbox account\'s credit card, go to %1$s, then "Dashboard", then under Sandbox click "Accounts", then click your account and click "Profile", then in the popup that appears click on the "Funding" tab. Your testing card is listed there.', 'event_espresso'), |
41 | 41 | '<a href="http://developer.paypal.com">developer.paypal.com</a>'); ?></li> |
42 | - <li><?php printf(__('CVV2 should be 115 (see %s PayPal\'s documentation for other special codes %s)', 'event_espresso'),'<a href="https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions#id108HH0RJ0TS" target="_blank">','</a>'); ?></li> |
|
42 | + <li><?php printf(__('CVV2 should be 115 (see %s PayPal\'s documentation for other special codes %s)', 'event_espresso'), '<a href="https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions#id108HH0RJ0TS" target="_blank">', '</a>'); ?></li> |
|
43 | 43 | </ul> |
44 | 44 | |
45 | 45 | <p class="test-credit-cards-info-pg"> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | <p class="test-credit-cards-info-pg"> |
68 | 68 | <strong><?php _e('Testing Result Code Responses', 'event_espresso'); ?></strong><br/> |
69 | - <span class="small-text"><?php printf(__('You can use the amount of the transaction to generate a particular result code (see %s PayPal\'s documentation%s). The table below lists the general guidelines for specifying amounts. IMPORTANT: before you attempt any of these, ensure your sandbox PayPal account has %s "Negative Testing" set to on%s. Also be aware that you can generate AVS errors by using certain strings in your address field, and CVV errors using certain CVV values. See %s this PayPal doc %s', 'event_espresso'),"<a href='https://developer.paypal.com/docs/classic/api/errorcodes/#id09C3GA00GR1' target='_blank'>","</a>", "<a href='https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMNXNkZ2s5VUlHTUk/edit?usp=drivesdk' target='_blank'>","</a>","<a href='https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions' target='_blank'>","</a>"); ?></span> |
|
69 | + <span class="small-text"><?php printf(__('You can use the amount of the transaction to generate a particular result code (see %s PayPal\'s documentation%s). The table below lists the general guidelines for specifying amounts. IMPORTANT: before you attempt any of these, ensure your sandbox PayPal account has %s "Negative Testing" set to on%s. Also be aware that you can generate AVS errors by using certain strings in your address field, and CVV errors using certain CVV values. See %s this PayPal doc %s', 'event_espresso'), "<a href='https://developer.paypal.com/docs/classic/api/errorcodes/#id09C3GA00GR1' target='_blank'>", "</a>", "<a href='https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMNXNkZ2s5VUlHTUk/edit?usp=drivesdk' target='_blank'>", "</a>", "<a href='https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions' target='_blank'>", "</a>"); ?></span> |
|
70 | 70 | </p> |
71 | 71 | |
72 | 72 | <div class="tbl-wrap"> |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | |
71 | 71 | /** |
72 | - * @param $type |
|
72 | + * @param string $type |
|
73 | 73 | */ |
74 | 74 | public static function validateType($type) |
75 | 75 | { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * Examines the constructor to determine which method should be used for instantiation |
127 | 127 | * |
128 | 128 | * @param \ReflectionClass $reflector |
129 | - * @return mixed |
|
129 | + * @return string |
|
130 | 130 | */ |
131 | 131 | protected function resolveInstantiationMethod(\ReflectionClass $reflector) |
132 | 132 | { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | public static function getTypes() |
58 | 58 | { |
59 | - return (array)apply_filters( |
|
59 | + return (array) apply_filters( |
|
60 | 60 | 'FHEE__EventEspresso\core\services\container\CoffeeMaker__getTypes', |
61 | 61 | array( |
62 | 62 | CoffeeMaker::BREW_NEW, |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | use EventEspresso\core\services\container\exceptions\InstantiationException; |
7 | 7 | |
8 | 8 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
9 | - exit('No direct script access allowed'); |
|
9 | + exit('No direct script access allowed'); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | |
@@ -23,158 +23,158 @@ discard block |
||
23 | 23 | abstract class CoffeeMaker implements CoffeeMakerInterface |
24 | 24 | { |
25 | 25 | |
26 | - /** |
|
27 | - * Indicates that CoffeeMaker should construct a NEW entity instance from the provided arguments (if given) |
|
28 | - */ |
|
29 | - const BREW_NEW = 'new'; |
|
30 | - |
|
31 | - /** |
|
32 | - * Indicates that CoffeeMaker should always return a SHARED instance |
|
33 | - */ |
|
34 | - const BREW_SHARED = 'shared'; |
|
35 | - |
|
36 | - /** |
|
37 | - * Indicates that CoffeeMaker should only load the file/class/interface but NOT instantiate |
|
38 | - */ |
|
39 | - const BREW_LOAD_ONLY = 'load_only'; |
|
40 | - |
|
41 | - |
|
42 | - /** |
|
43 | - * @var CoffeePotInterface $coffee_pot |
|
44 | - */ |
|
45 | - private $coffee_pot; |
|
46 | - |
|
47 | - /** |
|
48 | - * @var DependencyInjector $injector |
|
49 | - */ |
|
50 | - private $injector; |
|
51 | - |
|
52 | - |
|
53 | - |
|
54 | - /** |
|
55 | - * @return array |
|
56 | - */ |
|
57 | - public static function getTypes() |
|
58 | - { |
|
59 | - return (array)apply_filters( |
|
60 | - 'FHEE__EventEspresso\core\services\container\CoffeeMaker__getTypes', |
|
61 | - array( |
|
62 | - CoffeeMaker::BREW_NEW, |
|
63 | - CoffeeMaker::BREW_SHARED, |
|
64 | - CoffeeMaker::BREW_LOAD_ONLY, |
|
65 | - ) |
|
66 | - ); |
|
67 | - } |
|
68 | - |
|
69 | - |
|
70 | - |
|
71 | - /** |
|
72 | - * @param $type |
|
73 | - */ |
|
74 | - public static function validateType($type) |
|
75 | - { |
|
76 | - $types = CoffeeMaker::getTypes(); |
|
77 | - if ( ! in_array($type, $types)) { |
|
78 | - throw new InvalidIdentifierException( |
|
79 | - is_object($type) ? get_class($type) : gettype($type), |
|
80 | - __( |
|
81 | - 'recipe type (one of the class constants on \EventEspresso\core\services\container\CoffeeMaker)', |
|
82 | - 'event_espresso' |
|
83 | - ) |
|
84 | - ); |
|
85 | - } |
|
86 | - return $type; |
|
87 | - } |
|
88 | - |
|
89 | - |
|
90 | - |
|
91 | - /** |
|
92 | - * CoffeeMaker constructor. |
|
93 | - * |
|
94 | - * @param CoffeePotInterface $coffee_pot |
|
95 | - * @param InjectorInterface $injector |
|
96 | - */ |
|
97 | - public function __construct(CoffeePotInterface $coffee_pot, InjectorInterface $injector) |
|
98 | - { |
|
99 | - $this->coffee_pot = $coffee_pot; |
|
100 | - $this->injector = $injector; |
|
101 | - } |
|
102 | - |
|
103 | - |
|
104 | - |
|
105 | - /** |
|
106 | - * @return \EventEspresso\core\services\container\CoffeePotInterface |
|
107 | - */ |
|
108 | - protected function coffeePot() |
|
109 | - { |
|
110 | - return $this->coffee_pot; |
|
111 | - } |
|
112 | - |
|
113 | - |
|
114 | - |
|
115 | - /** |
|
116 | - * @return \EventEspresso\core\services\container\DependencyInjector |
|
117 | - */ |
|
118 | - protected function injector() |
|
119 | - { |
|
120 | - return $this->injector; |
|
121 | - } |
|
122 | - |
|
123 | - |
|
124 | - |
|
125 | - /** |
|
126 | - * Examines the constructor to determine which method should be used for instantiation |
|
127 | - * |
|
128 | - * @param \ReflectionClass $reflector |
|
129 | - * @return mixed |
|
130 | - */ |
|
131 | - protected function resolveInstantiationMethod(\ReflectionClass $reflector) |
|
132 | - { |
|
133 | - if ($reflector->getConstructor() === null) { |
|
134 | - return 'NewInstance'; |
|
135 | - } else if ($reflector->isInstantiable()) { |
|
136 | - return 'NewInstanceArgs'; |
|
137 | - } else if (method_exists($reflector->getName(), 'instance')) { |
|
138 | - return 'instance'; |
|
139 | - } else if (method_exists($reflector->getName(), 'new_instance')) { |
|
140 | - return 'new_instance'; |
|
141 | - } else if (method_exists($reflector->getName(), 'new_instance_from_db')) { |
|
142 | - return 'new_instance_from_db'; |
|
143 | - } else { |
|
144 | - throw new InstantiationException($reflector->getName()); |
|
145 | - } |
|
146 | - } |
|
147 | - |
|
148 | - |
|
149 | - |
|
150 | - /** |
|
151 | - * Ensures files for classes that are not PSR-4 compatible are loaded |
|
152 | - * and then verifies that classes exist where applicable |
|
153 | - * |
|
154 | - * @param RecipeInterface $recipe |
|
155 | - * @throws InvalidClassException |
|
156 | - */ |
|
157 | - protected function resolveClassAndFilepath(RecipeInterface $recipe) |
|
158 | - { |
|
159 | - $paths = $recipe->paths(); |
|
160 | - if ( ! empty($paths)) { |
|
161 | - foreach ($paths as $path) { |
|
162 | - if (strpos($path, '*') === false && is_readable($path)) { |
|
163 | - require_once($path); |
|
164 | - } |
|
165 | - } |
|
166 | - } |
|
167 | - // re: using "false" for class_exists() second param: |
|
168 | - // if a class name is not already known to PHP, then class_exists() will run through |
|
169 | - // all of the registered spl_autoload functions until it either finds the class, |
|
170 | - // or gets to the end of the registered spl_autoload functions. |
|
171 | - // When the second parameter is true, it will also attempt to load the class file, |
|
172 | - // but it will also trigger an error if the class can not be loaded. |
|
173 | - // We don't want that extra error in the mix, so we have set the second param to "false" |
|
174 | - if ($recipe->type() !== CoffeeMaker::BREW_LOAD_ONLY && ! class_exists($recipe->fqcn(), false)) { |
|
175 | - throw new InvalidClassException($recipe->identifier()); |
|
176 | - } |
|
177 | - } |
|
26 | + /** |
|
27 | + * Indicates that CoffeeMaker should construct a NEW entity instance from the provided arguments (if given) |
|
28 | + */ |
|
29 | + const BREW_NEW = 'new'; |
|
30 | + |
|
31 | + /** |
|
32 | + * Indicates that CoffeeMaker should always return a SHARED instance |
|
33 | + */ |
|
34 | + const BREW_SHARED = 'shared'; |
|
35 | + |
|
36 | + /** |
|
37 | + * Indicates that CoffeeMaker should only load the file/class/interface but NOT instantiate |
|
38 | + */ |
|
39 | + const BREW_LOAD_ONLY = 'load_only'; |
|
40 | + |
|
41 | + |
|
42 | + /** |
|
43 | + * @var CoffeePotInterface $coffee_pot |
|
44 | + */ |
|
45 | + private $coffee_pot; |
|
46 | + |
|
47 | + /** |
|
48 | + * @var DependencyInjector $injector |
|
49 | + */ |
|
50 | + private $injector; |
|
51 | + |
|
52 | + |
|
53 | + |
|
54 | + /** |
|
55 | + * @return array |
|
56 | + */ |
|
57 | + public static function getTypes() |
|
58 | + { |
|
59 | + return (array)apply_filters( |
|
60 | + 'FHEE__EventEspresso\core\services\container\CoffeeMaker__getTypes', |
|
61 | + array( |
|
62 | + CoffeeMaker::BREW_NEW, |
|
63 | + CoffeeMaker::BREW_SHARED, |
|
64 | + CoffeeMaker::BREW_LOAD_ONLY, |
|
65 | + ) |
|
66 | + ); |
|
67 | + } |
|
68 | + |
|
69 | + |
|
70 | + |
|
71 | + /** |
|
72 | + * @param $type |
|
73 | + */ |
|
74 | + public static function validateType($type) |
|
75 | + { |
|
76 | + $types = CoffeeMaker::getTypes(); |
|
77 | + if ( ! in_array($type, $types)) { |
|
78 | + throw new InvalidIdentifierException( |
|
79 | + is_object($type) ? get_class($type) : gettype($type), |
|
80 | + __( |
|
81 | + 'recipe type (one of the class constants on \EventEspresso\core\services\container\CoffeeMaker)', |
|
82 | + 'event_espresso' |
|
83 | + ) |
|
84 | + ); |
|
85 | + } |
|
86 | + return $type; |
|
87 | + } |
|
88 | + |
|
89 | + |
|
90 | + |
|
91 | + /** |
|
92 | + * CoffeeMaker constructor. |
|
93 | + * |
|
94 | + * @param CoffeePotInterface $coffee_pot |
|
95 | + * @param InjectorInterface $injector |
|
96 | + */ |
|
97 | + public function __construct(CoffeePotInterface $coffee_pot, InjectorInterface $injector) |
|
98 | + { |
|
99 | + $this->coffee_pot = $coffee_pot; |
|
100 | + $this->injector = $injector; |
|
101 | + } |
|
102 | + |
|
103 | + |
|
104 | + |
|
105 | + /** |
|
106 | + * @return \EventEspresso\core\services\container\CoffeePotInterface |
|
107 | + */ |
|
108 | + protected function coffeePot() |
|
109 | + { |
|
110 | + return $this->coffee_pot; |
|
111 | + } |
|
112 | + |
|
113 | + |
|
114 | + |
|
115 | + /** |
|
116 | + * @return \EventEspresso\core\services\container\DependencyInjector |
|
117 | + */ |
|
118 | + protected function injector() |
|
119 | + { |
|
120 | + return $this->injector; |
|
121 | + } |
|
122 | + |
|
123 | + |
|
124 | + |
|
125 | + /** |
|
126 | + * Examines the constructor to determine which method should be used for instantiation |
|
127 | + * |
|
128 | + * @param \ReflectionClass $reflector |
|
129 | + * @return mixed |
|
130 | + */ |
|
131 | + protected function resolveInstantiationMethod(\ReflectionClass $reflector) |
|
132 | + { |
|
133 | + if ($reflector->getConstructor() === null) { |
|
134 | + return 'NewInstance'; |
|
135 | + } else if ($reflector->isInstantiable()) { |
|
136 | + return 'NewInstanceArgs'; |
|
137 | + } else if (method_exists($reflector->getName(), 'instance')) { |
|
138 | + return 'instance'; |
|
139 | + } else if (method_exists($reflector->getName(), 'new_instance')) { |
|
140 | + return 'new_instance'; |
|
141 | + } else if (method_exists($reflector->getName(), 'new_instance_from_db')) { |
|
142 | + return 'new_instance_from_db'; |
|
143 | + } else { |
|
144 | + throw new InstantiationException($reflector->getName()); |
|
145 | + } |
|
146 | + } |
|
147 | + |
|
148 | + |
|
149 | + |
|
150 | + /** |
|
151 | + * Ensures files for classes that are not PSR-4 compatible are loaded |
|
152 | + * and then verifies that classes exist where applicable |
|
153 | + * |
|
154 | + * @param RecipeInterface $recipe |
|
155 | + * @throws InvalidClassException |
|
156 | + */ |
|
157 | + protected function resolveClassAndFilepath(RecipeInterface $recipe) |
|
158 | + { |
|
159 | + $paths = $recipe->paths(); |
|
160 | + if ( ! empty($paths)) { |
|
161 | + foreach ($paths as $path) { |
|
162 | + if (strpos($path, '*') === false && is_readable($path)) { |
|
163 | + require_once($path); |
|
164 | + } |
|
165 | + } |
|
166 | + } |
|
167 | + // re: using "false" for class_exists() second param: |
|
168 | + // if a class name is not already known to PHP, then class_exists() will run through |
|
169 | + // all of the registered spl_autoload functions until it either finds the class, |
|
170 | + // or gets to the end of the registered spl_autoload functions. |
|
171 | + // When the second parameter is true, it will also attempt to load the class file, |
|
172 | + // but it will also trigger an error if the class can not be loaded. |
|
173 | + // We don't want that extra error in the mix, so we have set the second param to "false" |
|
174 | + if ($recipe->type() !== CoffeeMaker::BREW_LOAD_ONLY && ! class_exists($recipe->fqcn(), false)) { |
|
175 | + throw new InvalidClassException($recipe->identifier()); |
|
176 | + } |
|
177 | + } |
|
178 | 178 | |
179 | 179 | |
180 | 180 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\collections; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -20,38 +20,38 @@ discard block |
||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | - /** |
|
24 | - * setCollectionInterface |
|
25 | - * |
|
26 | - * @access protected |
|
27 | - * @param string $collection_interface |
|
28 | - * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
29 | - */ |
|
30 | - protected function setCollectionInterface($collection_interface ) |
|
31 | - { |
|
32 | - $this->collection_interface = ''; |
|
33 | - } |
|
34 | - |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * add |
|
39 | - * attaches an object to the Collection |
|
40 | - * and sets any supplied data associated with the current iterator entry |
|
41 | - * by calling EE_Object_Collection::set_identifier() |
|
42 | - * |
|
43 | - * @access public |
|
44 | - * @param mixed $object |
|
45 | - * @param mixed $identifier |
|
46 | - * @return bool |
|
47 | - * @throws \EventEspresso\core\exceptions\InvalidEntityException |
|
48 | - */ |
|
49 | - public function add($object, $identifier = null) |
|
50 | - { |
|
51 | - $this->attach($object); |
|
52 | - $this->setIdentifier($object, $identifier); |
|
53 | - return $this->contains($object); |
|
54 | - } |
|
23 | + /** |
|
24 | + * setCollectionInterface |
|
25 | + * |
|
26 | + * @access protected |
|
27 | + * @param string $collection_interface |
|
28 | + * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
29 | + */ |
|
30 | + protected function setCollectionInterface($collection_interface ) |
|
31 | + { |
|
32 | + $this->collection_interface = ''; |
|
33 | + } |
|
34 | + |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * add |
|
39 | + * attaches an object to the Collection |
|
40 | + * and sets any supplied data associated with the current iterator entry |
|
41 | + * by calling EE_Object_Collection::set_identifier() |
|
42 | + * |
|
43 | + * @access public |
|
44 | + * @param mixed $object |
|
45 | + * @param mixed $identifier |
|
46 | + * @return bool |
|
47 | + * @throws \EventEspresso\core\exceptions\InvalidEntityException |
|
48 | + */ |
|
49 | + public function add($object, $identifier = null) |
|
50 | + { |
|
51 | + $this->attach($object); |
|
52 | + $this->setIdentifier($object, $identifier); |
|
53 | + return $this->contains($object); |
|
54 | + } |
|
55 | 55 | |
56 | 56 | |
57 | 57 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @param string $collection_interface |
28 | 28 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
29 | 29 | */ |
30 | - protected function setCollectionInterface($collection_interface ) |
|
30 | + protected function setCollectionInterface($collection_interface) |
|
31 | 31 | { |
32 | 32 | $this->collection_interface = ''; |
33 | 33 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -18,26 +18,26 @@ discard block |
||
18 | 18 | interface ContainerInterface |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * Finds an entry of the container by its identifier and returns it. |
|
23 | - * |
|
24 | - * @param string $id Identifier of the entry to look for. |
|
25 | - * @return mixed Entry. |
|
26 | - */ |
|
27 | - public function get($id); |
|
28 | - |
|
29 | - |
|
30 | - |
|
31 | - /** |
|
32 | - * Returns true if the container can return an entry for the given identifier. |
|
33 | - * Returns false otherwise. |
|
34 | - * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
|
35 | - * It does however mean that `get($id)` will not throw a `NotFoundException`. |
|
36 | - * |
|
37 | - * @param string $id Identifier of the entry to look for. |
|
38 | - * @return boolean |
|
39 | - */ |
|
40 | - public function has($id); |
|
21 | + /** |
|
22 | + * Finds an entry of the container by its identifier and returns it. |
|
23 | + * |
|
24 | + * @param string $id Identifier of the entry to look for. |
|
25 | + * @return mixed Entry. |
|
26 | + */ |
|
27 | + public function get($id); |
|
28 | + |
|
29 | + |
|
30 | + |
|
31 | + /** |
|
32 | + * Returns true if the container can return an entry for the given identifier. |
|
33 | + * Returns false otherwise. |
|
34 | + * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
|
35 | + * It does however mean that `get($id)` will not throw a `NotFoundException`. |
|
36 | + * |
|
37 | + * @param string $id Identifier of the entry to look for. |
|
38 | + * @return boolean |
|
39 | + */ |
|
40 | + public function has($id); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -17,33 +17,33 @@ discard block |
||
17 | 17 | interface CoffeeMakerInterface |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @return array |
|
22 | - */ |
|
23 | - public static function getTypes(); |
|
20 | + /** |
|
21 | + * @return array |
|
22 | + */ |
|
23 | + public static function getTypes(); |
|
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | - /** |
|
28 | - * @param $type |
|
29 | - */ |
|
30 | - public static function validateType($type); |
|
27 | + /** |
|
28 | + * @param $type |
|
29 | + */ |
|
30 | + public static function validateType($type); |
|
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * @param RecipeInterface $recipe |
|
36 | - * @param array $arguments |
|
37 | - * @return mixed |
|
38 | - */ |
|
39 | - public function brew(RecipeInterface $recipe, $arguments = array()); |
|
34 | + /** |
|
35 | + * @param RecipeInterface $recipe |
|
36 | + * @param array $arguments |
|
37 | + * @return mixed |
|
38 | + */ |
|
39 | + public function brew(RecipeInterface $recipe, $arguments = array()); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | |
43 | - /** |
|
44 | - * @return string |
|
45 | - */ |
|
46 | - public function type(); |
|
43 | + /** |
|
44 | + * @return string |
|
45 | + */ |
|
46 | + public function type(); |
|
47 | 47 | |
48 | 48 | } |
49 | 49 | // End of file CoffeeMakerInterface.php |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -24,26 +24,26 @@ discard block |
||
24 | 24 | class LoadOnlyCoffeeMaker extends CoffeeMaker |
25 | 25 | { |
26 | 26 | |
27 | - /** |
|
28 | - * @return string |
|
29 | - */ |
|
30 | - public function type() |
|
31 | - { |
|
32 | - return CoffeeMaker::BREW_LOAD_ONLY; |
|
33 | - } |
|
34 | - |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * @param RecipeInterface $recipe |
|
39 | - * @param array $arguments |
|
40 | - * @return mixed |
|
41 | - */ |
|
42 | - public function brew(RecipeInterface $recipe, $arguments = array()) |
|
43 | - { |
|
44 | - $this->resolveClassAndFilepath($recipe); |
|
45 | - return null; |
|
46 | - } |
|
27 | + /** |
|
28 | + * @return string |
|
29 | + */ |
|
30 | + public function type() |
|
31 | + { |
|
32 | + return CoffeeMaker::BREW_LOAD_ONLY; |
|
33 | + } |
|
34 | + |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * @param RecipeInterface $recipe |
|
39 | + * @param array $arguments |
|
40 | + * @return mixed |
|
41 | + */ |
|
42 | + public function brew(RecipeInterface $recipe, $arguments = array()) |
|
43 | + { |
|
44 | + $this->resolveClassAndFilepath($recipe); |
|
45 | + return null; |
|
46 | + } |
|
47 | 47 | |
48 | 48 | |
49 | 49 |