Completed
Branch BUG/required-message-fields (8f9492)
by
unknown
10:53 queued 20s
created
core/services/orm/tree_traversal/BaseNode.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     public function visit($model_objects_to_identify)
70 70
     {
71
-        if (! $this->isDiscovered()) {
71
+        if ( ! $this->isDiscovered()) {
72 72
             $this->discover();
73 73
         }
74 74
         if ($this->isComplete()) {
Please login to merge, or discard this patch.
Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -31,105 +31,105 @@
 block discarded – undo
31 31
  */
32 32
 abstract class BaseNode
33 33
 {
34
-    /**
35
-     * @var boolean
36
-     */
37
-    protected $complete;
34
+	/**
35
+	 * @var boolean
36
+	 */
37
+	protected $complete;
38 38
 
39 39
 
40
-    /**
41
-     * @var array of model names we don't want to traverse
42
-     */
43
-    protected $dont_traverse_models;
40
+	/**
41
+	 * @var array of model names we don't want to traverse
42
+	 */
43
+	protected $dont_traverse_models;
44 44
 
45
-    /**
46
-     * Whether this item has already been initialized
47
-     */
48
-    abstract protected function isDiscovered();
45
+	/**
46
+	 * Whether this item has already been initialized
47
+	 */
48
+	abstract protected function isDiscovered();
49 49
 
50
-    /**
51
-     * Determines if the work is done yet or not. Requires you to have first discovered what work exists by calling
52
-     * discover().
53
-     * @since 4.10.12.p
54
-     * @return boolean
55
-     */
56
-    abstract public function isComplete();
50
+	/**
51
+	 * Determines if the work is done yet or not. Requires you to have first discovered what work exists by calling
52
+	 * discover().
53
+	 * @since 4.10.12.p
54
+	 * @return boolean
55
+	 */
56
+	abstract public function isComplete();
57 57
 
58
-    /**
59
-     * Discovers what work needs to be done to complete traversing this node and its children.
60
-     * Note that this is separate from the constructor, so we can create child nodes without
61
-     * discovering them immediately.
62
-     * @since 4.10.12.p
63
-     * @return mixed
64
-     */
65
-    abstract protected function discover();
58
+	/**
59
+	 * Discovers what work needs to be done to complete traversing this node and its children.
60
+	 * Note that this is separate from the constructor, so we can create child nodes without
61
+	 * discovering them immediately.
62
+	 * @since 4.10.12.p
63
+	 * @return mixed
64
+	 */
65
+	abstract protected function discover();
66 66
 
67
-    /**
68
-     * Identifies model objects, up to the limit $model_objects_to_identify.
69
-     * @since 4.10.12.p
70
-     * @param int $model_objects_to_identify
71
-     * @return int units of work done
72
-     */
73
-    abstract protected function work($model_objects_to_identify);
67
+	/**
68
+	 * Identifies model objects, up to the limit $model_objects_to_identify.
69
+	 * @since 4.10.12.p
70
+	 * @param int $model_objects_to_identify
71
+	 * @return int units of work done
72
+	 */
73
+	abstract protected function work($model_objects_to_identify);
74 74
 
75
-    /**
76
-     * Shows the entity/relation node as an array.
77
-     * @since 4.10.12.p
78
-     * @return array
79
-     */
80
-    abstract public function toArray();
75
+	/**
76
+	 * Shows the entity/relation node as an array.
77
+	 * @since 4.10.12.p
78
+	 * @return array
79
+	 */
80
+	abstract public function toArray();
81 81
 
82
-    /**
83
-     * Discovers how much work there is to do, double-checks the work isn't already finished, and then does the work.
84
-     * Note: do not call when site is in maintenance mode level 2.
85
-     *
86
-     * @since 4.10.12.p
87
-     * @param $model_objects_to_identify
88
-     * @return int number of model objects we want to identify during this call. On subsequent calls we'll continue
89
-     * where we left off.
90
-     */
91
-    public function visit($model_objects_to_identify)
92
-    {
93
-        if (! $this->isDiscovered()) {
94
-            $this->discover();
95
-        }
96
-        if ($this->isComplete()) {
97
-            return 0;
98
-        }
99
-        return $this->work($model_objects_to_identify);
100
-    }
82
+	/**
83
+	 * Discovers how much work there is to do, double-checks the work isn't already finished, and then does the work.
84
+	 * Note: do not call when site is in maintenance mode level 2.
85
+	 *
86
+	 * @since 4.10.12.p
87
+	 * @param $model_objects_to_identify
88
+	 * @return int number of model objects we want to identify during this call. On subsequent calls we'll continue
89
+	 * where we left off.
90
+	 */
91
+	public function visit($model_objects_to_identify)
92
+	{
93
+		if (! $this->isDiscovered()) {
94
+			$this->discover();
95
+		}
96
+		if ($this->isComplete()) {
97
+			return 0;
98
+		}
99
+		return $this->work($model_objects_to_identify);
100
+	}
101 101
 
102
-    /**
103
-     * Gets the IDs of completely identified model objects that can be deleted.
104
-     * @since 4.10.12.p
105
-     * @return mixed
106
-     */
107
-    abstract public function getIds();
102
+	/**
103
+	 * Gets the IDs of completely identified model objects that can be deleted.
104
+	 * @since 4.10.12.p
105
+	 * @return mixed
106
+	 */
107
+	abstract public function getIds();
108 108
 
109
-    /**
110
-     * Make sure we encode whether its complete or not, but don't use such a long name.
111
-     * @since 4.10.12.p
112
-     * @return array
113
-     */
114
-    public function __sleep()
115
-    {
116
-        $this->c = $this->complete;
117
-        $this->dtm = $this->dont_traverse_models;
118
-        return [
119
-            'c',
120
-            'dtm'
121
-        ];
122
-    }
109
+	/**
110
+	 * Make sure we encode whether its complete or not, but don't use such a long name.
111
+	 * @since 4.10.12.p
112
+	 * @return array
113
+	 */
114
+	public function __sleep()
115
+	{
116
+		$this->c = $this->complete;
117
+		$this->dtm = $this->dont_traverse_models;
118
+		return [
119
+			'c',
120
+			'dtm'
121
+		];
122
+	}
123 123
 
124
-    /**
125
-     * Use the dynamic property to set the "complete" property.
126
-     * @since 4.10.12.p
127
-     */
128
-    public function __wakeup()
129
-    {
130
-        $this->complete = $this->c;
131
-        $this->dont_traverse_models = $this->dtm;
132
-    }
124
+	/**
125
+	 * Use the dynamic property to set the "complete" property.
126
+	 * @since 4.10.12.p
127
+	 */
128
+	public function __wakeup()
129
+	{
130
+		$this->complete = $this->c;
131
+		$this->dont_traverse_models = $this->dtm;
132
+	}
133 133
 }
134 134
 // End of file BaseNode.php
135 135
 // Location: EventEspresso\core\services\orm\tree_traversal/BaseNode.php
Please login to merge, or discard this patch.
core/db_classes/EE_Price.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
     {
420 420
         return ! $this->is_percent()
421 421
             ? $this->get_pretty('PRC_amount')
422
-            : $this->get('PRC_amount') . '%';
422
+            : $this->get('PRC_amount').'%';
423 423
     }
424 424
 
425 425
 
Please login to merge, or discard this patch.
Indentation   +442 added lines, -442 removed lines patch added patch discarded remove patch
@@ -12,446 +12,446 @@
 block discarded – undo
12 12
  */
13 13
 class EE_Price extends EE_Soft_Delete_Base_Class
14 14
 {
15
-    /**
16
-     * @param array  $props_n_values          incoming values
17
-     * @param string $timezone                incoming timezone (if not set the timezone set for the website will be
18
-     *                                        used.)
19
-     * @param array  $date_formats            incoming date_formats in an array where the first value is the
20
-     *                                        date_format and the second value is the time format
21
-     * @return EE_Price
22
-     * @throws EE_Error
23
-     * @throws InvalidArgumentException
24
-     * @throws ReflectionException
25
-     * @throws InvalidDataTypeException
26
-     * @throws InvalidInterfaceException
27
-     */
28
-    public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
29
-    {
30
-        $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
31
-        return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
32
-    }
33
-
34
-
35
-    /**
36
-     * @param array  $props_n_values  incoming values from the database
37
-     * @param string $timezone        incoming timezone as set by the model.  If not set the timezone for
38
-     *                                the website will be used.
39
-     * @return EE_Price
40
-     * @throws EE_Error
41
-     * @throws InvalidArgumentException
42
-     * @throws ReflectionException
43
-     * @throws InvalidDataTypeException
44
-     * @throws InvalidInterfaceException
45
-     */
46
-    public static function new_instance_from_db($props_n_values = array(), $timezone = null)
47
-    {
48
-        return new self($props_n_values, true, $timezone);
49
-    }
50
-
51
-
52
-    /**
53
-     * Set Price type ID
54
-     *
55
-     * @param int $PRT_ID
56
-     * @throws EE_Error
57
-     * @throws InvalidArgumentException
58
-     * @throws ReflectionException
59
-     * @throws InvalidDataTypeException
60
-     * @throws InvalidInterfaceException
61
-     */
62
-    public function set_type($PRT_ID = 0)
63
-    {
64
-        $this->set('PRT_ID', $PRT_ID);
65
-    }
66
-
67
-
68
-    /**
69
-     * Set Price Amount
70
-     *
71
-     * @param float $PRC_amount
72
-     * @throws EE_Error
73
-     * @throws InvalidArgumentException
74
-     * @throws ReflectionException
75
-     * @throws InvalidDataTypeException
76
-     * @throws InvalidInterfaceException
77
-     */
78
-    public function set_amount($PRC_amount = 0.00)
79
-    {
80
-        $this->set('PRC_amount', $PRC_amount);
81
-    }
82
-
83
-
84
-    /**
85
-     * Set Price Name
86
-     *
87
-     * @param string $PRC_name
88
-     * @throws EE_Error
89
-     * @throws InvalidArgumentException
90
-     * @throws ReflectionException
91
-     * @throws InvalidDataTypeException
92
-     * @throws InvalidInterfaceException
93
-     */
94
-    public function set_name($PRC_name = '')
95
-    {
96
-        $this->set('PRC_name', $PRC_name);
97
-    }
98
-
99
-
100
-    /**
101
-     * Set Price Description
102
-     *
103
-     * @param string $PRC_desc
104
-     * @throws EE_Error
105
-     * @throws InvalidArgumentException
106
-     * @throws ReflectionException
107
-     * @throws InvalidDataTypeException
108
-     * @throws InvalidInterfaceException
109
-     */
110
-    public function set_description($PRC_desc = '')
111
-    {
112
-        $this->Set('PRC_desc', $PRC_desc);
113
-    }
114
-
115
-
116
-    /**
117
-     * set is_default
118
-     *
119
-     * @param bool $PRC_is_default
120
-     * @throws EE_Error
121
-     * @throws InvalidArgumentException
122
-     * @throws ReflectionException
123
-     * @throws InvalidDataTypeException
124
-     * @throws InvalidInterfaceException
125
-     */
126
-    public function set_is_default($PRC_is_default = false)
127
-    {
128
-        $this->set('PRC_is_default', $PRC_is_default);
129
-    }
130
-
131
-
132
-    /**
133
-     * set deleted
134
-     *
135
-     * @param bool $PRC_deleted
136
-     * @throws EE_Error
137
-     * @throws InvalidArgumentException
138
-     * @throws ReflectionException
139
-     * @throws InvalidDataTypeException
140
-     * @throws InvalidInterfaceException
141
-     */
142
-    public function set_deleted($PRC_deleted = null)
143
-    {
144
-        $this->set('PRC_deleted', $PRC_deleted);
145
-    }
146
-
147
-
148
-    /**
149
-     * get Price type
150
-     *
151
-     * @return        int
152
-     * @throws EE_Error
153
-     * @throws InvalidArgumentException
154
-     * @throws ReflectionException
155
-     * @throws InvalidDataTypeException
156
-     * @throws InvalidInterfaceException
157
-     */
158
-    public function type()
159
-    {
160
-        return $this->get('PRT_ID');
161
-    }
162
-
163
-
164
-    /**
165
-     * get Price Amount
166
-     *
167
-     * @return        float
168
-     * @throws EE_Error
169
-     * @throws InvalidArgumentException
170
-     * @throws ReflectionException
171
-     * @throws InvalidDataTypeException
172
-     * @throws InvalidInterfaceException
173
-     */
174
-    public function amount()
175
-    {
176
-        return $this->get('PRC_amount');
177
-    }
178
-
179
-
180
-    /**
181
-     * get Price Name
182
-     *
183
-     * @return        string
184
-     * @throws EE_Error
185
-     * @throws InvalidArgumentException
186
-     * @throws ReflectionException
187
-     * @throws InvalidDataTypeException
188
-     * @throws InvalidInterfaceException
189
-     */
190
-    public function name()
191
-    {
192
-        return $this->get('PRC_name');
193
-    }
194
-
195
-
196
-    /**
197
-     * get Price description
198
-     *
199
-     * @return        string
200
-     * @throws EE_Error
201
-     * @throws InvalidArgumentException
202
-     * @throws ReflectionException
203
-     * @throws InvalidDataTypeException
204
-     * @throws InvalidInterfaceException
205
-     */
206
-    public function desc()
207
-    {
208
-        return $this->get('PRC_desc');
209
-    }
210
-
211
-
212
-    /**
213
-     * get overrides
214
-     *
215
-     * @return        int
216
-     * @throws EE_Error
217
-     * @throws InvalidArgumentException
218
-     * @throws ReflectionException
219
-     * @throws InvalidDataTypeException
220
-     * @throws InvalidInterfaceException
221
-     */
222
-    public function overrides()
223
-    {
224
-        return $this->get('PRC_overrides');
225
-    }
226
-
227
-
228
-    /**
229
-     * get order
230
-     *
231
-     * @return int
232
-     * @throws EE_Error
233
-     * @throws InvalidArgumentException
234
-     * @throws ReflectionException
235
-     * @throws InvalidDataTypeException
236
-     * @throws InvalidInterfaceException
237
-     */
238
-    public function order()
239
-    {
240
-        return $this->get('PRC_order');
241
-    }
242
-
243
-
244
-    /**
245
-     * get the author of the price
246
-     *
247
-     * @return int
248
-     * @throws EE_Error
249
-     * @throws InvalidArgumentException
250
-     * @throws ReflectionException
251
-     * @throws InvalidDataTypeException
252
-     * @throws InvalidInterfaceException
253
-     * @since 4.5.0
254
-     */
255
-    public function wp_user()
256
-    {
257
-        return $this->get('PRC_wp_user');
258
-    }
259
-
260
-
261
-    /**
262
-     * get is_default
263
-     *
264
-     * @return bool
265
-     * @throws EE_Error
266
-     * @throws InvalidArgumentException
267
-     * @throws ReflectionException
268
-     * @throws InvalidDataTypeException
269
-     * @throws InvalidInterfaceException
270
-     */
271
-    public function is_default()
272
-    {
273
-        return $this->get('PRC_is_default');
274
-    }
275
-
276
-
277
-    /**
278
-     * get deleted
279
-     *
280
-     * @return bool
281
-     * @throws EE_Error
282
-     * @throws InvalidArgumentException
283
-     * @throws ReflectionException
284
-     * @throws InvalidDataTypeException
285
-     * @throws InvalidInterfaceException
286
-     */
287
-    public function deleted()
288
-    {
289
-        return $this->get('PRC_deleted');
290
-    }
291
-
292
-
293
-    /**
294
-     * @return bool
295
-     * @throws EE_Error
296
-     * @throws InvalidArgumentException
297
-     * @throws ReflectionException
298
-     * @throws InvalidDataTypeException
299
-     * @throws InvalidInterfaceException
300
-     */
301
-    public function parent()
302
-    {
303
-        return $this->get('PRC_parent');
304
-    }
305
-
306
-
307
-    // some helper methods for getting info on the price_type for this price
308
-
309
-
310
-    /**
311
-     * return whether the price is a base price or not
312
-     *
313
-     * @return boolean
314
-     * @throws EE_Error
315
-     * @throws InvalidArgumentException
316
-     * @throws InvalidDataTypeException
317
-     * @throws InvalidInterfaceException
318
-     * @throws ReflectionException
319
-     */
320
-    public function is_base_price()
321
-    {
322
-        $price_type = $this->type_obj();
323
-        return $price_type->is_base_price();
324
-    }
325
-
326
-
327
-    /**
328
-     * @return EE_Base_Class|EE_Price_Type
329
-     * @throws EE_Error
330
-     * @throws InvalidArgumentException
331
-     * @throws ReflectionException
332
-     * @throws InvalidDataTypeException
333
-     * @throws InvalidInterfaceException
334
-     */
335
-    public function type_obj()
336
-    {
337
-        return $this->get_first_related('Price_Type');
338
-    }
339
-
340
-
341
-    /**
342
-     * @return int
343
-     * @throws EE_Error
344
-     * @throws InvalidArgumentException
345
-     * @throws ReflectionException
346
-     * @throws InvalidDataTypeException
347
-     * @throws InvalidInterfaceException
348
-     */
349
-    public function type_order()
350
-    {
351
-        return $this->get_first_related('Price_Type')->order();
352
-    }
353
-
354
-
355
-    /**
356
-     * Simply indicates whether this price increases or decreases the total
357
-     *
358
-     * @return boolean true = discount, otherwise adds to the total
359
-     * @throws EE_Error
360
-     * @throws InvalidArgumentException
361
-     * @throws ReflectionException
362
-     * @throws InvalidDataTypeException
363
-     * @throws InvalidInterfaceException
364
-     */
365
-    public function is_discount()
366
-    {
367
-        $price_type = $this->type_obj();
368
-        return $price_type->is_discount();
369
-    }
370
-
371
-
372
-    /**
373
-     * whether the price is a percentage or not
374
-     *
375
-     * @return boolean
376
-     * @throws EE_Error
377
-     * @throws InvalidArgumentException
378
-     * @throws InvalidDataTypeException
379
-     * @throws InvalidInterfaceException
380
-     * @throws ReflectionException
381
-     */
382
-    public function is_percent()
383
-    {
384
-        $price_type = $this->type_obj();
385
-        return $price_type->is_percent();
386
-    }
387
-
388
-
389
-    /**
390
-     * whether the price is a percentage or not
391
-     *
392
-     * @return boolean
393
-     * @throws EE_Error
394
-     * @throws InvalidArgumentException
395
-     * @throws ReflectionException
396
-     * @throws InvalidDataTypeException
397
-     * @throws InvalidInterfaceException
398
-     */
399
-    public function is_surcharge()
400
-    {
401
-        $price_type = $this->type_obj();
402
-        return $price_type->is_surcharge();
403
-    }
404
-
405
-    /**
406
-     * whether the price is a percentage or not
407
-     *
408
-     * @return boolean
409
-     * @throws EE_Error
410
-     * @throws InvalidArgumentException
411
-     * @throws ReflectionException
412
-     * @throws InvalidDataTypeException
413
-     * @throws InvalidInterfaceException
414
-     */
415
-    public function is_tax()
416
-    {
417
-        $price_type = $this->type_obj();
418
-        return $price_type->is_tax();
419
-    }
420
-
421
-
422
-    /**
423
-     * return pretty price dependant on whether its a dollar or percent.
424
-     *
425
-     * @return string
426
-     * @throws EE_Error
427
-     * @throws InvalidArgumentException
428
-     * @throws ReflectionException
429
-     * @throws InvalidDataTypeException
430
-     * @throws InvalidInterfaceException
431
-     * @since 4.4.0
432
-     */
433
-    public function pretty_price()
434
-    {
435
-        return ! $this->is_percent()
436
-            ? $this->get_pretty('PRC_amount')
437
-            : $this->get('PRC_amount') . '%';
438
-    }
439
-
440
-
441
-    /**
442
-     * @return mixed
443
-     * @throws EE_Error
444
-     * @throws InvalidArgumentException
445
-     * @throws ReflectionException
446
-     * @throws InvalidDataTypeException
447
-     * @throws InvalidInterfaceException
448
-     */
449
-    public function get_price_without_currency_symbol()
450
-    {
451
-        return str_replace(
452
-            EE_Registry::instance()->CFG->currency->sign,
453
-            '',
454
-            $this->get_pretty('PRC_amount')
455
-        );
456
-    }
15
+	/**
16
+	 * @param array  $props_n_values          incoming values
17
+	 * @param string $timezone                incoming timezone (if not set the timezone set for the website will be
18
+	 *                                        used.)
19
+	 * @param array  $date_formats            incoming date_formats in an array where the first value is the
20
+	 *                                        date_format and the second value is the time format
21
+	 * @return EE_Price
22
+	 * @throws EE_Error
23
+	 * @throws InvalidArgumentException
24
+	 * @throws ReflectionException
25
+	 * @throws InvalidDataTypeException
26
+	 * @throws InvalidInterfaceException
27
+	 */
28
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
29
+	{
30
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
31
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
32
+	}
33
+
34
+
35
+	/**
36
+	 * @param array  $props_n_values  incoming values from the database
37
+	 * @param string $timezone        incoming timezone as set by the model.  If not set the timezone for
38
+	 *                                the website will be used.
39
+	 * @return EE_Price
40
+	 * @throws EE_Error
41
+	 * @throws InvalidArgumentException
42
+	 * @throws ReflectionException
43
+	 * @throws InvalidDataTypeException
44
+	 * @throws InvalidInterfaceException
45
+	 */
46
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null)
47
+	{
48
+		return new self($props_n_values, true, $timezone);
49
+	}
50
+
51
+
52
+	/**
53
+	 * Set Price type ID
54
+	 *
55
+	 * @param int $PRT_ID
56
+	 * @throws EE_Error
57
+	 * @throws InvalidArgumentException
58
+	 * @throws ReflectionException
59
+	 * @throws InvalidDataTypeException
60
+	 * @throws InvalidInterfaceException
61
+	 */
62
+	public function set_type($PRT_ID = 0)
63
+	{
64
+		$this->set('PRT_ID', $PRT_ID);
65
+	}
66
+
67
+
68
+	/**
69
+	 * Set Price Amount
70
+	 *
71
+	 * @param float $PRC_amount
72
+	 * @throws EE_Error
73
+	 * @throws InvalidArgumentException
74
+	 * @throws ReflectionException
75
+	 * @throws InvalidDataTypeException
76
+	 * @throws InvalidInterfaceException
77
+	 */
78
+	public function set_amount($PRC_amount = 0.00)
79
+	{
80
+		$this->set('PRC_amount', $PRC_amount);
81
+	}
82
+
83
+
84
+	/**
85
+	 * Set Price Name
86
+	 *
87
+	 * @param string $PRC_name
88
+	 * @throws EE_Error
89
+	 * @throws InvalidArgumentException
90
+	 * @throws ReflectionException
91
+	 * @throws InvalidDataTypeException
92
+	 * @throws InvalidInterfaceException
93
+	 */
94
+	public function set_name($PRC_name = '')
95
+	{
96
+		$this->set('PRC_name', $PRC_name);
97
+	}
98
+
99
+
100
+	/**
101
+	 * Set Price Description
102
+	 *
103
+	 * @param string $PRC_desc
104
+	 * @throws EE_Error
105
+	 * @throws InvalidArgumentException
106
+	 * @throws ReflectionException
107
+	 * @throws InvalidDataTypeException
108
+	 * @throws InvalidInterfaceException
109
+	 */
110
+	public function set_description($PRC_desc = '')
111
+	{
112
+		$this->Set('PRC_desc', $PRC_desc);
113
+	}
114
+
115
+
116
+	/**
117
+	 * set is_default
118
+	 *
119
+	 * @param bool $PRC_is_default
120
+	 * @throws EE_Error
121
+	 * @throws InvalidArgumentException
122
+	 * @throws ReflectionException
123
+	 * @throws InvalidDataTypeException
124
+	 * @throws InvalidInterfaceException
125
+	 */
126
+	public function set_is_default($PRC_is_default = false)
127
+	{
128
+		$this->set('PRC_is_default', $PRC_is_default);
129
+	}
130
+
131
+
132
+	/**
133
+	 * set deleted
134
+	 *
135
+	 * @param bool $PRC_deleted
136
+	 * @throws EE_Error
137
+	 * @throws InvalidArgumentException
138
+	 * @throws ReflectionException
139
+	 * @throws InvalidDataTypeException
140
+	 * @throws InvalidInterfaceException
141
+	 */
142
+	public function set_deleted($PRC_deleted = null)
143
+	{
144
+		$this->set('PRC_deleted', $PRC_deleted);
145
+	}
146
+
147
+
148
+	/**
149
+	 * get Price type
150
+	 *
151
+	 * @return        int
152
+	 * @throws EE_Error
153
+	 * @throws InvalidArgumentException
154
+	 * @throws ReflectionException
155
+	 * @throws InvalidDataTypeException
156
+	 * @throws InvalidInterfaceException
157
+	 */
158
+	public function type()
159
+	{
160
+		return $this->get('PRT_ID');
161
+	}
162
+
163
+
164
+	/**
165
+	 * get Price Amount
166
+	 *
167
+	 * @return        float
168
+	 * @throws EE_Error
169
+	 * @throws InvalidArgumentException
170
+	 * @throws ReflectionException
171
+	 * @throws InvalidDataTypeException
172
+	 * @throws InvalidInterfaceException
173
+	 */
174
+	public function amount()
175
+	{
176
+		return $this->get('PRC_amount');
177
+	}
178
+
179
+
180
+	/**
181
+	 * get Price Name
182
+	 *
183
+	 * @return        string
184
+	 * @throws EE_Error
185
+	 * @throws InvalidArgumentException
186
+	 * @throws ReflectionException
187
+	 * @throws InvalidDataTypeException
188
+	 * @throws InvalidInterfaceException
189
+	 */
190
+	public function name()
191
+	{
192
+		return $this->get('PRC_name');
193
+	}
194
+
195
+
196
+	/**
197
+	 * get Price description
198
+	 *
199
+	 * @return        string
200
+	 * @throws EE_Error
201
+	 * @throws InvalidArgumentException
202
+	 * @throws ReflectionException
203
+	 * @throws InvalidDataTypeException
204
+	 * @throws InvalidInterfaceException
205
+	 */
206
+	public function desc()
207
+	{
208
+		return $this->get('PRC_desc');
209
+	}
210
+
211
+
212
+	/**
213
+	 * get overrides
214
+	 *
215
+	 * @return        int
216
+	 * @throws EE_Error
217
+	 * @throws InvalidArgumentException
218
+	 * @throws ReflectionException
219
+	 * @throws InvalidDataTypeException
220
+	 * @throws InvalidInterfaceException
221
+	 */
222
+	public function overrides()
223
+	{
224
+		return $this->get('PRC_overrides');
225
+	}
226
+
227
+
228
+	/**
229
+	 * get order
230
+	 *
231
+	 * @return int
232
+	 * @throws EE_Error
233
+	 * @throws InvalidArgumentException
234
+	 * @throws ReflectionException
235
+	 * @throws InvalidDataTypeException
236
+	 * @throws InvalidInterfaceException
237
+	 */
238
+	public function order()
239
+	{
240
+		return $this->get('PRC_order');
241
+	}
242
+
243
+
244
+	/**
245
+	 * get the author of the price
246
+	 *
247
+	 * @return int
248
+	 * @throws EE_Error
249
+	 * @throws InvalidArgumentException
250
+	 * @throws ReflectionException
251
+	 * @throws InvalidDataTypeException
252
+	 * @throws InvalidInterfaceException
253
+	 * @since 4.5.0
254
+	 */
255
+	public function wp_user()
256
+	{
257
+		return $this->get('PRC_wp_user');
258
+	}
259
+
260
+
261
+	/**
262
+	 * get is_default
263
+	 *
264
+	 * @return bool
265
+	 * @throws EE_Error
266
+	 * @throws InvalidArgumentException
267
+	 * @throws ReflectionException
268
+	 * @throws InvalidDataTypeException
269
+	 * @throws InvalidInterfaceException
270
+	 */
271
+	public function is_default()
272
+	{
273
+		return $this->get('PRC_is_default');
274
+	}
275
+
276
+
277
+	/**
278
+	 * get deleted
279
+	 *
280
+	 * @return bool
281
+	 * @throws EE_Error
282
+	 * @throws InvalidArgumentException
283
+	 * @throws ReflectionException
284
+	 * @throws InvalidDataTypeException
285
+	 * @throws InvalidInterfaceException
286
+	 */
287
+	public function deleted()
288
+	{
289
+		return $this->get('PRC_deleted');
290
+	}
291
+
292
+
293
+	/**
294
+	 * @return bool
295
+	 * @throws EE_Error
296
+	 * @throws InvalidArgumentException
297
+	 * @throws ReflectionException
298
+	 * @throws InvalidDataTypeException
299
+	 * @throws InvalidInterfaceException
300
+	 */
301
+	public function parent()
302
+	{
303
+		return $this->get('PRC_parent');
304
+	}
305
+
306
+
307
+	// some helper methods for getting info on the price_type for this price
308
+
309
+
310
+	/**
311
+	 * return whether the price is a base price or not
312
+	 *
313
+	 * @return boolean
314
+	 * @throws EE_Error
315
+	 * @throws InvalidArgumentException
316
+	 * @throws InvalidDataTypeException
317
+	 * @throws InvalidInterfaceException
318
+	 * @throws ReflectionException
319
+	 */
320
+	public function is_base_price()
321
+	{
322
+		$price_type = $this->type_obj();
323
+		return $price_type->is_base_price();
324
+	}
325
+
326
+
327
+	/**
328
+	 * @return EE_Base_Class|EE_Price_Type
329
+	 * @throws EE_Error
330
+	 * @throws InvalidArgumentException
331
+	 * @throws ReflectionException
332
+	 * @throws InvalidDataTypeException
333
+	 * @throws InvalidInterfaceException
334
+	 */
335
+	public function type_obj()
336
+	{
337
+		return $this->get_first_related('Price_Type');
338
+	}
339
+
340
+
341
+	/**
342
+	 * @return int
343
+	 * @throws EE_Error
344
+	 * @throws InvalidArgumentException
345
+	 * @throws ReflectionException
346
+	 * @throws InvalidDataTypeException
347
+	 * @throws InvalidInterfaceException
348
+	 */
349
+	public function type_order()
350
+	{
351
+		return $this->get_first_related('Price_Type')->order();
352
+	}
353
+
354
+
355
+	/**
356
+	 * Simply indicates whether this price increases or decreases the total
357
+	 *
358
+	 * @return boolean true = discount, otherwise adds to the total
359
+	 * @throws EE_Error
360
+	 * @throws InvalidArgumentException
361
+	 * @throws ReflectionException
362
+	 * @throws InvalidDataTypeException
363
+	 * @throws InvalidInterfaceException
364
+	 */
365
+	public function is_discount()
366
+	{
367
+		$price_type = $this->type_obj();
368
+		return $price_type->is_discount();
369
+	}
370
+
371
+
372
+	/**
373
+	 * whether the price is a percentage or not
374
+	 *
375
+	 * @return boolean
376
+	 * @throws EE_Error
377
+	 * @throws InvalidArgumentException
378
+	 * @throws InvalidDataTypeException
379
+	 * @throws InvalidInterfaceException
380
+	 * @throws ReflectionException
381
+	 */
382
+	public function is_percent()
383
+	{
384
+		$price_type = $this->type_obj();
385
+		return $price_type->is_percent();
386
+	}
387
+
388
+
389
+	/**
390
+	 * whether the price is a percentage or not
391
+	 *
392
+	 * @return boolean
393
+	 * @throws EE_Error
394
+	 * @throws InvalidArgumentException
395
+	 * @throws ReflectionException
396
+	 * @throws InvalidDataTypeException
397
+	 * @throws InvalidInterfaceException
398
+	 */
399
+	public function is_surcharge()
400
+	{
401
+		$price_type = $this->type_obj();
402
+		return $price_type->is_surcharge();
403
+	}
404
+
405
+	/**
406
+	 * whether the price is a percentage or not
407
+	 *
408
+	 * @return boolean
409
+	 * @throws EE_Error
410
+	 * @throws InvalidArgumentException
411
+	 * @throws ReflectionException
412
+	 * @throws InvalidDataTypeException
413
+	 * @throws InvalidInterfaceException
414
+	 */
415
+	public function is_tax()
416
+	{
417
+		$price_type = $this->type_obj();
418
+		return $price_type->is_tax();
419
+	}
420
+
421
+
422
+	/**
423
+	 * return pretty price dependant on whether its a dollar or percent.
424
+	 *
425
+	 * @return string
426
+	 * @throws EE_Error
427
+	 * @throws InvalidArgumentException
428
+	 * @throws ReflectionException
429
+	 * @throws InvalidDataTypeException
430
+	 * @throws InvalidInterfaceException
431
+	 * @since 4.4.0
432
+	 */
433
+	public function pretty_price()
434
+	{
435
+		return ! $this->is_percent()
436
+			? $this->get_pretty('PRC_amount')
437
+			: $this->get('PRC_amount') . '%';
438
+	}
439
+
440
+
441
+	/**
442
+	 * @return mixed
443
+	 * @throws EE_Error
444
+	 * @throws InvalidArgumentException
445
+	 * @throws ReflectionException
446
+	 * @throws InvalidDataTypeException
447
+	 * @throws InvalidInterfaceException
448
+	 */
449
+	public function get_price_without_currency_symbol()
450
+	{
451
+		return str_replace(
452
+			EE_Registry::instance()->CFG->currency->sign,
453
+			'',
454
+			$this->get_pretty('PRC_amount')
455
+		);
456
+	}
457 457
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/enums/DatetimesConnectionOrderbyEnum.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct()
22 22
     {
23
-        $this->setName($this->namespace . 'DatetimesConnectionOrderbyEnum');
23
+        $this->setName($this->namespace.'DatetimesConnectionOrderbyEnum');
24 24
         $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25 25
         parent::__construct();
26 26
     }
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
  */
15 15
 class DatetimesConnectionOrderbyEnum extends EnumBase
16 16
 {
17
-    /**
18
-     * DatetimesConnectionOrderbyEnum constructor.
19
-     */
20
-    public function __construct()
21
-    {
22
-        $this->setName($this->namespace . 'DatetimesConnectionOrderbyEnum');
23
-        $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
24
-        parent::__construct();
25
-    }
17
+	/**
18
+	 * DatetimesConnectionOrderbyEnum constructor.
19
+	 */
20
+	public function __construct()
21
+	{
22
+		$this->setName($this->namespace . 'DatetimesConnectionOrderbyEnum');
23
+		$this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
24
+		parent::__construct();
25
+	}
26 26
 
27 27
 
28
-    /**
29
-     * @return array
30
-     */
31
-    protected function getValues(): array
32
-    {
33
-        return [
34
-            'NAME'     => [
35
-                'value'       => 'DTT_name',
36
-                'description' => esc_html__('Order by name', 'event_espresso'),
37
-            ],
38
-            'START_DATE'     => [
39
-                'value'       => 'DTT_EVT_start',
40
-                'description' => esc_html__('Order by start date', 'event_espresso'),
41
-            ],
42
-        ];
43
-    }
28
+	/**
29
+	 * @return array
30
+	 */
31
+	protected function getValues(): array
32
+	{
33
+		return [
34
+			'NAME'     => [
35
+				'value'       => 'DTT_name',
36
+				'description' => esc_html__('Order by name', 'event_espresso'),
37
+			],
38
+			'START_DATE'     => [
39
+				'value'       => 'DTT_EVT_start',
40
+				'description' => esc_html__('Order by start date', 'event_espresso'),
41
+			],
42
+		];
43
+	}
44 44
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/enums/TicketsConnectionOrderbyEnum.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct()
22 22
     {
23
-        $this->setName($this->namespace . 'TicketsConnectionOrderbyEnum');
23
+        $this->setName($this->namespace.'TicketsConnectionOrderbyEnum');
24 24
         $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25 25
         parent::__construct();
26 26
     }
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
  */
15 15
 class TicketsConnectionOrderbyEnum extends EnumBase
16 16
 {
17
-    /**
18
-     * TicketsConnectionOrderbyEnum constructor.
19
-     */
20
-    public function __construct()
21
-    {
22
-        $this->setName($this->namespace . 'TicketsConnectionOrderbyEnum');
23
-        $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
24
-        parent::__construct();
25
-    }
17
+	/**
18
+	 * TicketsConnectionOrderbyEnum constructor.
19
+	 */
20
+	public function __construct()
21
+	{
22
+		$this->setName($this->namespace . 'TicketsConnectionOrderbyEnum');
23
+		$this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
24
+		parent::__construct();
25
+	}
26 26
 
27 27
 
28
-    /**
29
-     * @return array
30
-     */
31
-    protected function getValues(): array
32
-    {
33
-        return [
34
-            'NAME'     => [
35
-                'value'       => 'TKT_name',
36
-                'description' => esc_html__('Order by name', 'event_espresso'),
37
-            ],
38
-            'START_DATE'     => [
39
-                'value'       => 'TKT_start_date',
40
-                'description' => esc_html__('Order by start date', 'event_espresso'),
41
-            ],
42
-        ];
43
-    }
28
+	/**
29
+	 * @return array
30
+	 */
31
+	protected function getValues(): array
32
+	{
33
+		return [
34
+			'NAME'     => [
35
+				'value'       => 'TKT_name',
36
+				'description' => esc_html__('Order by name', 'event_espresso'),
37
+			],
38
+			'START_DATE'     => [
39
+				'value'       => 'TKT_start_date',
40
+				'description' => esc_html__('Order by start date', 'event_espresso'),
41
+			],
42
+		];
43
+	}
44 44
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/enums/PriceBaseTypeEnum.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function __construct()
23 23
     {
24
-        $this->setName($this->namespace . 'PriceBaseTypeEnum');
24
+        $this->setName($this->namespace.'PriceBaseTypeEnum');
25 25
         $this->setDescription(esc_html__('Price Base type ID', 'event_espresso'));
26 26
         parent::__construct();
27 27
     }
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -15,35 +15,35 @@
 block discarded – undo
15 15
  */
16 16
 class PriceBaseTypeEnum extends EnumBase
17 17
 {
18
-    /**
19
-     * PriceBaseTypeEnum constructor.
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->setName($this->namespace . 'PriceBaseTypeEnum');
24
-        $this->setDescription(esc_html__('Price Base type ID', 'event_espresso'));
25
-        parent::__construct();
26
-    }
18
+	/**
19
+	 * PriceBaseTypeEnum constructor.
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->setName($this->namespace . 'PriceBaseTypeEnum');
24
+		$this->setDescription(esc_html__('Price Base type ID', 'event_espresso'));
25
+		parent::__construct();
26
+	}
27 27
 
28 28
 
29
-    /**
30
-     * @return array
31
-     */
32
-    protected function getValues(): array
33
-    {
34
-        return [
35
-            'BASE_PRICE'     => [
36
-                'value'       => EEM_Price_Type::base_type_base_price,
37
-            ],
38
-            'DISCOUNT'     => [
39
-                'value'       => EEM_Price_Type::base_type_discount,
40
-            ],
41
-            'SURCHARGE'     => [
42
-                'value'       => EEM_Price_Type::base_type_surcharge,
43
-            ],
44
-            'TAX'     => [
45
-                'value'       => EEM_Price_Type::base_type_tax,
46
-            ],
47
-        ];
48
-    }
29
+	/**
30
+	 * @return array
31
+	 */
32
+	protected function getValues(): array
33
+	{
34
+		return [
35
+			'BASE_PRICE'     => [
36
+				'value'       => EEM_Price_Type::base_type_base_price,
37
+			],
38
+			'DISCOUNT'     => [
39
+				'value'       => EEM_Price_Type::base_type_discount,
40
+			],
41
+			'SURCHARGE'     => [
42
+				'value'       => EEM_Price_Type::base_type_surcharge,
43
+			],
44
+			'TAX'     => [
45
+				'value'       => EEM_Price_Type::base_type_tax,
46
+			],
47
+		];
48
+	}
49 49
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/inputs/DatetimesConnectionOrderbyInput.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct()
26 26
     {
27
-        $this->setName($this->namespace . 'DatetimesConnectionOrderbyInput');
27
+        $this->setName($this->namespace.'DatetimesConnectionOrderbyInput');
28 28
         $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29 29
         parent::__construct();
30 30
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         return [
40 40
             new GraphQLField(
41 41
                 'field',
42
-                ['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum']
42
+                ['non_null' => $this->namespace.'DatetimesConnectionOrderbyEnum']
43 43
             ),
44 44
             new GraphQLField(
45 45
                 'order',
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,31 +16,31 @@
 block discarded – undo
16 16
  */
17 17
 class DatetimesConnectionOrderbyInput extends InputBase
18 18
 {
19
-    /**
20
-     * DatetimesConnectionOrderbyInput constructor.
21
-     */
22
-    public function __construct()
23
-    {
24
-        $this->setName($this->namespace . 'DatetimesConnectionOrderbyInput');
25
-        $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
26
-        parent::__construct();
27
-    }
19
+	/**
20
+	 * DatetimesConnectionOrderbyInput constructor.
21
+	 */
22
+	public function __construct()
23
+	{
24
+		$this->setName($this->namespace . 'DatetimesConnectionOrderbyInput');
25
+		$this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
26
+		parent::__construct();
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * @return GraphQLFieldInterface[]
32
-     */
33
-    protected function getFields(): array
34
-    {
35
-        return [
36
-            new GraphQLField(
37
-                'field',
38
-                ['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum']
39
-            ),
40
-            new GraphQLField(
41
-                'order',
42
-                'OrderEnum'
43
-            ),
44
-        ];
45
-    }
30
+	/**
31
+	 * @return GraphQLFieldInterface[]
32
+	 */
33
+	protected function getFields(): array
34
+	{
35
+		return [
36
+			new GraphQLField(
37
+				'field',
38
+				['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum']
39
+			),
40
+			new GraphQLField(
41
+				'order',
42
+				'OrderEnum'
43
+			),
44
+		];
45
+	}
46 46
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/inputs/TicketsConnectionOrderbyInput.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct()
26 26
     {
27
-        $this->setName($this->namespace . 'TicketsConnectionOrderbyInput');
27
+        $this->setName($this->namespace.'TicketsConnectionOrderbyInput');
28 28
         $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29 29
         parent::__construct();
30 30
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         return [
40 40
             new GraphQLField(
41 41
                 'field',
42
-                ['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum']
42
+                ['non_null' => $this->namespace.'TicketsConnectionOrderbyEnum']
43 43
             ),
44 44
             new GraphQLField(
45 45
                 'order',
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,31 +16,31 @@
 block discarded – undo
16 16
  */
17 17
 class TicketsConnectionOrderbyInput extends InputBase
18 18
 {
19
-    /**
20
-     * TicketsConnectionOrderbyInput constructor.
21
-     */
22
-    public function __construct()
23
-    {
24
-        $this->setName($this->namespace . 'TicketsConnectionOrderbyInput');
25
-        $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
26
-        parent::__construct();
27
-    }
19
+	/**
20
+	 * TicketsConnectionOrderbyInput constructor.
21
+	 */
22
+	public function __construct()
23
+	{
24
+		$this->setName($this->namespace . 'TicketsConnectionOrderbyInput');
25
+		$this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
26
+		parent::__construct();
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * @return GraphQLFieldInterface[]
32
-     */
33
-    protected function getFields(): array
34
-    {
35
-        return [
36
-            new GraphQLField(
37
-                'field',
38
-                ['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum']
39
-            ),
40
-            new GraphQLField(
41
-                'order',
42
-                'OrderEnum'
43
-            ),
44
-        ];
45
-    }
30
+	/**
31
+	 * @return GraphQLFieldInterface[]
32
+	 */
33
+	protected function getFields(): array
34
+	{
35
+		return [
36
+			new GraphQLField(
37
+				'field',
38
+				['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum']
39
+			),
40
+			new GraphQLField(
41
+				'order',
42
+				'OrderEnum'
43
+			),
44
+		];
45
+	}
46 46
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/connections/RootQueryPricesConnection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
     {
39 39
         return [
40 40
             'fromType'           => 'RootQuery',
41
-            'toType'             => $this->namespace . 'Price',
42
-            'fromFieldName'      => lcfirst($this->namespace) . 'Prices',
41
+            'toType'             => $this->namespace.'Price',
42
+            'fromFieldName'      => lcfirst($this->namespace).'Prices',
43 43
             'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection",
44 44
             'connectionArgs'     => TicketPricesConnection::get_connection_args(),
45 45
             'resolve'            => [$this, 'resolveConnection'],
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@
 block discarded – undo
18 18
  */
19 19
 class RootQueryPricesConnection extends AbstractRootQueryConnection
20 20
 {
21
-    /**
22
-     * PriceConnection constructor.
23
-     *
24
-     * @param EEM_Price               $model
25
-     */
26
-    public function __construct(EEM_Price $model)
27
-    {
28
-        parent::__construct($model);
29
-    }
21
+	/**
22
+	 * PriceConnection constructor.
23
+	 *
24
+	 * @param EEM_Price               $model
25
+	 */
26
+	public function __construct(EEM_Price $model)
27
+	{
28
+		parent::__construct($model);
29
+	}
30 30
 
31 31
 
32
-    /**
33
-     * @return array
34
-     */
35
-    public function config(): array
36
-    {
37
-        return [
38
-            'fromType'           => 'RootQuery',
39
-            'toType'             => $this->namespace . 'Price',
40
-            'fromFieldName'      => lcfirst($this->namespace) . 'Prices',
41
-            'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection",
42
-            'connectionArgs'     => TicketPricesConnection::get_connection_args(),
43
-            'resolve'            => [$this, 'resolveConnection'],
44
-        ];
45
-    }
32
+	/**
33
+	 * @return array
34
+	 */
35
+	public function config(): array
36
+	{
37
+		return [
38
+			'fromType'           => 'RootQuery',
39
+			'toType'             => $this->namespace . 'Price',
40
+			'fromFieldName'      => lcfirst($this->namespace) . 'Prices',
41
+			'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection",
42
+			'connectionArgs'     => TicketPricesConnection::get_connection_args(),
43
+			'resolve'            => [$this, 'resolveConnection'],
44
+		];
45
+	}
46 46
 
47 47
 
48
-    /**
49
-     * @param $entity
50
-     * @param $args
51
-     * @param $context
52
-     * @param $info
53
-     * @return PriceConnectionResolver
54
-     * @throws Exception
55
-     */
56
-    public function getConnectionResolver($entity, $args, $context, $info): AbstractConnectionResolver
57
-    {
58
-        return new PriceConnectionResolver($entity, $args, $context, $info);
59
-    }
48
+	/**
49
+	 * @param $entity
50
+	 * @param $args
51
+	 * @param $context
52
+	 * @param $info
53
+	 * @return PriceConnectionResolver
54
+	 * @throws Exception
55
+	 */
56
+	public function getConnectionResolver($entity, $args, $context, $info): AbstractConnectionResolver
57
+	{
58
+		return new PriceConnectionResolver($entity, $args, $context, $info);
59
+	}
60 60
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/connections/RootQueryDatetimesConnection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
     {
39 39
         return [
40 40
             'fromType'           => 'RootQuery',
41
-            'toType'             => $this->namespace . 'Datetime',
42
-            'fromFieldName'      => lcfirst($this->namespace . 'Datetimes'),
41
+            'toType'             => $this->namespace.'Datetime',
42
+            'fromFieldName'      => lcfirst($this->namespace.'Datetimes'),
43 43
             'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection",
44 44
             'connectionArgs'     => EventDatetimesConnection::get_connection_args(),
45 45
             'resolve'            => [$this, 'resolveConnection'],
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@
 block discarded – undo
18 18
  */
19 19
 class RootQueryDatetimesConnection extends AbstractRootQueryConnection
20 20
 {
21
-    /**
22
-     * DatetimeConnection constructor.
23
-     *
24
-     * @param EEM_Datetime               $model
25
-     */
26
-    public function __construct(EEM_Datetime $model)
27
-    {
28
-        parent::__construct($model);
29
-    }
21
+	/**
22
+	 * DatetimeConnection constructor.
23
+	 *
24
+	 * @param EEM_Datetime               $model
25
+	 */
26
+	public function __construct(EEM_Datetime $model)
27
+	{
28
+		parent::__construct($model);
29
+	}
30 30
 
31 31
 
32
-    /**
33
-     * @return array
34
-     */
35
-    public function config(): array
36
-    {
37
-        return [
38
-            'fromType'           => 'RootQuery',
39
-            'toType'             => $this->namespace . 'Datetime',
40
-            'fromFieldName'      => lcfirst($this->namespace . 'Datetimes'),
41
-            'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection",
42
-            'connectionArgs'     => EventDatetimesConnection::get_connection_args(),
43
-            'resolve'            => [$this, 'resolveConnection'],
44
-        ];
45
-    }
32
+	/**
33
+	 * @return array
34
+	 */
35
+	public function config(): array
36
+	{
37
+		return [
38
+			'fromType'           => 'RootQuery',
39
+			'toType'             => $this->namespace . 'Datetime',
40
+			'fromFieldName'      => lcfirst($this->namespace . 'Datetimes'),
41
+			'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection",
42
+			'connectionArgs'     => EventDatetimesConnection::get_connection_args(),
43
+			'resolve'            => [$this, 'resolveConnection'],
44
+		];
45
+	}
46 46
 
47 47
 
48
-    /**
49
-     * @param $entity
50
-     * @param $args
51
-     * @param $context
52
-     * @param $info
53
-     * @return DatetimeConnectionResolver
54
-     * @throws Exception
55
-     */
56
-    public function getConnectionResolver($entity, $args, $context, $info): AbstractConnectionResolver
57
-    {
58
-        return new DatetimeConnectionResolver($entity, $args, $context, $info);
59
-    }
48
+	/**
49
+	 * @param $entity
50
+	 * @param $args
51
+	 * @param $context
52
+	 * @param $info
53
+	 * @return DatetimeConnectionResolver
54
+	 * @throws Exception
55
+	 */
56
+	public function getConnectionResolver($entity, $args, $context, $info): AbstractConnectionResolver
57
+	{
58
+		return new DatetimeConnectionResolver($entity, $args, $context, $info);
59
+	}
60 60
 }
Please login to merge, or discard this patch.