Completed
Branch dependabot/composer/wp-graphql... (64393b)
by
unknown
04:29
created
core/db_models/fields/EE_Field_With_Model_Name.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,10 +79,10 @@
 block discarded – undo
79 79
         $model_names = [];
80 80
         if (is_array($this->_model_name_pointed_to)) {
81 81
             foreach ($this->_model_name_pointed_to as $model_name) {
82
-                $model_names[] = "EE_" . $model_name;
82
+                $model_names[] = "EE_".$model_name;
83 83
             }
84 84
         } else {
85
-            $model_names = ["EE_" . $this->_model_name_pointed_to];
85
+            $model_names = ["EE_".$this->_model_name_pointed_to];
86 86
         }
87 87
         return $model_names;
88 88
     }
Please login to merge, or discard this patch.
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -8,94 +8,94 @@
 block discarded – undo
8 8
  */
9 9
 abstract class EE_Field_With_Model_Name extends EE_Model_Field_Base
10 10
 {
11
-    /**
12
-     * Usually the name of a single model. However, as in the case for custom post types,
13
-     * it can actually be an array of models
14
-     *
15
-     * @var string[]
16
-     */
17
-    protected $_model_name_pointed_to;
11
+	/**
12
+	 * Usually the name of a single model. However, as in the case for custom post types,
13
+	 * it can actually be an array of models
14
+	 *
15
+	 * @var string[]
16
+	 */
17
+	protected $_model_name_pointed_to;
18 18
 
19 19
 
20
-    /**
21
-     * @param string          $table_column  name of column for field
22
-     * @param string          $nicename      should be internationalized with __('blah','event_espresso')
23
-     * @param boolean         $nullable
24
-     * @param int|string      $default_value data type should match field type
25
-     * @param string|string[] $model_name    eg 'Event','Answer','Term', etc.
26
-     *                                       Basically its the model class's name without the "EEM_"
27
-     */
28
-    public function __construct($table_column, $nicename, $nullable, $default_value, $model_name)
29
-    {
30
-        $this->_model_name_pointed_to = (array) $model_name;
31
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
32
-    }
20
+	/**
21
+	 * @param string          $table_column  name of column for field
22
+	 * @param string          $nicename      should be internationalized with __('blah','event_espresso')
23
+	 * @param boolean         $nullable
24
+	 * @param int|string      $default_value data type should match field type
25
+	 * @param string|string[] $model_name    eg 'Event','Answer','Term', etc.
26
+	 *                                       Basically its the model class's name without the "EEM_"
27
+	 */
28
+	public function __construct($table_column, $nicename, $nullable, $default_value, $model_name)
29
+	{
30
+		$this->_model_name_pointed_to = (array) $model_name;
31
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * Returns the name of the model(s) pointed to
37
-     *
38
-     * @return string[] string or array of strings
39
-     * @deprecated since version 4.6.7
40
-     */
41
-    public function get_model_name_pointed_to(): array
42
-    {
43
-        EE_Error::doing_it_wrong(
44
-            'get_model_name_pointed_to',
45
-            esc_html__(
46
-                'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array',
47
-                'event_espresso'
48
-            ),
49
-            '4.6.7'
50
-        );
51
-        return $this->_model_name_pointed_to;
52
-    }
35
+	/**
36
+	 * Returns the name of the model(s) pointed to
37
+	 *
38
+	 * @return string[] string or array of strings
39
+	 * @deprecated since version 4.6.7
40
+	 */
41
+	public function get_model_name_pointed_to(): array
42
+	{
43
+		EE_Error::doing_it_wrong(
44
+			'get_model_name_pointed_to',
45
+			esc_html__(
46
+				'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array',
47
+				'event_espresso'
48
+			),
49
+			'4.6.7'
50
+		);
51
+		return $this->_model_name_pointed_to;
52
+	}
53 53
 
54 54
 
55
-    /**
56
-     * Gets the model names pointed to by this field, always as an array
57
-     * (even if there's only one)
58
-     *
59
-     * @return string[] of model names pointed to by this field
60
-     */
61
-    public function get_model_names_pointed_to(): array
62
-    {
63
-        return is_array($this->_model_name_pointed_to)
64
-            ? $this->_model_name_pointed_to
65
-            : [$this->_model_name_pointed_to];
66
-    }
55
+	/**
56
+	 * Gets the model names pointed to by this field, always as an array
57
+	 * (even if there's only one)
58
+	 *
59
+	 * @return string[] of model names pointed to by this field
60
+	 */
61
+	public function get_model_names_pointed_to(): array
62
+	{
63
+		return is_array($this->_model_name_pointed_to)
64
+			? $this->_model_name_pointed_to
65
+			: [$this->_model_name_pointed_to];
66
+	}
67 67
 
68 68
 
69
-    /**
70
-     * Returns the model's classname (eg EE_Event instead of just Event)
71
-     *
72
-     * @return string[]
73
-     */
74
-    public function get_model_class_names_pointed_to(): array
75
-    {
76
-        $model_names = [];
77
-        if (is_array($this->_model_name_pointed_to)) {
78
-            foreach ($this->_model_name_pointed_to as $model_name) {
79
-                $model_names[] = "EE_" . $model_name;
80
-            }
81
-        } else {
82
-            $model_names = ["EE_" . $this->_model_name_pointed_to];
83
-        }
84
-        return $model_names;
85
-    }
69
+	/**
70
+	 * Returns the model's classname (eg EE_Event instead of just Event)
71
+	 *
72
+	 * @return string[]
73
+	 */
74
+	public function get_model_class_names_pointed_to(): array
75
+	{
76
+		$model_names = [];
77
+		if (is_array($this->_model_name_pointed_to)) {
78
+			foreach ($this->_model_name_pointed_to as $model_name) {
79
+				$model_names[] = "EE_" . $model_name;
80
+			}
81
+		} else {
82
+			$model_names = ["EE_" . $this->_model_name_pointed_to];
83
+		}
84
+		return $model_names;
85
+	}
86 86
 
87 87
 
88
-    /**
89
-     * @param int|EE_Base_Class $model_obj
90
-     * @return bool
91
-     */
92
-    public function is_model_obj_of_type_pointed_to($model_obj): bool
93
-    {
94
-        foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) {
95
-            if ($model_obj instanceof $model_obj_classname) {
96
-                return true;
97
-            }
98
-        }
99
-        return false;
100
-    }
88
+	/**
89
+	 * @param int|EE_Base_Class $model_obj
90
+	 * @return bool
91
+	 */
92
+	public function is_model_obj_of_type_pointed_to($model_obj): bool
93
+	{
94
+		foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) {
95
+			if ($model_obj instanceof $model_obj_classname) {
96
+				return true;
97
+			}
98
+		}
99
+		return false;
100
+	}
101 101
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_WP_Post_Type_Field.php.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
  */
6 6
 class EE_WP_Post_Type_Field extends EE_DB_Only_Text_Field
7 7
 {
8
-    /**
9
-     * @param string $post_type the exact string to be used for the post type
10
-     *                          of all these post type model objects/rows
11
-     */
12
-    public function __construct($post_type)
13
-    {
14
-        parent::__construct('post_type', esc_html__("Post Type", 'event_espresso'), false, $post_type);
15
-    }
8
+	/**
9
+	 * @param string $post_type the exact string to be used for the post type
10
+	 *                          of all these post type model objects/rows
11
+	 */
12
+	public function __construct($post_type)
13
+	{
14
+		parent::__construct('post_type', esc_html__("Post Type", 'event_espresso'), false, $post_type);
15
+	}
16 16
 }
Please login to merge, or discard this patch.
core/db_models/EEM_Checkin.model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
                 ),
71 71
             ],
72 72
         ];
73
-        $this->_model_relations        = [
73
+        $this->_model_relations = [
74 74
             'Registration' => new EE_Belongs_To_Relation(),
75 75
             'Datetime'     => new EE_Belongs_To_Relation(),
76 76
         ];
Please login to merge, or discard this patch.
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -10,67 +10,67 @@
 block discarded – undo
10 10
  */
11 11
 class EEM_Checkin extends EEM_Base
12 12
 {
13
-    protected static ?EEM_Checkin $_instance = null;
13
+	protected static ?EEM_Checkin $_instance = null;
14 14
 
15 15
 
16
-    /**
17
-     * private constructor to prevent direct creation
18
-     *
19
-     * @param string|null $timezone string representing the timezone we want to set for returned Date Time Strings
20
-     *                              (and any incoming timezone data that gets saved).
21
-     *                              Note this just sends the timezone info to the date time model field objects.
22
-     *                              Default is NULL
23
-     *                              (and will be assumed using the set timezone in the 'timezone_string' wp option)
24
-     * @throws EE_Error
25
-     */
26
-    protected function __construct(?string $timezone = '')
27
-    {
28
-        $this->singular_item = esc_html__('Check-In', 'event_espresso');
29
-        $this->plural_item   = esc_html__('Check-Ins', 'event_espresso');
16
+	/**
17
+	 * private constructor to prevent direct creation
18
+	 *
19
+	 * @param string|null $timezone string representing the timezone we want to set for returned Date Time Strings
20
+	 *                              (and any incoming timezone data that gets saved).
21
+	 *                              Note this just sends the timezone info to the date time model field objects.
22
+	 *                              Default is NULL
23
+	 *                              (and will be assumed using the set timezone in the 'timezone_string' wp option)
24
+	 * @throws EE_Error
25
+	 */
26
+	protected function __construct(?string $timezone = '')
27
+	{
28
+		$this->singular_item = esc_html__('Check-In', 'event_espresso');
29
+		$this->plural_item   = esc_html__('Check-Ins', 'event_espresso');
30 30
 
31
-        $this->_tables                 = [
32
-            'Checkin' => new EE_Primary_Table('esp_checkin', 'CHK_ID'),
33
-        ];
34
-        $this->_fields                 = [
35
-            'Checkin' => [
36
-                'CHK_ID'        => new EE_Primary_Key_Int_Field(
37
-                    'CHK_ID',
38
-                    esc_html__('Check-in ID', 'event_espresso')
39
-                ),
40
-                'REG_ID'        => new EE_Foreign_Key_Int_Field(
41
-                    'REG_ID',
42
-                    esc_html__('Registration Id', 'event_espresso'),
43
-                    false,
44
-                    0,
45
-                    'Registration'
46
-                ),
47
-                'DTT_ID'        => new EE_Foreign_Key_Int_Field(
48
-                    'DTT_ID',
49
-                    esc_html__('Datetime Id', 'event_espresso'),
50
-                    false,
51
-                    0,
52
-                    'Datetime'
53
-                ),
54
-                'CHK_in'        => new EE_Boolean_Field(
55
-                    'CHK_in',
56
-                    esc_html__('Whether a person has checked in or checked out', 'event_espresso'),
57
-                    false,
58
-                    true
59
-                ),
60
-                'CHK_timestamp' => new EE_Datetime_Field(
61
-                    'CHK_timestamp',
62
-                    esc_html__('When the row was modified', 'event_espresso'),
63
-                    false,
64
-                    EE_Datetime_Field::now,
65
-                    $timezone
66
-                ),
67
-            ],
68
-        ];
69
-        $this->_model_relations        = [
70
-            'Registration' => new EE_Belongs_To_Relation(),
71
-            'Datetime'     => new EE_Belongs_To_Relation(),
72
-        ];
73
-        $this->_model_chain_to_wp_user = 'Registration.Event';
74
-        parent::__construct($timezone);
75
-    }
31
+		$this->_tables                 = [
32
+			'Checkin' => new EE_Primary_Table('esp_checkin', 'CHK_ID'),
33
+		];
34
+		$this->_fields                 = [
35
+			'Checkin' => [
36
+				'CHK_ID'        => new EE_Primary_Key_Int_Field(
37
+					'CHK_ID',
38
+					esc_html__('Check-in ID', 'event_espresso')
39
+				),
40
+				'REG_ID'        => new EE_Foreign_Key_Int_Field(
41
+					'REG_ID',
42
+					esc_html__('Registration Id', 'event_espresso'),
43
+					false,
44
+					0,
45
+					'Registration'
46
+				),
47
+				'DTT_ID'        => new EE_Foreign_Key_Int_Field(
48
+					'DTT_ID',
49
+					esc_html__('Datetime Id', 'event_espresso'),
50
+					false,
51
+					0,
52
+					'Datetime'
53
+				),
54
+				'CHK_in'        => new EE_Boolean_Field(
55
+					'CHK_in',
56
+					esc_html__('Whether a person has checked in or checked out', 'event_espresso'),
57
+					false,
58
+					true
59
+				),
60
+				'CHK_timestamp' => new EE_Datetime_Field(
61
+					'CHK_timestamp',
62
+					esc_html__('When the row was modified', 'event_espresso'),
63
+					false,
64
+					EE_Datetime_Field::now,
65
+					$timezone
66
+				),
67
+			],
68
+		];
69
+		$this->_model_relations        = [
70
+			'Registration' => new EE_Belongs_To_Relation(),
71
+			'Datetime'     => new EE_Belongs_To_Relation(),
72
+		];
73
+		$this->_model_chain_to_wp_user = 'Registration.Event';
74
+		parent::__construct($timezone);
75
+	}
76 76
 }
Please login to merge, or discard this patch.
core/db_models/EEM_Currency_Payment_Method.model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             'Payment_Method' => new EE_Belongs_To_Relation(),
56 56
         ];
57 57
         // this model is generally available for reading
58
-        $this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
58
+        $this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
59 59
         $this->_caps_slug                                         = 'payment_methods';
60 60
         parent::__construct($timezone);
61 61
     }
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -9,49 +9,49 @@
 block discarded – undo
9 9
  */
10 10
 class EEM_Currency_Payment_Method extends EEM_Base
11 11
 {
12
-    protected static ?EEM_Currency_Payment_Method $_instance = null;
12
+	protected static ?EEM_Currency_Payment_Method $_instance = null;
13 13
 
14 14
 
15
-    /**
16
-     * @param string|null $timezone
17
-     * @throws EE_Error
18
-     */
19
-    protected function __construct(?string $timezone = '')
20
-    {
21
-        $this->singular_item    = esc_html__('Currency Usable by Payment Method', 'event_espresso');
22
-        $this->plural_item      = esc_html__('Currencies Usable by Payment Methods', 'event_espresso');
23
-        $this->_tables          = [
24
-            'Currency_Payment_Method' => new EE_Primary_Table('esp_currency_payment_method', 'CPM_ID'),
25
-        ];
26
-        $this->_fields          = [
27
-            'Currency_Payment_Method' => [
28
-                'CPM_ID'   => new EE_Primary_Key_Int_Field(
29
-                    'CPM_ID',
30
-                    esc_html__('Currency to Payment Method LInk ID', 'event_espresso')
31
-                ),
32
-                'CUR_code' => new EE_Foreign_Key_String_Field(
33
-                    'CUR_code',
34
-                    esc_html__('Currency Code', 'event_espresso'),
35
-                    false,
36
-                    '',
37
-                    'Currency'
38
-                ),
39
-                'PMD_ID'   => new EE_Foreign_Key_Int_Field(
40
-                    'PMD_ID',
41
-                    esc_html__('Paymetn Method ID', 'event_espresso'),
42
-                    false,
43
-                    0,
44
-                    'Payment_Method'
45
-                ),
46
-            ],
47
-        ];
48
-        $this->_model_relations = [
49
-            'Currency'       => new EE_Belongs_To_Relation(),
50
-            'Payment_Method' => new EE_Belongs_To_Relation(),
51
-        ];
52
-        // this model is generally available for reading
53
-        $this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
54
-        $this->_caps_slug                                         = 'payment_methods';
55
-        parent::__construct($timezone);
56
-    }
15
+	/**
16
+	 * @param string|null $timezone
17
+	 * @throws EE_Error
18
+	 */
19
+	protected function __construct(?string $timezone = '')
20
+	{
21
+		$this->singular_item    = esc_html__('Currency Usable by Payment Method', 'event_espresso');
22
+		$this->plural_item      = esc_html__('Currencies Usable by Payment Methods', 'event_espresso');
23
+		$this->_tables          = [
24
+			'Currency_Payment_Method' => new EE_Primary_Table('esp_currency_payment_method', 'CPM_ID'),
25
+		];
26
+		$this->_fields          = [
27
+			'Currency_Payment_Method' => [
28
+				'CPM_ID'   => new EE_Primary_Key_Int_Field(
29
+					'CPM_ID',
30
+					esc_html__('Currency to Payment Method LInk ID', 'event_espresso')
31
+				),
32
+				'CUR_code' => new EE_Foreign_Key_String_Field(
33
+					'CUR_code',
34
+					esc_html__('Currency Code', 'event_espresso'),
35
+					false,
36
+					'',
37
+					'Currency'
38
+				),
39
+				'PMD_ID'   => new EE_Foreign_Key_Int_Field(
40
+					'PMD_ID',
41
+					esc_html__('Paymetn Method ID', 'event_espresso'),
42
+					false,
43
+					0,
44
+					'Payment_Method'
45
+				),
46
+			],
47
+		];
48
+		$this->_model_relations = [
49
+			'Currency'       => new EE_Belongs_To_Relation(),
50
+			'Payment_Method' => new EE_Belongs_To_Relation(),
51
+		];
52
+		// this model is generally available for reading
53
+		$this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
54
+		$this->_caps_slug                                         = 'payment_methods';
55
+		parent::__construct($timezone);
56
+	}
57 57
 }
Please login to merge, or discard this patch.
core/services/form/meta/inputs/Button.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -4,49 +4,49 @@
 block discarded – undo
4 4
 
5 5
 class Button
6 6
 {
7
-    /**
8
-     * indicates that the HTML input type is 'button'
9
-     */
10
-    public const TYPE_BUTTON = 'button';
11
-
12
-    /**
13
-     * indicates that the HTML input type is 'reset'
14
-     */
15
-    public const TYPE_BUTTON_RESET = 'reset';
16
-
17
-    /**
18
-     * indicates that the HTML input type is 'submit'
19
-     */
20
-    public const TYPE_BUTTON_SUBMIT = 'submit';
21
-
22
-
23
-    /**
24
-     * @var array
25
-     */
26
-    private $valid_type_options;
27
-
28
-
29
-    public function __construct()
30
-    {
31
-        $this->valid_type_options = apply_filters(
32
-            'FHEE__EventEspresso_core_services_form_meta_inputs_Button__valid_type_options',
33
-            [
34
-                Button::TYPE_BUTTON        => esc_html__('Button', 'event_espresso'),
35
-                Button::TYPE_BUTTON_RESET  => esc_html__('Reset Button', 'event_espresso'),
36
-                Button::TYPE_BUTTON_SUBMIT => esc_html__('Submit Button', 'event_espresso'),
37
-            ]
38
-        );
39
-    }
40
-
41
-
42
-    /**
43
-     * @param bool $constants_only
44
-     * @return array
45
-     */
46
-    public function validTypeOptions(bool $constants_only = false): array
47
-    {
48
-        return $constants_only
49
-            ? array_keys($this->valid_type_options)
50
-            : $this->valid_type_options;
51
-    }
7
+	/**
8
+	 * indicates that the HTML input type is 'button'
9
+	 */
10
+	public const TYPE_BUTTON = 'button';
11
+
12
+	/**
13
+	 * indicates that the HTML input type is 'reset'
14
+	 */
15
+	public const TYPE_BUTTON_RESET = 'reset';
16
+
17
+	/**
18
+	 * indicates that the HTML input type is 'submit'
19
+	 */
20
+	public const TYPE_BUTTON_SUBMIT = 'submit';
21
+
22
+
23
+	/**
24
+	 * @var array
25
+	 */
26
+	private $valid_type_options;
27
+
28
+
29
+	public function __construct()
30
+	{
31
+		$this->valid_type_options = apply_filters(
32
+			'FHEE__EventEspresso_core_services_form_meta_inputs_Button__valid_type_options',
33
+			[
34
+				Button::TYPE_BUTTON        => esc_html__('Button', 'event_espresso'),
35
+				Button::TYPE_BUTTON_RESET  => esc_html__('Reset Button', 'event_espresso'),
36
+				Button::TYPE_BUTTON_SUBMIT => esc_html__('Submit Button', 'event_espresso'),
37
+			]
38
+		);
39
+	}
40
+
41
+
42
+	/**
43
+	 * @param bool $constants_only
44
+	 * @return array
45
+	 */
46
+	public function validTypeOptions(bool $constants_only = false): array
47
+	{
48
+		return $constants_only
49
+			? array_keys($this->valid_type_options)
50
+			: $this->valid_type_options;
51
+	}
52 52
 }
Please login to merge, or discard this patch.
core/services/form/meta/inputs/DateTime.php 1 patch
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -5,81 +5,81 @@
 block discarded – undo
5 5
 class DateTime
6 6
 {
7 7
 
8
-    /**
9
-     * indicates that the HTML input type is 'date'
10
-     */
11
-    public const TYPE_DATE = 'date';
12
-
13
-    /**
14
-     * indicates that the HTML input type is 'datetime-local'
15
-     */
16
-    public const TYPE_DATETIME_LOCAL = 'datetime-local';
17
-
18
-    /**
19
-     * indicates that the HTML input type is 'month'
20
-     */
21
-    public const TYPE_MONTH = 'month';
22
-
23
-    /**
24
-     * indicates that the HTML input type is 'time'
25
-     */
26
-    public const TYPE_TIME = 'time';
27
-
28
-    /**
29
-     * indicates that the HTML input type is 'week'
30
-     */
31
-    public const TYPE_WEEK = 'week';
32
-
33
-    // CUSTOM EE DATE TYPES
34
-
35
-    /**
36
-     * indicates that the input is an HTML dropdown used for selecting the day for a date
37
-     */
38
-    public const TYPE_SELECT_DAY = 'day-select';
39
-
40
-    /**
41
-     * indicates that the input is an HTML dropdown used for selecting the month for a date
42
-     */
43
-    public const TYPE_SELECT_MONTH = 'month-select';
44
-
45
-    /**
46
-     * indicates that the input is an HTML dropdown used for selecting the year for a date
47
-     */
48
-    public const TYPE_SELECT_YEAR = 'year-select';
49
-
50
-
51
-    /**
52
-     * @var array
53
-     */
54
-    private $valid_type_options;
55
-
56
-
57
-    public function __construct()
58
-    {
59
-        $this->valid_type_options = apply_filters(
60
-            'FHEE__EventEspresso_core_services_form_meta_inputs_DateTime__valid_type_options',
61
-            [
62
-                DateTime::TYPE_DATE           => esc_html__('Date Picker', 'event_espresso'),
63
-                DateTime::TYPE_DATETIME_LOCAL => esc_html__('Local Date Picker', 'event_espresso'),
64
-                DateTime::TYPE_MONTH          => esc_html__('Month Picker', 'event_espresso'),
65
-                DateTime::TYPE_TIME           => esc_html__('Time Picker', 'event_espresso'),
66
-                DateTime::TYPE_WEEK           => esc_html__('Week Picker', 'event_espresso'),
67
-                DateTime::TYPE_SELECT_DAY     => esc_html__('Day Selector', 'event_espresso'),
68
-                DateTime::TYPE_SELECT_MONTH   => esc_html__('Month Selector', 'event_espresso'),
69
-                DateTime::TYPE_SELECT_YEAR    => esc_html__('Year Selector', 'event_espresso'),
70
-            ]
71
-        );
72
-    }
73
-
74
-
75
-    /**
76
-     * @param bool $constants_only
77
-     * @return array
78
-     */
79
-    public function validTypeOptions(bool $constants_only = false): array
80
-    {
81
-        return $constants_only
82
-            ? array_keys($this->valid_type_options)
83
-            : $this->valid_type_options;
84
-    }
8
+	/**
9
+	 * indicates that the HTML input type is 'date'
10
+	 */
11
+	public const TYPE_DATE = 'date';
12
+
13
+	/**
14
+	 * indicates that the HTML input type is 'datetime-local'
15
+	 */
16
+	public const TYPE_DATETIME_LOCAL = 'datetime-local';
17
+
18
+	/**
19
+	 * indicates that the HTML input type is 'month'
20
+	 */
21
+	public const TYPE_MONTH = 'month';
22
+
23
+	/**
24
+	 * indicates that the HTML input type is 'time'
25
+	 */
26
+	public const TYPE_TIME = 'time';
27
+
28
+	/**
29
+	 * indicates that the HTML input type is 'week'
30
+	 */
31
+	public const TYPE_WEEK = 'week';
32
+
33
+	// CUSTOM EE DATE TYPES
34
+
35
+	/**
36
+	 * indicates that the input is an HTML dropdown used for selecting the day for a date
37
+	 */
38
+	public const TYPE_SELECT_DAY = 'day-select';
39
+
40
+	/**
41
+	 * indicates that the input is an HTML dropdown used for selecting the month for a date
42
+	 */
43
+	public const TYPE_SELECT_MONTH = 'month-select';
44
+
45
+	/**
46
+	 * indicates that the input is an HTML dropdown used for selecting the year for a date
47
+	 */
48
+	public const TYPE_SELECT_YEAR = 'year-select';
49
+
50
+
51
+	/**
52
+	 * @var array
53
+	 */
54
+	private $valid_type_options;
55
+
56
+
57
+	public function __construct()
58
+	{
59
+		$this->valid_type_options = apply_filters(
60
+			'FHEE__EventEspresso_core_services_form_meta_inputs_DateTime__valid_type_options',
61
+			[
62
+				DateTime::TYPE_DATE           => esc_html__('Date Picker', 'event_espresso'),
63
+				DateTime::TYPE_DATETIME_LOCAL => esc_html__('Local Date Picker', 'event_espresso'),
64
+				DateTime::TYPE_MONTH          => esc_html__('Month Picker', 'event_espresso'),
65
+				DateTime::TYPE_TIME           => esc_html__('Time Picker', 'event_espresso'),
66
+				DateTime::TYPE_WEEK           => esc_html__('Week Picker', 'event_espresso'),
67
+				DateTime::TYPE_SELECT_DAY     => esc_html__('Day Selector', 'event_espresso'),
68
+				DateTime::TYPE_SELECT_MONTH   => esc_html__('Month Selector', 'event_espresso'),
69
+				DateTime::TYPE_SELECT_YEAR    => esc_html__('Year Selector', 'event_espresso'),
70
+			]
71
+		);
72
+	}
73
+
74
+
75
+	/**
76
+	 * @param bool $constants_only
77
+	 * @return array
78
+	 */
79
+	public function validTypeOptions(bool $constants_only = false): array
80
+	{
81
+		return $constants_only
82
+			? array_keys($this->valid_type_options)
83
+			: $this->valid_type_options;
84
+	}
85 85
 }
Please login to merge, or discard this patch.
core/services/form/meta/inputs/Number.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -5,49 +5,49 @@
 block discarded – undo
5 5
 class Number
6 6
 {
7 7
 
8
-    /**
9
-     * indicates that the HTML input type is 'number' whose value is a decimal (float)
10
-     */
11
-    public const TYPE_FLOAT = 'decimal';
12
-
13
-    /**
14
-     * indicates that the HTML input type is 'number' whose value is an integer (whole number)
15
-     */
16
-    public const TYPE_INT = 'integer';
17
-
18
-    /**
19
-     * indicates that the HTML input type is 'range'
20
-     */
21
-    public const TYPE_RANGE = 'range';
22
-
23
-
24
-    /**
25
-     * @var array
26
-     */
27
-    private $valid_type_options;
28
-
29
-
30
-    public function __construct()
31
-    {
32
-        $this->valid_type_options = apply_filters(
33
-            'FHEE__EventEspresso_core_services_form_meta_inputs_Number__valid_type_options',
34
-            [
35
-                Number::TYPE_FLOAT => esc_html__('Decimal Number', 'event_espresso'),
36
-                Number::TYPE_INT   => esc_html__('Integer (Whole) Number', 'event_espresso'),
37
-                Number::TYPE_RANGE => esc_html__('Number Range', 'event_espresso'),
38
-            ]
39
-        );
40
-    }
41
-
42
-
43
-    /**
44
-     * @param bool $constants_only
45
-     * @return array
46
-     */
47
-    public function validTypeOptions(bool $constants_only = false): array
48
-    {
49
-        return $constants_only
50
-            ? array_keys($this->valid_type_options)
51
-            : $this->valid_type_options;
52
-    }
8
+	/**
9
+	 * indicates that the HTML input type is 'number' whose value is a decimal (float)
10
+	 */
11
+	public const TYPE_FLOAT = 'decimal';
12
+
13
+	/**
14
+	 * indicates that the HTML input type is 'number' whose value is an integer (whole number)
15
+	 */
16
+	public const TYPE_INT = 'integer';
17
+
18
+	/**
19
+	 * indicates that the HTML input type is 'range'
20
+	 */
21
+	public const TYPE_RANGE = 'range';
22
+
23
+
24
+	/**
25
+	 * @var array
26
+	 */
27
+	private $valid_type_options;
28
+
29
+
30
+	public function __construct()
31
+	{
32
+		$this->valid_type_options = apply_filters(
33
+			'FHEE__EventEspresso_core_services_form_meta_inputs_Number__valid_type_options',
34
+			[
35
+				Number::TYPE_FLOAT => esc_html__('Decimal Number', 'event_espresso'),
36
+				Number::TYPE_INT   => esc_html__('Integer (Whole) Number', 'event_espresso'),
37
+				Number::TYPE_RANGE => esc_html__('Number Range', 'event_espresso'),
38
+			]
39
+		);
40
+	}
41
+
42
+
43
+	/**
44
+	 * @param bool $constants_only
45
+	 * @return array
46
+	 */
47
+	public function validTypeOptions(bool $constants_only = false): array
48
+	{
49
+		return $constants_only
50
+			? array_keys($this->valid_type_options)
51
+			: $this->valid_type_options;
52
+	}
53 53
 }
Please login to merge, or discard this patch.
core/services/form/meta/inputs/Select.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -5,59 +5,59 @@
 block discarded – undo
5 5
 class Select
6 6
 {
7 7
 
8
-    /**
9
-     * indicates that the input is an HTML dropdown (select input) that accepts only one value
10
-     */
11
-    public const TYPE_SELECT = 'select';
12
-
13
-    /**
14
-     * indicates that the input is an HTML dropdown (select input) that accepts multiple values
15
-     */
16
-    public const TYPE_SELECT_MULTI = 'select-multi';
17
-
18
-    // CUSTOM EE SELECT TYPES
19
-
20
-    /**
21
-     * indicates that input is an HTML dropdown (select input)
22
-     * populated with names of countries that are enabled for the site
23
-     */
24
-    public const TYPE_SELECT_COUNTRY = 'select-country';
25
-
26
-    /**
27
-     * indicates that the input is an HTML dropdown (select input)
28
-     * populated with names of states for the countries that are enabled for the site
29
-     */
30
-    public const TYPE_SELECT_STATE = 'select-state';
31
-
32
-
33
-    /**
34
-     * @var array
35
-     */
36
-    private $valid_type_options;
37
-
38
-
39
-    public function __construct()
40
-    {
41
-        $this->valid_type_options = apply_filters(
42
-            'FHEE__EventEspresso_core_services_form_meta_inputs_Select__valid_type_options',
43
-            [
44
-                Select::TYPE_SELECT         => esc_html__('Dropdown', 'event_espresso'),
45
-                Select::TYPE_SELECT_MULTI   => esc_html__('Multi-Select Dropdown', 'event_espresso'),
46
-                Select::TYPE_SELECT_COUNTRY => esc_html__('Country Selector', 'event_espresso'),
47
-                Select::TYPE_SELECT_STATE   => esc_html__('State Selector', 'event_espresso'),
48
-            ]
49
-        );
50
-    }
51
-
52
-
53
-    /**
54
-     * @param bool $constants_only
55
-     * @return array
56
-     */
57
-    public function validTypeOptions(bool $constants_only = false): array
58
-    {
59
-        return $constants_only
60
-            ? array_keys($this->valid_type_options)
61
-            : $this->valid_type_options;
62
-    }
8
+	/**
9
+	 * indicates that the input is an HTML dropdown (select input) that accepts only one value
10
+	 */
11
+	public const TYPE_SELECT = 'select';
12
+
13
+	/**
14
+	 * indicates that the input is an HTML dropdown (select input) that accepts multiple values
15
+	 */
16
+	public const TYPE_SELECT_MULTI = 'select-multi';
17
+
18
+	// CUSTOM EE SELECT TYPES
19
+
20
+	/**
21
+	 * indicates that input is an HTML dropdown (select input)
22
+	 * populated with names of countries that are enabled for the site
23
+	 */
24
+	public const TYPE_SELECT_COUNTRY = 'select-country';
25
+
26
+	/**
27
+	 * indicates that the input is an HTML dropdown (select input)
28
+	 * populated with names of states for the countries that are enabled for the site
29
+	 */
30
+	public const TYPE_SELECT_STATE = 'select-state';
31
+
32
+
33
+	/**
34
+	 * @var array
35
+	 */
36
+	private $valid_type_options;
37
+
38
+
39
+	public function __construct()
40
+	{
41
+		$this->valid_type_options = apply_filters(
42
+			'FHEE__EventEspresso_core_services_form_meta_inputs_Select__valid_type_options',
43
+			[
44
+				Select::TYPE_SELECT         => esc_html__('Dropdown', 'event_espresso'),
45
+				Select::TYPE_SELECT_MULTI   => esc_html__('Multi-Select Dropdown', 'event_espresso'),
46
+				Select::TYPE_SELECT_COUNTRY => esc_html__('Country Selector', 'event_espresso'),
47
+				Select::TYPE_SELECT_STATE   => esc_html__('State Selector', 'event_espresso'),
48
+			]
49
+		);
50
+	}
51
+
52
+
53
+	/**
54
+	 * @param bool $constants_only
55
+	 * @return array
56
+	 */
57
+	public function validTypeOptions(bool $constants_only = false): array
58
+	{
59
+		return $constants_only
60
+			? array_keys($this->valid_type_options)
61
+			: $this->valid_type_options;
62
+	}
63 63
 }
Please login to merge, or discard this patch.
core/services/form/meta/inputs/Phone.php 2 patches
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -5,109 +5,109 @@
 block discarded – undo
5 5
 class Phone
6 6
 {
7 7
 
8
-    /**
9
-     * indicates that the HTML input type is 'tel'
10
-     */
11
-    public const INPUT_TYPE = 'tel';
8
+	/**
9
+	 * indicates that the HTML input type is 'tel'
10
+	 */
11
+	public const INPUT_TYPE = 'tel';
12 12
 
13
-    /**
14
-     * indicates that the 'tel' input regex pattern is for a US formatted phone number, examples:
15
-     *      ##########
16
-     *      ###-###-####
17
-     *      ### ### ####
18
-     *      (###)-###-####
19
-     *      (###) ###-####
20
-     *
21
-     * captures the intl code to the first group (+1) and the rest of the number to group 2
22
-     *      +1 (###) ###-####
23
-     */
24
-    public const PATTERN_US = '(\+?\d{1,3})?[\ \-]?(\(?\d{3}\)?[\ \-]?\d{3}[\ \-]?\d{4})';
13
+	/**
14
+	 * indicates that the 'tel' input regex pattern is for a US formatted phone number, examples:
15
+	 *      ##########
16
+	 *      ###-###-####
17
+	 *      ### ### ####
18
+	 *      (###)-###-####
19
+	 *      (###) ###-####
20
+	 *
21
+	 * captures the intl code to the first group (+1) and the rest of the number to group 2
22
+	 *      +1 (###) ###-####
23
+	 */
24
+	public const PATTERN_US = '(\+?\d{1,3})?[\ \-]?(\(?\d{3}\)?[\ \-]?\d{3}[\ \-]?\d{4})';
25 25
 
26
-    /**
27
-     * indicates that the 'tel' input regex pattern is for a UK formatted phone number, examples:
28
-     *      (###) #### ####
29
-     *      (####) ### ####
30
-     *      (#####) ## ####
31
-     *
32
-     * captures the intl code to the first group (+44) and the rest of the number to group 2
33
-     *      +44 (###) #### ####
34
-     */
35
-    public const PATTERN_UK = '(\+?44)?[\ ]?(\(?(?:(?:\d{3,5})|(?:\d{4} \d{2}))\)?[\-\ ]?\d{2,4}[\-\ ]?\d{2,4})';
26
+	/**
27
+	 * indicates that the 'tel' input regex pattern is for a UK formatted phone number, examples:
28
+	 *      (###) #### ####
29
+	 *      (####) ### ####
30
+	 *      (#####) ## ####
31
+	 *
32
+	 * captures the intl code to the first group (+44) and the rest of the number to group 2
33
+	 *      +44 (###) #### ####
34
+	 */
35
+	public const PATTERN_UK = '(\+?44)?[\ ]?(\(?(?:(?:\d{3,5})|(?:\d{4} \d{2}))\)?[\-\ ]?\d{2,4}[\-\ ]?\d{2,4})';
36 36
 
37
-    /**
38
-     * indicates that the 'tel' input regex pattern is for a France formatted phone number, examples:
39
-     *      0# ## ## ## ##
40
-     *      0### ## ## ##
41
-     *
42
-     * captures the intl code to the first group (+33) and the rest of the number to group 2
43
-     *      +33 # ## ## ## ##
44
-     *      0033 # ## ## ## ##
45
-     */
46
-    public const PATTERN_FR = '((?:\+|00)33)?[\ \.\-]*((?:(?:\(0\)[\ \.\-]{0,3})?|0)[1-9](?:(?:[\ \.\-]?\d{2}){4}|\d{2}(?:[\ \.\-]?\d{3}){2}))';
37
+	/**
38
+	 * indicates that the 'tel' input regex pattern is for a France formatted phone number, examples:
39
+	 *      0# ## ## ## ##
40
+	 *      0### ## ## ##
41
+	 *
42
+	 * captures the intl code to the first group (+33) and the rest of the number to group 2
43
+	 *      +33 # ## ## ## ##
44
+	 *      0033 # ## ## ## ##
45
+	 */
46
+	public const PATTERN_FR = '((?:\+|00)33)?[\ \.\-]*((?:(?:\(0\)[\ \.\-]{0,3})?|0)[1-9](?:(?:[\ \.\-]?\d{2}){4}|\d{2}(?:[\ \.\-]?\d{3}){2}))';
47 47
 
48
-    /**
49
-     * indicates that the 'tel' input regex pattern is for a German formatted phone number, examples:
50
-     *      (0##) ####-####
51
-     *      (0###) ####-####
52
-     *      (0####) ###-####
53
-     *      (03####) ##-####
54
-     *
55
-     * captures the intl code to the first group (+49) and the rest of the number to group 2
56
-     *      +49 (0##) ####-####
57
-     */
58
-    public const PATTERN_DE = '(\+?49)?[\ \.\-]?(\(?(?:[\d \-\)\–\/\(]+){6,}\)?(?:[\ \.\-–\/]?)(?:[\d]+))';
48
+	/**
49
+	 * indicates that the 'tel' input regex pattern is for a German formatted phone number, examples:
50
+	 *      (0##) ####-####
51
+	 *      (0###) ####-####
52
+	 *      (0####) ###-####
53
+	 *      (03####) ##-####
54
+	 *
55
+	 * captures the intl code to the first group (+49) and the rest of the number to group 2
56
+	 *      +49 (0##) ####-####
57
+	 */
58
+	public const PATTERN_DE = '(\+?49)?[\ \.\-]?(\(?(?:[\d \-\)\–\/\(]+){6,}\)?(?:[\ \.\-–\/]?)(?:[\d]+))';
59 59
 
60
-    /**
61
-     * @var array
62
-     */
63
-    private $regex_patterns;
60
+	/**
61
+	 * @var array
62
+	 */
63
+	private $regex_patterns;
64 64
 
65
-    /**
66
-     * @var array
67
-     */
68
-    private $valid_type_options;
65
+	/**
66
+	 * @var array
67
+	 */
68
+	private $valid_type_options;
69 69
 
70 70
 
71
-    /**
72
-     * Phone constructor.
73
-     */
74
-    public function __construct()
75
-    {
76
-        $this->regex_patterns     = (array) apply_filters(
77
-            'FHEE__EventEspresso_core_services_form_meta_inputs_Phone__regex_patterns',
78
-            [
79
-                'de_DE' => Phone::PATTERN_DE,
80
-                'fr_FR' => Phone::PATTERN_FR,
81
-                'en_UK' => Phone::PATTERN_UK,
82
-                'en_US' => Phone::PATTERN_US,
83
-            ]
84
-        );
85
-        $this->valid_type_options = apply_filters(
86
-            'FHEE__EventEspresso_core_services_form_meta_inputs_Phone__valid_type_options',
87
-            [
88
-                Phone::INPUT_TYPE => esc_html__('Phone Number', 'event_espresso'),
89
-            ]
90
-        );
91
-    }
71
+	/**
72
+	 * Phone constructor.
73
+	 */
74
+	public function __construct()
75
+	{
76
+		$this->regex_patterns     = (array) apply_filters(
77
+			'FHEE__EventEspresso_core_services_form_meta_inputs_Phone__regex_patterns',
78
+			[
79
+				'de_DE' => Phone::PATTERN_DE,
80
+				'fr_FR' => Phone::PATTERN_FR,
81
+				'en_UK' => Phone::PATTERN_UK,
82
+				'en_US' => Phone::PATTERN_US,
83
+			]
84
+		);
85
+		$this->valid_type_options = apply_filters(
86
+			'FHEE__EventEspresso_core_services_form_meta_inputs_Phone__valid_type_options',
87
+			[
88
+				Phone::INPUT_TYPE => esc_html__('Phone Number', 'event_espresso'),
89
+			]
90
+		);
91
+	}
92 92
 
93 93
 
94
-    /**
95
-     * @return array
96
-     */
97
-    public function regexPatterns(): array
98
-    {
99
-        return $this->regex_patterns;
100
-    }
94
+	/**
95
+	 * @return array
96
+	 */
97
+	public function regexPatterns(): array
98
+	{
99
+		return $this->regex_patterns;
100
+	}
101 101
 
102 102
 
103
-    /**
104
-     * @param bool $constants_only
105
-     * @return array
106
-     */
107
-    public function validTypeOptions(bool $constants_only = false): array
108
-    {
109
-        return $constants_only
110
-            ? array_keys($this->valid_type_options)
111
-            : $this->valid_type_options;
112
-    }
103
+	/**
104
+	 * @param bool $constants_only
105
+	 * @return array
106
+	 */
107
+	public function validTypeOptions(bool $constants_only = false): array
108
+	{
109
+		return $constants_only
110
+			? array_keys($this->valid_type_options)
111
+			: $this->valid_type_options;
112
+	}
113 113
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     public function __construct()
75 75
     {
76
-        $this->regex_patterns     = (array) apply_filters(
76
+        $this->regex_patterns = (array) apply_filters(
77 77
             'FHEE__EventEspresso_core_services_form_meta_inputs_Phone__regex_patterns',
78 78
             [
79 79
                 'de_DE' => Phone::PATTERN_DE,
Please login to merge, or discard this patch.