Completed
Branch dependabot/composer/wp-graphql... (5a0e42)
by
unknown
18:09 queued 13:06
created
core/db_models/fields/EE_Serialized_Text_Field.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function __construct($table_column, $nicename, $nullable, $default_value = null)
20 20
     {
21 21
         parent::__construct($table_column, $nicename, $nullable, $default_value);
22
-        $this->setSchemaType(array('object','string'));
22
+        $this->setSchemaType(array('object', 'string'));
23 23
     }
24 24
 
25 25
 
Please login to merge, or discard this patch.
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -8,73 +8,73 @@
 block discarded – undo
8 8
  */
9 9
 class EE_Serialized_Text_Field extends EE_Text_Field_Base
10 10
 {
11
-    /**
12
-     * @param string $table_column
13
-     * @param string $nicename
14
-     * @param bool   $nullable
15
-     * @param null   $default_value
16
-     */
17
-    public function __construct($table_column, $nicename, $nullable, $default_value = null)
18
-    {
19
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
20
-        $this->setSchemaType(array('object','string'));
21
-    }
11
+	/**
12
+	 * @param string $table_column
13
+	 * @param string $nicename
14
+	 * @param bool   $nullable
15
+	 * @param null   $default_value
16
+	 */
17
+	public function __construct($table_column, $nicename, $nullable, $default_value = null)
18
+	{
19
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
20
+		$this->setSchemaType(array('object','string'));
21
+	}
22 22
 
23 23
 
24
-    /**
25
-     * Value SHOULD be an array, and we want to now convert it to a serialized string
26
-     *
27
-     * @param array $value_of_field_on_model_object
28
-     * @return string
29
-     */
30
-    public function prepare_for_use_in_db($value_of_field_on_model_object)
31
-    {
32
-        return maybe_serialize($value_of_field_on_model_object);
33
-    }
24
+	/**
25
+	 * Value SHOULD be an array, and we want to now convert it to a serialized string
26
+	 *
27
+	 * @param array $value_of_field_on_model_object
28
+	 * @return string
29
+	 */
30
+	public function prepare_for_use_in_db($value_of_field_on_model_object)
31
+	{
32
+		return maybe_serialize($value_of_field_on_model_object);
33
+	}
34 34
 
35
-    public function prepare_for_set($value_inputted_for_field_on_model_object)
36
-    {
37
-        $value_inputted_for_field_on_model_object = EEH_Array::maybe_unserialize($value_inputted_for_field_on_model_object);
38
-        if (is_string($value_inputted_for_field_on_model_object)) {
39
-            return parent::prepare_for_set($value_inputted_for_field_on_model_object);
40
-        }
41
-        if (is_array($value_inputted_for_field_on_model_object)) {
42
-            return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object);
43
-        }
44
-        // so they passed NULL or an INT or something wack
45
-        return $value_inputted_for_field_on_model_object;
46
-    }
35
+	public function prepare_for_set($value_inputted_for_field_on_model_object)
36
+	{
37
+		$value_inputted_for_field_on_model_object = EEH_Array::maybe_unserialize($value_inputted_for_field_on_model_object);
38
+		if (is_string($value_inputted_for_field_on_model_object)) {
39
+			return parent::prepare_for_set($value_inputted_for_field_on_model_object);
40
+		}
41
+		if (is_array($value_inputted_for_field_on_model_object)) {
42
+			return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object);
43
+		}
44
+		// so they passed NULL or an INT or something wack
45
+		return $value_inputted_for_field_on_model_object;
46
+	}
47 47
 
48
-    /**
49
-     * Value provided should definetely be a serialized string. We should unserialize into an array
50
-     *
51
-     * @param string $value_found_in_db_for_model_object
52
-     * @return array
53
-     */
54
-    public function prepare_for_set_from_db($value_found_in_db_for_model_object)
55
-    {
56
-        return EEH_Array::maybe_unserialize($value_found_in_db_for_model_object);
57
-    }
48
+	/**
49
+	 * Value provided should definetely be a serialized string. We should unserialize into an array
50
+	 *
51
+	 * @param string $value_found_in_db_for_model_object
52
+	 * @return array
53
+	 */
54
+	public function prepare_for_set_from_db($value_found_in_db_for_model_object)
55
+	{
56
+		return EEH_Array::maybe_unserialize($value_found_in_db_for_model_object);
57
+	}
58 58
 
59
-    /**
60
-     * Gets a string representation of the array
61
-     *
62
-     * @param mixed       $value_on_field_to_be_outputted
63
-     * @param string|null $schema , possible values are ',', others can be added
64
-     * @return string
65
-     */
66
-    public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, ?string $schema = null)
67
-    {
68
-        switch ($schema) {
69
-            case 'print_r':
70
-                $pretty_value = print_r($value_on_field_to_be_outputted, true);
71
-                break;
72
-            case 'as_table':
73
-                $pretty_value = EEH_Template::layout_array_as_table($value_on_field_to_be_outputted);
74
-                break;
75
-            default:
76
-                $pretty_value = implode(", ", $value_on_field_to_be_outputted);
77
-        }
78
-        return $pretty_value;
79
-    }
59
+	/**
60
+	 * Gets a string representation of the array
61
+	 *
62
+	 * @param mixed       $value_on_field_to_be_outputted
63
+	 * @param string|null $schema , possible values are ',', others can be added
64
+	 * @return string
65
+	 */
66
+	public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, ?string $schema = null)
67
+	{
68
+		switch ($schema) {
69
+			case 'print_r':
70
+				$pretty_value = print_r($value_on_field_to_be_outputted, true);
71
+				break;
72
+			case 'as_table':
73
+				$pretty_value = EEH_Template::layout_array_as_table($value_on_field_to_be_outputted);
74
+				break;
75
+			default:
76
+				$pretty_value = implode(", ", $value_on_field_to_be_outputted);
77
+		}
78
+		return $pretty_value;
79
+	}
80 80
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_DB_Only_Float_Field.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@
 block discarded – undo
3 3
 
4 4
 class EE_DB_Only_Float_Field extends EE_DB_Only_Field_Base
5 5
 {
6
-    /**
7
-     * @param string $table_column
8
-     * @param string $nicename
9
-     * @param bool   $nullable
10
-     * @param null   $default_value
11
-     */
12
-    public function __construct($table_column, $nicename, $nullable, $default_value = null)
13
-    {
14
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
15
-        $this->setSchemaType('number');
16
-    }
6
+	/**
7
+	 * @param string $table_column
8
+	 * @param string $nicename
9
+	 * @param bool   $nullable
10
+	 * @param null   $default_value
11
+	 */
12
+	public function __construct($table_column, $nicename, $nullable, $default_value = null)
13
+	{
14
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
15
+		$this->setSchemaType('number');
16
+	}
17 17
 
18 18
 }
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/single-espresso_events.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 				<div id="espresso-event-details-dv" class="" >
20 20
 			<?php
21 21
 				// Start the Loop.
22
-				while ( have_posts() ) : the_post();
22
+				while (have_posts()) : the_post();
23 23
 					//  Include the post TYPE-specific template for the content.
24
-					espresso_get_template_part( 'content', 'espresso_events' );
24
+					espresso_get_template_part('content', 'espresso_events');
25 25
 					// If comments are open or we have at least one comment, load up the comment template.
26
-					if ( comments_open() || get_comments_number() ) {
26
+					if (comments_open() || get_comments_number()) {
27 27
 						comments_template();
28 28
 					}
29 29
 				endwhile;
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
 	</div><!-- #primary -->
36 36
 
37 37
 <?php
38
-get_sidebar( 'content' );
38
+get_sidebar('content');
39 39
 get_sidebar();
40 40
 get_footer();
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
core/services/commands/transaction/CreateTransactionCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     public function getCapCheck()
58 58
     {
59 59
         // need cap for non-AJAX admin requests
60
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
60
+        if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
61 61
             // there's no specific caps for editing/creating transactions,
62 62
             // so that's why we are using ee_edit_registrations
63 63
             return new CapCheck('ee_edit_registrations', 'create_new_transaction');
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -20,60 +20,60 @@
 block discarded – undo
20 20
  */
21 21
 class CreateTransactionCommand extends Command implements CommandRequiresCapCheckInterface
22 22
 {
23
-    /**
24
-     * @var EE_Checkout $checkout
25
-     */
26
-    protected $checkout;
23
+	/**
24
+	 * @var EE_Checkout $checkout
25
+	 */
26
+	protected $checkout;
27 27
 
28
-    /**
29
-     * @var array $transaction_details
30
-     */
31
-    protected $transaction_details;
28
+	/**
29
+	 * @var array $transaction_details
30
+	 */
31
+	protected $transaction_details;
32 32
 
33 33
 
34
-    /**
35
-     * CreateTransactionCommand constructor.
36
-     *
37
-     * @param EE_Checkout $checkout
38
-     * @param array       $transaction_details
39
-     */
40
-    public function __construct(EE_Checkout $checkout = null, array $transaction_details = array())
41
-    {
42
-        $this->checkout            = $checkout;
43
-        $this->transaction_details = $transaction_details;
44
-    }
34
+	/**
35
+	 * CreateTransactionCommand constructor.
36
+	 *
37
+	 * @param EE_Checkout $checkout
38
+	 * @param array       $transaction_details
39
+	 */
40
+	public function __construct(EE_Checkout $checkout = null, array $transaction_details = array())
41
+	{
42
+		$this->checkout            = $checkout;
43
+		$this->transaction_details = $transaction_details;
44
+	}
45 45
 
46 46
 
47
-    /**
48
-     * @return CapCheckInterface
49
-     * @throws InvalidDataTypeException
50
-     */
51
-    public function getCapCheck()
52
-    {
53
-        // need cap for non-AJAX admin requests
54
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
55
-            // there's no specific caps for editing/creating transactions,
56
-            // so that's why we are using ee_edit_registrations
57
-            return new CapCheck('ee_edit_registrations', 'create_new_transaction');
58
-        }
59
-        return new PublicCapabilities('', 'create_new_transaction');
60
-    }
47
+	/**
48
+	 * @return CapCheckInterface
49
+	 * @throws InvalidDataTypeException
50
+	 */
51
+	public function getCapCheck()
52
+	{
53
+		// need cap for non-AJAX admin requests
54
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
55
+			// there's no specific caps for editing/creating transactions,
56
+			// so that's why we are using ee_edit_registrations
57
+			return new CapCheck('ee_edit_registrations', 'create_new_transaction');
58
+		}
59
+		return new PublicCapabilities('', 'create_new_transaction');
60
+	}
61 61
 
62 62
 
63
-    /**
64
-     * @return EE_Checkout
65
-     */
66
-    public function checkout()
67
-    {
68
-        return $this->checkout;
69
-    }
63
+	/**
64
+	 * @return EE_Checkout
65
+	 */
66
+	public function checkout()
67
+	{
68
+		return $this->checkout;
69
+	}
70 70
 
71 71
 
72
-    /**
73
-     * @return array
74
-     */
75
-    public function transactionDetails()
76
-    {
77
-        return $this->transaction_details;
78
-    }
72
+	/**
73
+	 * @return array
74
+	 */
75
+	public function transactionDetails()
76
+	{
77
+		return $this->transaction_details;
78
+	}
79 79
 }
Please login to merge, or discard this patch.
core/services/commands/attendee/CreateAttendeeCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     public function getCapCheck()
82 82
     {
83 83
         // need cap for non-AJAX admin requests
84
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
84
+        if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
85 85
             return new CapCheck('ee_edit_contacts', 'create_new_contact');
86 86
         }
87 87
         return new PublicCapabilities('', 'create_new_contact');
Please login to merge, or discard this patch.
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -19,62 +19,62 @@
 block discarded – undo
19 19
  */
20 20
 class CreateAttendeeCommand extends Command implements CommandRequiresCapCheckInterface
21 21
 {
22
-    /**
23
-     * array of details where keys are names of EEM_Attendee model fields
24
-     *
25
-     * @var array $attendee_details
26
-     */
27
-    protected $attendee_details;
22
+	/**
23
+	 * array of details where keys are names of EEM_Attendee model fields
24
+	 *
25
+	 * @var array $attendee_details
26
+	 */
27
+	protected $attendee_details;
28 28
 
29
-    /**
30
-     * an existing registration to associate this attendee with
31
-     *
32
-     * @var EE_Registration $registration
33
-     */
34
-    protected $registration;
29
+	/**
30
+	 * an existing registration to associate this attendee with
31
+	 *
32
+	 * @var EE_Registration $registration
33
+	 */
34
+	protected $registration;
35 35
 
36 36
 
37
-    /**
38
-     * CreateAttendeeCommand constructor.
39
-     *
40
-     * @param array           $attendee_details
41
-     * @param EE_Registration $registration
42
-     */
43
-    public function __construct(array $attendee_details, EE_Registration $registration)
44
-    {
45
-        $this->attendee_details = $attendee_details;
46
-        $this->registration = $registration;
47
-    }
37
+	/**
38
+	 * CreateAttendeeCommand constructor.
39
+	 *
40
+	 * @param array           $attendee_details
41
+	 * @param EE_Registration $registration
42
+	 */
43
+	public function __construct(array $attendee_details, EE_Registration $registration)
44
+	{
45
+		$this->attendee_details = $attendee_details;
46
+		$this->registration = $registration;
47
+	}
48 48
 
49 49
 
50
-    /**
51
-     * @return array
52
-     */
53
-    public function attendeeDetails()
54
-    {
55
-        return $this->attendee_details;
56
-    }
50
+	/**
51
+	 * @return array
52
+	 */
53
+	public function attendeeDetails()
54
+	{
55
+		return $this->attendee_details;
56
+	}
57 57
 
58 58
 
59
-    /**
60
-     * @return EE_Registration
61
-     */
62
-    public function registration()
63
-    {
64
-        return $this->registration;
65
-    }
59
+	/**
60
+	 * @return EE_Registration
61
+	 */
62
+	public function registration()
63
+	{
64
+		return $this->registration;
65
+	}
66 66
 
67 67
 
68
-    /**
69
-     * @return CapCheckInterface
70
-     * @throws InvalidDataTypeException
71
-     */
72
-    public function getCapCheck()
73
-    {
74
-        // need cap for non-AJAX admin requests
75
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
76
-            return new CapCheck('ee_edit_contacts', 'create_new_contact');
77
-        }
78
-        return new PublicCapabilities('', 'create_new_contact');
79
-    }
68
+	/**
69
+	 * @return CapCheckInterface
70
+	 * @throws InvalidDataTypeException
71
+	 */
72
+	public function getCapCheck()
73
+	{
74
+		// need cap for non-AJAX admin requests
75
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
76
+			return new CapCheck('ee_edit_contacts', 'create_new_contact');
77
+		}
78
+		return new PublicCapabilities('', 'create_new_contact');
79
+	}
80 80
 }
Please login to merge, or discard this patch.
events/help_tabs/events_default_settings_max_tickets.help_tab.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <p>
2 2
     <?php esc_html_e(
3
-        'Use this to control what the default will be for maximum tickets on an order when creating a new event.',
4
-        'event_espresso'
5
-    ); ?>
3
+		'Use this to control what the default will be for maximum tickets on an order when creating a new event.',
4
+		'event_espresso'
5
+	); ?>
6 6
 </p>
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
core/services/notices/ConvertNoticesToEeErrors.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $error_string = esc_html__('The following errors occurred:', 'event_espresso');
44 44
             foreach ($notices->getError() as $notice) {
45 45
                 if ($this->getThrowExceptions()) {
46
-                    $error_string .= '<br />' . $notice->message();
46
+                    $error_string .= '<br />'.$notice->message();
47 47
                 } else {
48 48
                     EE_Error::add_error(
49 49
                         $notice->message(),
Please login to merge, or discard this patch.
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -13,54 +13,54 @@
 block discarded – undo
13 13
  */
14 14
 class ConvertNoticesToEeErrors extends NoticeConverter
15 15
 {
16
-    /**
17
-     * Converts Notice objects into EE_Error notifications
18
-     *
19
-     * @param NoticesContainerInterface $notices
20
-     * @throws EE_Error
21
-     */
22
-    public function process(NoticesContainerInterface $notices)
23
-    {
24
-        $this->setNotices($notices);
25
-        $notices = $this->getNotices();
26
-        if ($notices->hasAttention()) {
27
-            foreach ($notices->getAttention() as $notice) {
28
-                EE_Error::add_attention(
29
-                    $notice->message(),
30
-                    $notice->file(),
31
-                    $notice->func(),
32
-                    $notice->line()
33
-                );
34
-            }
35
-        }
36
-        if ($notices->hasError()) {
37
-            $error_string = esc_html__('The following errors occurred:', 'event_espresso');
38
-            foreach ($notices->getError() as $notice) {
39
-                if ($this->getThrowExceptions()) {
40
-                    $error_string .= '<br />' . $notice->message();
41
-                } else {
42
-                    EE_Error::add_error(
43
-                        $notice->message(),
44
-                        $notice->file(),
45
-                        $notice->func(),
46
-                        $notice->line()
47
-                    );
48
-                }
49
-            }
50
-            if ($this->getThrowExceptions()) {
51
-                throw new EE_Error($error_string);
52
-            }
53
-        }
54
-        if ($notices->hasSuccess()) {
55
-            foreach ($notices->getSuccess() as $notice) {
56
-                EE_Error::add_success(
57
-                    $notice->message(),
58
-                    $notice->file(),
59
-                    $notice->func(),
60
-                    $notice->line()
61
-                );
62
-            }
63
-        }
64
-        $this->clearNotices();
65
-    }
16
+	/**
17
+	 * Converts Notice objects into EE_Error notifications
18
+	 *
19
+	 * @param NoticesContainerInterface $notices
20
+	 * @throws EE_Error
21
+	 */
22
+	public function process(NoticesContainerInterface $notices)
23
+	{
24
+		$this->setNotices($notices);
25
+		$notices = $this->getNotices();
26
+		if ($notices->hasAttention()) {
27
+			foreach ($notices->getAttention() as $notice) {
28
+				EE_Error::add_attention(
29
+					$notice->message(),
30
+					$notice->file(),
31
+					$notice->func(),
32
+					$notice->line()
33
+				);
34
+			}
35
+		}
36
+		if ($notices->hasError()) {
37
+			$error_string = esc_html__('The following errors occurred:', 'event_espresso');
38
+			foreach ($notices->getError() as $notice) {
39
+				if ($this->getThrowExceptions()) {
40
+					$error_string .= '<br />' . $notice->message();
41
+				} else {
42
+					EE_Error::add_error(
43
+						$notice->message(),
44
+						$notice->file(),
45
+						$notice->func(),
46
+						$notice->line()
47
+					);
48
+				}
49
+			}
50
+			if ($this->getThrowExceptions()) {
51
+				throw new EE_Error($error_string);
52
+			}
53
+		}
54
+		if ($notices->hasSuccess()) {
55
+			foreach ($notices->getSuccess() as $notice) {
56
+				EE_Error::add_success(
57
+					$notice->message(),
58
+					$notice->file(),
59
+					$notice->func(),
60
+					$notice->line()
61
+				);
62
+			}
63
+		}
64
+		$this->clearNotices();
65
+	}
66 66
 }
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Template_Group_Collection.lib.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     {
99 99
         sort($EVT_ID);
100 100
         $EVT_ID = implode(',', array_unique($EVT_ID));
101
-        return md5($messenger . $message_type . $EVT_ID);
101
+        return md5($messenger.$message_type.$EVT_ID);
102 102
     }
103 103
 
104 104
 
Please login to merge, or discard this patch.
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -10,114 +10,114 @@
 block discarded – undo
10 10
  */
11 11
 class EE_Message_Template_Group_Collection extends EE_Object_Collection
12 12
 {
13
-    /**
14
-     * EE_Message_Template_Group_Collection constructor.
15
-     */
16
-    public function __construct()
17
-    {
18
-        $this->interface = 'EE_Message_Template_Group';
19
-    }
13
+	/**
14
+	 * EE_Message_Template_Group_Collection constructor.
15
+	 */
16
+	public function __construct()
17
+	{
18
+		$this->interface = 'EE_Message_Template_Group';
19
+	}
20 20
 
21 21
 
22
-    /**
23
-     * Adds the Message Template Group object to the repository.
24
-     *
25
-     * @param           $message_template_group
26
-     * @param array|int $EVT_ID    Some templates are specific to EVT, so this is provided as a way of
27
-     *                         indexing the template by key.  If this template is shared among multiple events then
28
-     *                         include the events as an array.
29
-     * @return bool
30
-     */
31
-    public function add($message_template_group, $EVT_ID = array()): bool
32
-    {
33
-        $EVT_ID = is_array($EVT_ID) ? $EVT_ID : (array) $EVT_ID;
34
-        if ($message_template_group instanceof $this->interface) {
35
-            $data['key'] = $this->getKey(
36
-                $message_template_group->messenger(),
37
-                $message_template_group->message_type(),
38
-                $EVT_ID
39
-            );
40
-            return parent::add($message_template_group, $data);
41
-        }
42
-        return false;
43
-    }
22
+	/**
23
+	 * Adds the Message Template Group object to the repository.
24
+	 *
25
+	 * @param           $message_template_group
26
+	 * @param array|int $EVT_ID    Some templates are specific to EVT, so this is provided as a way of
27
+	 *                         indexing the template by key.  If this template is shared among multiple events then
28
+	 *                         include the events as an array.
29
+	 * @return bool
30
+	 */
31
+	public function add($message_template_group, $EVT_ID = array()): bool
32
+	{
33
+		$EVT_ID = is_array($EVT_ID) ? $EVT_ID : (array) $EVT_ID;
34
+		if ($message_template_group instanceof $this->interface) {
35
+			$data['key'] = $this->getKey(
36
+				$message_template_group->messenger(),
37
+				$message_template_group->message_type(),
38
+				$EVT_ID
39
+			);
40
+			return parent::add($message_template_group, $data);
41
+		}
42
+		return false;
43
+	}
44 44
 
45 45
 
46
-    /**
47
-     * This retrieves any EE_Message_Template_Group in the repo by its ID.
48
-     *
49
-     * @param $GRP_ID
50
-     * @return EE_Message_Template_Group | null
51
-     */
52
-    public function get_by_ID($GRP_ID)
53
-    {
54
-        $this->rewind();
55
-        while ($this->valid()) {
56
-            if ($this->current()->ID() === $GRP_ID) {
57
-                /** @var EE_Message_Template_Group $message_template_group */
58
-                $message_template_group = $this->current();
59
-                $this->rewind();
60
-                return $message_template_group;
61
-            }
62
-            $this->next();
63
-        }
64
-        return null;
65
-    }
46
+	/**
47
+	 * This retrieves any EE_Message_Template_Group in the repo by its ID.
48
+	 *
49
+	 * @param $GRP_ID
50
+	 * @return EE_Message_Template_Group | null
51
+	 */
52
+	public function get_by_ID($GRP_ID)
53
+	{
54
+		$this->rewind();
55
+		while ($this->valid()) {
56
+			if ($this->current()->ID() === $GRP_ID) {
57
+				/** @var EE_Message_Template_Group $message_template_group */
58
+				$message_template_group = $this->current();
59
+				$this->rewind();
60
+				return $message_template_group;
61
+			}
62
+			$this->next();
63
+		}
64
+		return null;
65
+	}
66 66
 
67 67
 
68
-    /**
69
-     * Generates a hash used to identify a given Message Template Group.
70
-     *
71
-     * @param string $messenger    The EE_messenger->name
72
-     * @param string $message_type The EE_message_type->name
73
-     * @param int    $EVT_ID       Optional.  If the template is for a specific EVT then that should be included.
74
-     * @deprecated 4.9.40.rc.017  Use getKey instead.
75
-     * @return string
76
-     */
77
-    public function get_key($messenger, $message_type, $EVT_ID = 0)
78
-    {
79
-        $EVT_ID = (array) $EVT_ID;
80
-        return $this->getKey($messenger, $message_type, $EVT_ID);
81
-    }
68
+	/**
69
+	 * Generates a hash used to identify a given Message Template Group.
70
+	 *
71
+	 * @param string $messenger    The EE_messenger->name
72
+	 * @param string $message_type The EE_message_type->name
73
+	 * @param int    $EVT_ID       Optional.  If the template is for a specific EVT then that should be included.
74
+	 * @deprecated 4.9.40.rc.017  Use getKey instead.
75
+	 * @return string
76
+	 */
77
+	public function get_key($messenger, $message_type, $EVT_ID = 0)
78
+	{
79
+		$EVT_ID = (array) $EVT_ID;
80
+		return $this->getKey($messenger, $message_type, $EVT_ID);
81
+	}
82 82
 
83 83
 
84
-    /**
85
-     * Generates a hash used to identify a given Message Template Group
86
-     * @param string    $messenger      The EE_messenger->name
87
-     * @param string    $message_type   The EE_message_type->name
88
-     * @param array     $EVT_ID         Optional.  If the template is for a specific EVT_ID (or events) then that should
89
-     *                                  be included.
90
-     * @since 4.9.40.rc.017
91
-     * @return string
92
-     */
93
-    public function getKey($messenger, $message_type, array $EVT_ID = array())
94
-    {
95
-        sort($EVT_ID);
96
-        $EVT_ID = implode(',', array_unique($EVT_ID));
97
-        return md5($messenger . $message_type . $EVT_ID);
98
-    }
84
+	/**
85
+	 * Generates a hash used to identify a given Message Template Group
86
+	 * @param string    $messenger      The EE_messenger->name
87
+	 * @param string    $message_type   The EE_message_type->name
88
+	 * @param array     $EVT_ID         Optional.  If the template is for a specific EVT_ID (or events) then that should
89
+	 *                                  be included.
90
+	 * @since 4.9.40.rc.017
91
+	 * @return string
92
+	 */
93
+	public function getKey($messenger, $message_type, array $EVT_ID = array())
94
+	{
95
+		sort($EVT_ID);
96
+		$EVT_ID = implode(',', array_unique($EVT_ID));
97
+		return md5($messenger . $message_type . $EVT_ID);
98
+	}
99 99
 
100 100
 
101
-    /**
102
-     * This returns a saved EE_Message_Template_Group object if there is one in the repository indexed by a key matching
103
-     * the given string.
104
-     *
105
-     * @param string $key @see EE_Message_Template_Group::get_key() to setup a key formatted for searching.
106
-     * @return null|EE_Message_Template_Group
107
-     */
108
-    public function get_by_key($key)
109
-    {
110
-        $this->rewind();
111
-        while ($this->valid()) {
112
-            $data = $this->getInfo();
113
-            if (isset($data['key']) && $data['key'] === $key) {
114
-                /** @var EE_Message_Template_Group $message_template_group */
115
-                $message_template_group = $this->current();
116
-                $this->rewind();
117
-                return $message_template_group;
118
-            }
119
-            $this->next();
120
-        }
121
-        return null;
122
-    }
101
+	/**
102
+	 * This returns a saved EE_Message_Template_Group object if there is one in the repository indexed by a key matching
103
+	 * the given string.
104
+	 *
105
+	 * @param string $key @see EE_Message_Template_Group::get_key() to setup a key formatted for searching.
106
+	 * @return null|EE_Message_Template_Group
107
+	 */
108
+	public function get_by_key($key)
109
+	{
110
+		$this->rewind();
111
+		while ($this->valid()) {
112
+			$data = $this->getInfo();
113
+			if (isset($data['key']) && $data['key'] === $key) {
114
+				/** @var EE_Message_Template_Group $message_template_group */
115
+				$message_template_group = $this->current();
116
+				$this->rewind();
117
+				return $message_template_group;
118
+			}
119
+			$this->next();
120
+		}
121
+		return null;
122
+	}
123 123
 }
Please login to merge, or discard this patch.
libraries/form_sections/strategies/layout/EE_Two_Column_Layout.strategy.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             $this->_form_section->html_id(),
19 19
             $this->_form_section->html_class(),
20 20
             $this->_form_section->html_style()
21
-        ) . EEH_HTML::tbody();
21
+        ).EEH_HTML::tbody();
22 22
     }
23 23
 
24 24
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function layout_form_end($additional_args = array())
33 33
     {
34
-        return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
34
+        return EEH_HTML::tbodyx().EEH_HTML::tablex($this->_form_section->html_id());
35 35
     }
36 36
 
37 37
 
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
         } else {
51 51
             $html_for_input = $input->get_html_for_input();
52 52
             $html_for_input .= $input->get_html_for_errors() != ''
53
-                ? EEH_HTML::nl() . $input->get_html_for_errors()
53
+                ? EEH_HTML::nl().$input->get_html_for_errors()
54 54
                 : '';
55
-            $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
55
+            $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : '';
56 56
             $html .= EEH_HTML::tr(
57
-                EEH_HTML::th($input->get_html_for_label()) .
57
+                EEH_HTML::th($input->get_html_for_label()).
58 58
                 EEH_HTML::td($html_for_input)
59 59
             );
60 60
         }
Please login to merge, or discard this patch.
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -2,97 +2,97 @@
 block discarded – undo
2 2
 
3 3
 class EE_Two_Column_Layout extends EE_Form_Section_Layout_Base
4 4
 {
5
-    /**
6
-     * @param EE_Form_Section_Proper $form
7
-     */
8
-    public function _construct_finalize(EE_Form_Section_Proper $form)
9
-    {
10
-        parent::_construct_finalize($form);
11
-        $this->_form_section->set_html_class('ee-two-column-layout');
12
-    }
5
+	/**
6
+	 * @param EE_Form_Section_Proper $form
7
+	 */
8
+	public function _construct_finalize(EE_Form_Section_Proper $form)
9
+	{
10
+		parent::_construct_finalize($form);
11
+		$this->_form_section->set_html_class('ee-two-column-layout');
12
+	}
13 13
 
14 14
 
15
-    /**
16
-     * Should be used to start teh form section (Eg a table tag, or a div tag, etc.)
17
-     *
18
-     * @param array $additional_args
19
-     * @return string
20
-     * @throws EE_Error
21
-     */
22
-    public function layout_form_begin($additional_args = array())
23
-    {
24
-        return $this->display_form_wide_errors()
25
-        . EEH_HTML::table(
26
-            '',
27
-            $this->_form_section->html_id(),
28
-            $this->_form_section->html_class(),
29
-            $this->_form_section->html_style()
30
-        ) . EEH_HTML::tbody();
31
-    }
15
+	/**
16
+	 * Should be used to start teh form section (Eg a table tag, or a div tag, etc.)
17
+	 *
18
+	 * @param array $additional_args
19
+	 * @return string
20
+	 * @throws EE_Error
21
+	 */
22
+	public function layout_form_begin($additional_args = array())
23
+	{
24
+		return $this->display_form_wide_errors()
25
+		. EEH_HTML::table(
26
+			'',
27
+			$this->_form_section->html_id(),
28
+			$this->_form_section->html_class(),
29
+			$this->_form_section->html_style()
30
+		) . EEH_HTML::tbody();
31
+	}
32 32
 
33 33
 
34 34
 
35
-    /**
36
-     * Should be used to end the form section (eg a /table tag, or a /div tag, etc)
37
-     *
38
-     * @param array $additional_args
39
-     * @return string
40
-     */
41
-    public function layout_form_end($additional_args = array())
42
-    {
43
-        return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
44
-    }
35
+	/**
36
+	 * Should be used to end the form section (eg a /table tag, or a /div tag, etc)
37
+	 *
38
+	 * @param array $additional_args
39
+	 * @return string
40
+	 */
41
+	public function layout_form_end($additional_args = array())
42
+	{
43
+		return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
44
+	}
45 45
 
46 46
 
47 47
 
48
-    /**
49
-     * Lays out the row for the input, including label and errors
50
-     *
51
-     * @param EE_Form_Input_Base $input
52
-     * @return string
53
-     */
54
-    public function layout_input($input)
55
-    {
56
-        $html = '';
57
-        if ($input instanceof EE_Hidden_Input) {
58
-            $html .= $input->get_html_for_input();
59
-        } else {
60
-            $html_for_input = $input->get_html_for_input();
61
-            $html_for_input .= $input->get_html_for_errors() != ''
62
-                ? EEH_HTML::nl() . $input->get_html_for_errors()
63
-                : '';
64
-            $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
65
-            $html .= EEH_HTML::tr(
66
-                EEH_HTML::th($input->get_html_for_label()) .
67
-                EEH_HTML::td($html_for_input)
68
-            );
69
-        }
70
-        return $html;
71
-    }
48
+	/**
49
+	 * Lays out the row for the input, including label and errors
50
+	 *
51
+	 * @param EE_Form_Input_Base $input
52
+	 * @return string
53
+	 */
54
+	public function layout_input($input)
55
+	{
56
+		$html = '';
57
+		if ($input instanceof EE_Hidden_Input) {
58
+			$html .= $input->get_html_for_input();
59
+		} else {
60
+			$html_for_input = $input->get_html_for_input();
61
+			$html_for_input .= $input->get_html_for_errors() != ''
62
+				? EEH_HTML::nl() . $input->get_html_for_errors()
63
+				: '';
64
+			$html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
65
+			$html .= EEH_HTML::tr(
66
+				EEH_HTML::th($input->get_html_for_label()) .
67
+				EEH_HTML::td($html_for_input)
68
+			);
69
+		}
70
+		return $html;
71
+	}
72 72
 
73 73
 
74 74
 
75
-    /**
76
-     * Lays out a row for the subsection. Please note that if you have a subsection which you don't want wrapped in
77
-     * a tr and td with a colspan=2, you should use a different layout strategy, like EE_No_Layout, EE_Template_Layout,
78
-     * or EE_Div_Per_Section_Layout, and create subsections using EE_Two_Column_Layout for everywhere you want the
79
-     * two-column layout, and then other sub-sections can be outside the EE_Two_Column_Layout table.
80
-     *
81
-     * @param EE_Form_Section_Proper $form_section
82
-     * @return string
83
-    */
84
-    public function layout_subsection($form_section)
85
-    {
86
-        if ($form_section instanceof EE_Form_Section_Proper) {
87
-            $html = $form_section->get_html();
88
-            // \EEH_Debug_Tools::printr( $html, '$html', __FILE__, __LINE__ );
75
+	/**
76
+	 * Lays out a row for the subsection. Please note that if you have a subsection which you don't want wrapped in
77
+	 * a tr and td with a colspan=2, you should use a different layout strategy, like EE_No_Layout, EE_Template_Layout,
78
+	 * or EE_Div_Per_Section_Layout, and create subsections using EE_Two_Column_Layout for everywhere you want the
79
+	 * two-column layout, and then other sub-sections can be outside the EE_Two_Column_Layout table.
80
+	 *
81
+	 * @param EE_Form_Section_Proper $form_section
82
+	 * @return string
83
+	 */
84
+	public function layout_subsection($form_section)
85
+	{
86
+		if ($form_section instanceof EE_Form_Section_Proper) {
87
+			$html = $form_section->get_html();
88
+			// \EEH_Debug_Tools::printr( $html, '$html', __FILE__, __LINE__ );
89 89
 
90
-            return ! empty($html) ? EEH_HTML::no_row($html) : '';
91
-        }
92
-        if ($form_section instanceof EE_Form_Section_HTML) {
93
-            // return $form_section->get_html();
94
-            return EEH_HTML::no_row($form_section->get_html());
95
-        }
96
-        return '';
97
-    }
90
+			return ! empty($html) ? EEH_HTML::no_row($html) : '';
91
+		}
92
+		if ($form_section instanceof EE_Form_Section_HTML) {
93
+			// return $form_section->get_html();
94
+			return EEH_HTML::no_row($form_section->get_html());
95
+		}
96
+		return '';
97
+	}
98 98
 }
Please login to merge, or discard this patch.