Completed
Branch dev (02312e)
by
unknown
11:42 queued 04:50
created
core/services/commands/transaction/CreateTransactionCommandHandler.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         }
52 52
         // create new TXN and save it so it has an ID
53 53
         $transaction = EE_Transaction::new_instance($transaction_details);
54
-        if (! $transaction instanceof EE_Transaction) {
54
+        if ( ! $transaction instanceof EE_Transaction) {
55 55
             throw new InvalidEntityException(get_class($transaction), 'EE_Transaction');
56 56
         }
57 57
         $transaction->save();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $cart_total = $cart_total instanceof EE_Line_Item
60 60
             ? $cart_total
61 61
             : EEH_Line_Item::create_total_line_item($transaction);
62
-        if (! $cart_total instanceof EE_Line_Item) {
62
+        if ( ! $cart_total instanceof EE_Line_Item) {
63 63
             throw new InvalidEntityException(get_class($cart_total), 'EE_Line_Item');
64 64
         }
65 65
         $cart_total->save_this_and_descendants_to_txn($transaction->ID());
Please login to merge, or discard this patch.
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -25,43 +25,43 @@
 block discarded – undo
25 25
  */
26 26
 class CreateTransactionCommandHandler extends CommandHandler
27 27
 {
28
-    /**
29
-     * @param CommandInterface|CreateTransactionCommand $command
30
-     * @return mixed
31
-     * @throws EE_Error
32
-     * @throws InvalidEntityException
33
-     * @throws InvalidDataTypeException
34
-     * @throws InvalidInterfaceException
35
-     * @throws InvalidArgumentException
36
-     * @throws ReflectionException
37
-     * @throws RuntimeException
38
-     */
39
-    public function handle(CommandInterface $command)
40
-    {
41
-        $transaction_details = $command->transactionDetails();
42
-        $cart_total = null;
43
-        if ($command->checkout() instanceof EE_Checkout) {
44
-            // ensure cart totals have been calculated
45
-            $command->checkout()->cart->get_grand_total()->recalculate_total_including_taxes();
46
-            // grab the cart grand total
47
-            $cart_total = $command->checkout()->cart->get_cart_grand_total();
48
-            $transaction_details['TXN_reg_steps'] = $command->checkout()->initialize_txn_reg_steps_array();
49
-            $transaction_details['TXN_total'] = $cart_total > 0 ? $cart_total : 0;
50
-        }
51
-        // create new TXN and save it so it has an ID
52
-        $transaction = EE_Transaction::new_instance($transaction_details);
53
-        if (! $transaction instanceof EE_Transaction) {
54
-            throw new InvalidEntityException(get_class($transaction), 'EE_Transaction');
55
-        }
56
-        $transaction->save();
57
-        // ensure grand total line item created
58
-        $cart_total = $cart_total instanceof EE_Line_Item
59
-            ? $cart_total
60
-            : EEH_Line_Item::create_total_line_item($transaction);
61
-        if (! $cart_total instanceof EE_Line_Item) {
62
-            throw new InvalidEntityException(get_class($cart_total), 'EE_Line_Item');
63
-        }
64
-        $cart_total->save_this_and_descendants_to_txn($transaction->ID());
65
-        return $transaction;
66
-    }
28
+	/**
29
+	 * @param CommandInterface|CreateTransactionCommand $command
30
+	 * @return mixed
31
+	 * @throws EE_Error
32
+	 * @throws InvalidEntityException
33
+	 * @throws InvalidDataTypeException
34
+	 * @throws InvalidInterfaceException
35
+	 * @throws InvalidArgumentException
36
+	 * @throws ReflectionException
37
+	 * @throws RuntimeException
38
+	 */
39
+	public function handle(CommandInterface $command)
40
+	{
41
+		$transaction_details = $command->transactionDetails();
42
+		$cart_total = null;
43
+		if ($command->checkout() instanceof EE_Checkout) {
44
+			// ensure cart totals have been calculated
45
+			$command->checkout()->cart->get_grand_total()->recalculate_total_including_taxes();
46
+			// grab the cart grand total
47
+			$cart_total = $command->checkout()->cart->get_cart_grand_total();
48
+			$transaction_details['TXN_reg_steps'] = $command->checkout()->initialize_txn_reg_steps_array();
49
+			$transaction_details['TXN_total'] = $cart_total > 0 ? $cart_total : 0;
50
+		}
51
+		// create new TXN and save it so it has an ID
52
+		$transaction = EE_Transaction::new_instance($transaction_details);
53
+		if (! $transaction instanceof EE_Transaction) {
54
+			throw new InvalidEntityException(get_class($transaction), 'EE_Transaction');
55
+		}
56
+		$transaction->save();
57
+		// ensure grand total line item created
58
+		$cart_total = $cart_total instanceof EE_Line_Item
59
+			? $cart_total
60
+			: EEH_Line_Item::create_total_line_item($transaction);
61
+		if (! $cart_total instanceof EE_Line_Item) {
62
+			throw new InvalidEntityException(get_class($cart_total), 'EE_Line_Item');
63
+		}
64
+		$cart_total->save_this_and_descendants_to_txn($transaction->ID());
65
+		return $transaction;
66
+	}
67 67
 }
Please login to merge, or discard this patch.
core/services/commands/CommandBus.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function execute($command)
81 81
     {
82
-        if (! $command instanceof CommandInterface) {
83
-            throw new InvalidDataTypeException(__METHOD__ . '( $command )', $command, 'CommandInterface');
82
+        if ( ! $command instanceof CommandInterface) {
83
+            throw new InvalidDataTypeException(__METHOD__.'( $command )', $command, 'CommandInterface');
84 84
         }
85 85
         // we're going to add the Command Handler as a callable
86 86
         // that will get run at the end of our middleware stack
87 87
         // can't pass $this to a Closure, so use a named variable
88 88
         $command_bus = $this;
89
-        $middleware = static function ($command) use ($command_bus) {
89
+        $middleware = static function($command) use ($command_bus) {
90 90
             return $command_bus->getCommandHandlerManager()
91 91
                                ->getCommandHandler($command, $command_bus)
92 92
                                ->verify($command)
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
         };
95 95
         // now build the rest of the middleware stack
96 96
         while ($command_bus_middleware = array_pop($this->command_bus_middleware)) {
97
-            if (! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
97
+            if ( ! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
98 98
                 throw new InvalidCommandBusMiddlewareException($command_bus_middleware);
99 99
             }
100
-            $middleware = static function ($command) use ($command_bus_middleware, $middleware) {
100
+            $middleware = static function($command) use ($command_bus_middleware, $middleware) {
101 101
                 return $command_bus_middleware->handle($command, $middleware);
102 102
             };
103 103
         }
Please login to merge, or discard this patch.
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -33,74 +33,74 @@
 block discarded – undo
33 33
  */
34 34
 class CommandBus implements CommandBusInterface
35 35
 {
36
-    /**
37
-     * @type CommandHandlerManagerInterface $command_handler_manager
38
-     */
39
-    private $command_handler_manager;
36
+	/**
37
+	 * @type CommandHandlerManagerInterface $command_handler_manager
38
+	 */
39
+	private $command_handler_manager;
40 40
 
41
-    /**
42
-     * @type CommandBusMiddlewareInterface[] $command_bus_middleware
43
-     */
44
-    private $command_bus_middleware;
41
+	/**
42
+	 * @type CommandBusMiddlewareInterface[] $command_bus_middleware
43
+	 */
44
+	private $command_bus_middleware;
45 45
 
46 46
 
47
-    /**
48
-     * CommandBus constructor
49
-     *
50
-     * @param CommandHandlerManagerInterface  $command_handler_manager
51
-     * @param CommandBusMiddlewareInterface[] $command_bus_middleware
52
-     */
53
-    public function __construct(
54
-        CommandHandlerManagerInterface $command_handler_manager,
55
-        array $command_bus_middleware = array()
56
-    ) {
57
-        $this->command_handler_manager = $command_handler_manager;
58
-        $this->command_bus_middleware = is_array($command_bus_middleware)
59
-            ? $command_bus_middleware
60
-            : array($command_bus_middleware);
61
-    }
47
+	/**
48
+	 * CommandBus constructor
49
+	 *
50
+	 * @param CommandHandlerManagerInterface  $command_handler_manager
51
+	 * @param CommandBusMiddlewareInterface[] $command_bus_middleware
52
+	 */
53
+	public function __construct(
54
+		CommandHandlerManagerInterface $command_handler_manager,
55
+		array $command_bus_middleware = array()
56
+	) {
57
+		$this->command_handler_manager = $command_handler_manager;
58
+		$this->command_bus_middleware = is_array($command_bus_middleware)
59
+			? $command_bus_middleware
60
+			: array($command_bus_middleware);
61
+	}
62 62
 
63 63
 
64
-    /**
65
-     * @return CommandHandlerManagerInterface
66
-     */
67
-    public function getCommandHandlerManager()
68
-    {
69
-        return $this->command_handler_manager;
70
-    }
64
+	/**
65
+	 * @return CommandHandlerManagerInterface
66
+	 */
67
+	public function getCommandHandlerManager()
68
+	{
69
+		return $this->command_handler_manager;
70
+	}
71 71
 
72 72
 
73
-    /**
74
-     * @param CommandInterface $command
75
-     * @return mixed
76
-     * @throws InvalidDataTypeException
77
-     * @throws InvalidCommandBusMiddlewareException
78
-     */
79
-    public function execute($command)
80
-    {
81
-        if (! $command instanceof CommandInterface) {
82
-            throw new InvalidDataTypeException(__METHOD__ . '( $command )', $command, 'CommandInterface');
83
-        }
84
-        // we're going to add the Command Handler as a callable
85
-        // that will get run at the end of our middleware stack
86
-        // can't pass $this to a Closure, so use a named variable
87
-        $command_bus = $this;
88
-        $middleware = static function ($command) use ($command_bus) {
89
-            return $command_bus->getCommandHandlerManager()
90
-                               ->getCommandHandler($command, $command_bus)
91
-                               ->verify($command)
92
-                               ->handle($command);
93
-        };
94
-        // now build the rest of the middleware stack
95
-        while ($command_bus_middleware = array_pop($this->command_bus_middleware)) {
96
-            if (! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
97
-                throw new InvalidCommandBusMiddlewareException($command_bus_middleware);
98
-            }
99
-            $middleware = static function ($command) use ($command_bus_middleware, $middleware) {
100
-                return $command_bus_middleware->handle($command, $middleware);
101
-            };
102
-        }
103
-        // and finally, pass the command into the stack and return the results
104
-        return $middleware($command);
105
-    }
73
+	/**
74
+	 * @param CommandInterface $command
75
+	 * @return mixed
76
+	 * @throws InvalidDataTypeException
77
+	 * @throws InvalidCommandBusMiddlewareException
78
+	 */
79
+	public function execute($command)
80
+	{
81
+		if (! $command instanceof CommandInterface) {
82
+			throw new InvalidDataTypeException(__METHOD__ . '( $command )', $command, 'CommandInterface');
83
+		}
84
+		// we're going to add the Command Handler as a callable
85
+		// that will get run at the end of our middleware stack
86
+		// can't pass $this to a Closure, so use a named variable
87
+		$command_bus = $this;
88
+		$middleware = static function ($command) use ($command_bus) {
89
+			return $command_bus->getCommandHandlerManager()
90
+							   ->getCommandHandler($command, $command_bus)
91
+							   ->verify($command)
92
+							   ->handle($command);
93
+		};
94
+		// now build the rest of the middleware stack
95
+		while ($command_bus_middleware = array_pop($this->command_bus_middleware)) {
96
+			if (! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
97
+				throw new InvalidCommandBusMiddlewareException($command_bus_middleware);
98
+			}
99
+			$middleware = static function ($command) use ($command_bus_middleware, $middleware) {
100
+				return $command_bus_middleware->handle($command, $middleware);
101
+			};
102
+		}
103
+		// and finally, pass the command into the stack and return the results
104
+		return $middleware($command);
105
+	}
106 106
 }
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 // unfortunately, this needs to be done upon INCLUSION of this file,
16 16
 // instead of construction, because it only gets constructed on first page load
17 17
 // (all other times it gets resurrected from a wordpress option)
18
-$stages = glob(EE_CORE . 'data_migration_scripts/4_7_0_stages/*');
18
+$stages = glob(EE_CORE.'data_migration_scripts/4_7_0_stages/*');
19 19
 $class_to_filepath = array();
20 20
 foreach ($stages as $filepath) {
21 21
     $matches = array();
22 22
     preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
23
-    $class_to_filepath[ $matches[1] ] = $filepath;
23
+    $class_to_filepath[$matches[1]] = $filepath;
24 24
 }
25 25
 // give addons a chance to autoload their stages too
26 26
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages', $class_to_filepath);
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
             )
77 77
         ) {
78 78
             return true;
79
-        } elseif (! $version_string) {
79
+        } elseif ( ! $version_string) {
80 80
             // no version string provided... this must be pre 4.3
81
-            return false;// changed mind. dont want people thinking they should migrate yet because they cant
81
+            return false; // changed mind. dont want people thinking they should migrate yet because they cant
82 82
         } else {
83 83
             return false;
84 84
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function schema_changes_before_migration()
93 93
     {
94 94
         // relies on 4.1's EEH_Activation::create_table
95
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
95
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
96 96
         $table_name = 'esp_answer';
97 97
         $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
98 98
 					REG_ID int(10) unsigned NOT NULL,
Please login to merge, or discard this patch.
Indentation   +181 added lines, -181 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 $stages = glob(EE_CORE . 'data_migration_scripts/4_7_0_stages/*');
11 11
 $class_to_filepath = array();
12 12
 foreach ($stages as $filepath) {
13
-    $matches = array();
14
-    preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
15
-    $class_to_filepath[ $matches[1] ] = $filepath;
13
+	$matches = array();
14
+	preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
15
+	$class_to_filepath[ $matches[1] ] = $filepath;
16 16
 }
17 17
 // give addons a chance to autoload their stages too
18 18
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages', $class_to_filepath);
@@ -34,72 +34,72 @@  discard block
 block discarded – undo
34 34
  */
35 35
 class EE_DMS_Core_4_7_0 extends EE_Data_Migration_Script_Base
36 36
 {
37
-    /**
38
-     * return EE_DMS_Core_4_7_0
39
-     *
40
-     * @param TableManager  $table_manager
41
-     * @param TableAnalysis $table_analysis
42
-     */
43
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
44
-    {
45
-        $this->_pretty_name = esc_html__("Data Update to Event Espresso 4.7.0", "event_espresso");
46
-        $this->_priority = 10;
47
-        $this->_migration_stages = array(
48
-            new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
49
-            new EE_DMS_4_7_0_Registration_Payments(),
50
-        );
51
-        parent::__construct($table_manager, $table_analysis);
52
-    }
37
+	/**
38
+	 * return EE_DMS_Core_4_7_0
39
+	 *
40
+	 * @param TableManager  $table_manager
41
+	 * @param TableAnalysis $table_analysis
42
+	 */
43
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
44
+	{
45
+		$this->_pretty_name = esc_html__("Data Update to Event Espresso 4.7.0", "event_espresso");
46
+		$this->_priority = 10;
47
+		$this->_migration_stages = array(
48
+			new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
49
+			new EE_DMS_4_7_0_Registration_Payments(),
50
+		);
51
+		parent::__construct($table_manager, $table_analysis);
52
+	}
53 53
 
54 54
 
55 55
 
56
-    /**
57
-     * @param array $version_array
58
-     * @return bool
59
-     */
60
-    public function can_migrate_from_version($version_array)
61
-    {
62
-        $version_string = $version_array['Core'];
63
-        if (
64
-            (
65
-                version_compare($version_string, '4.7.0.decaf', '<')
66
-                && version_compare($version_string, '4.6.0.decaf', '>=')
67
-            )
68
-            || (
69
-                version_compare($version_string, '4.7.0.decaf', '>=')
70
-                && ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
71
-                && $this->_get_table_analysis()->tableExists('esp_registration')
72
-            )
73
-        ) {
74
-            return true;
75
-        } elseif (! $version_string) {
76
-            // no version string provided... this must be pre 4.3
77
-            return false;// changed mind. dont want people thinking they should migrate yet because they cant
78
-        } else {
79
-            return false;
80
-        }
81
-    }
56
+	/**
57
+	 * @param array $version_array
58
+	 * @return bool
59
+	 */
60
+	public function can_migrate_from_version($version_array)
61
+	{
62
+		$version_string = $version_array['Core'];
63
+		if (
64
+			(
65
+				version_compare($version_string, '4.7.0.decaf', '<')
66
+				&& version_compare($version_string, '4.6.0.decaf', '>=')
67
+			)
68
+			|| (
69
+				version_compare($version_string, '4.7.0.decaf', '>=')
70
+				&& ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
71
+				&& $this->_get_table_analysis()->tableExists('esp_registration')
72
+			)
73
+		) {
74
+			return true;
75
+		} elseif (! $version_string) {
76
+			// no version string provided... this must be pre 4.3
77
+			return false;// changed mind. dont want people thinking they should migrate yet because they cant
78
+		} else {
79
+			return false;
80
+		}
81
+	}
82 82
 
83 83
 
84 84
 
85
-    /**
86
-     * @return bool
87
-     */
88
-    public function schema_changes_before_migration()
89
-    {
90
-        // relies on 4.1's EEH_Activation::create_table
91
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
92
-        $table_name = 'esp_answer';
93
-        $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
85
+	/**
86
+	 * @return bool
87
+	 */
88
+	public function schema_changes_before_migration()
89
+	{
90
+		// relies on 4.1's EEH_Activation::create_table
91
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
92
+		$table_name = 'esp_answer';
93
+		$sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
94 94
 					REG_ID int(10) unsigned NOT NULL,
95 95
 					QST_ID int(10) unsigned NOT NULL,
96 96
 					ANS_value text NOT NULL,
97 97
 					PRIMARY KEY  (ANS_ID),
98 98
 					KEY REG_ID (REG_ID),
99 99
 					KEY QST_ID (QST_ID)";
100
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
101
-        $table_name = 'esp_attendee_meta';
102
-        $sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
100
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
101
+		$table_name = 'esp_attendee_meta';
102
+		$sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
103 103
 						ATT_ID bigint(20) unsigned NOT NULL,
104 104
 						ATT_fname varchar(45) NOT NULL,
105 105
 						ATT_lname varchar(45) NOT	NULL,
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 								KEY ATT_email (ATT_email(191)),
117 117
 								KEY ATT_lname (ATT_lname),
118 118
 								KEY ATT_fname (ATT_fname)";
119
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
120
-        $table_name = 'esp_country';
121
-        $sql = "CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
119
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
120
+		$table_name = 'esp_country';
121
+		$sql = "CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
122 122
 					  CNT_ISO3 varchar(3) COLLATE utf8_bin NOT NULL,
123 123
 					  RGN_ID tinyint(3) unsigned DEFAULT NULL,
124 124
 					  CNT_name varchar(45) COLLATE utf8_bin NOT NULL,
@@ -134,25 +134,25 @@  discard block
 block discarded – undo
134 134
 					  CNT_is_EU tinyint(1) DEFAULT '0',
135 135
 					  CNT_active tinyint(1) DEFAULT '0',
136 136
 					  PRIMARY KEY  (CNT_ISO)";
137
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
138
-        $table_name = 'esp_currency';
139
-        $sql = "CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
137
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
138
+		$table_name = 'esp_currency';
139
+		$sql = "CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
140 140
 				CUR_single varchar(45) COLLATE utf8_bin DEFAULT 'dollar',
141 141
 				CUR_plural varchar(45) COLLATE utf8_bin DEFAULT 'dollars',
142 142
 				CUR_sign varchar(45) COLLATE utf8_bin DEFAULT '$',
143 143
 				CUR_dec_plc varchar(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
144 144
 				CUR_active tinyint(1) DEFAULT '0',
145 145
 				PRIMARY KEY  (CUR_code)";
146
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
147
-        $table_name = 'esp_currency_payment_method';
148
-        $sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
146
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
147
+		$table_name = 'esp_currency_payment_method';
148
+		$sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
149 149
 				CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
150 150
 				PMD_ID int(11) NOT NULL,
151 151
 				PRIMARY KEY  (CPM_ID),
152 152
 				KEY PMD_ID (PMD_ID)";
153
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
154
-        $table_name = 'esp_datetime';
155
-        $sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
153
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
154
+		$table_name = 'esp_datetime';
155
+		$sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
156 156
 				  EVT_ID bigint(20) unsigned NOT NULL,
157 157
 				  DTT_name varchar(255) NOT NULL DEFAULT '',
158 158
 				  DTT_description text NOT NULL,
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 						KEY DTT_EVT_start (DTT_EVT_start),
169 169
 						KEY EVT_ID (EVT_ID),
170 170
 						KEY DTT_is_primary (DTT_is_primary)";
171
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
172
-        $table_name = 'esp_event_meta';
173
-        $sql = "
171
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
172
+		$table_name = 'esp_event_meta';
173
+		$sql = "
174 174
 			EVTM_ID int(10) NOT NULL AUTO_INCREMENT,
175 175
 			EVT_ID bigint(20) unsigned NOT NULL,
176 176
 			EVT_display_desc tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -186,34 +186,34 @@  discard block
 block discarded – undo
186 186
 			EVT_donations tinyint(1) NULL,
187 187
 			PRIMARY KEY  (EVTM_ID),
188 188
 			KEY EVT_ID (EVT_ID)";
189
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
190
-        $table_name = 'esp_event_question_group';
191
-        $sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
189
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
190
+		$table_name = 'esp_event_question_group';
191
+		$sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
192 192
 					EVT_ID bigint(20) unsigned NOT NULL,
193 193
 					QSG_ID int(10) unsigned NOT NULL,
194 194
 					EQG_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
195 195
 					PRIMARY KEY  (EQG_ID),
196 196
 					KEY EVT_ID (EVT_ID),
197 197
 					KEY QSG_ID (QSG_ID)";
198
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
199
-        $table_name = 'esp_event_venue';
200
-        $sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
198
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
199
+		$table_name = 'esp_event_venue';
200
+		$sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
201 201
 				EVT_ID bigint(20) unsigned NOT NULL,
202 202
 				VNU_ID bigint(20) unsigned NOT NULL,
203 203
 				EVV_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
204 204
 				PRIMARY KEY  (EVV_ID)";
205
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
206
-        $table_name = 'esp_extra_meta';
207
-        $sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
205
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
206
+		$table_name = 'esp_extra_meta';
207
+		$sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
208 208
 				OBJ_ID int(11) DEFAULT NULL,
209 209
 				EXM_type varchar(45) DEFAULT NULL,
210 210
 				EXM_key varchar(45) DEFAULT NULL,
211 211
 				EXM_value text,
212 212
 				PRIMARY KEY  (EXM_ID),
213 213
 				KEY EXM_type (EXM_type, OBJ_ID, EXM_key(45))";
214
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
215
-        $table_name = 'esp_line_item';
216
-        $sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
214
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
215
+		$table_name = 'esp_line_item';
216
+		$sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
217 217
 				LIN_code varchar(245) NOT NULL DEFAULT '',
218 218
 				TXN_ID int(11) DEFAULT NULL,
219 219
 				LIN_name varchar(245) NOT NULL DEFAULT '',
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 				PRIMARY KEY  (LIN_ID),
232 232
 				KEY LIN_code (LIN_code(191)),
233 233
 				KEY TXN_ID (TXN_ID)";
234
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
235
-        $table_name = 'esp_log';
236
-        $sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
234
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
235
+		$table_name = 'esp_log';
236
+		$sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
237 237
 				LOG_time datetime DEFAULT NULL,
238 238
 				OBJ_ID varchar(45) DEFAULT NULL,
239 239
 				OBJ_type varchar(45) DEFAULT NULL,
@@ -244,18 +244,18 @@  discard block
 block discarded – undo
244 244
 				KEY LOG_time (LOG_time),
245 245
 				KEY OBJ (OBJ_type,OBJ_ID),
246 246
 				KEY LOG_type (LOG_type)";
247
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
248
-        $table_name = 'esp_message_template';
249
-        $sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
247
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
248
+		$table_name = 'esp_message_template';
249
+		$sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
250 250
 					GRP_ID int(10) unsigned NOT NULL,
251 251
 					MTP_context varchar(50) NOT NULL,
252 252
 					MTP_template_field varchar(30) NOT NULL,
253 253
 					MTP_content text NOT NULL,
254 254
 					PRIMARY KEY  (MTP_ID),
255 255
 					KEY GRP_ID (GRP_ID)";
256
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
257
-        $table_name = 'esp_message_template_group';
258
-        $sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
256
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
257
+		$table_name = 'esp_message_template_group';
258
+		$sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
259 259
 					MTP_user_id int(10) NOT NULL DEFAULT '1',
260 260
 					MTP_name varchar(245) NOT NULL DEFAULT '',
261 261
 					MTP_description varchar(245) NOT NULL DEFAULT '',
@@ -267,17 +267,17 @@  discard block
 block discarded – undo
267 267
 					MTP_is_active tinyint(1) NOT NULL DEFAULT '1',
268 268
 					PRIMARY KEY  (GRP_ID),
269 269
 					KEY MTP_user_id (MTP_user_id)";
270
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
271
-        $table_name = 'esp_event_message_template';
272
-        $sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
270
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
271
+		$table_name = 'esp_event_message_template';
272
+		$sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
273 273
 					EVT_ID bigint(20) unsigned NOT NULL DEFAULT 0,
274 274
 					GRP_ID int(10) unsigned NOT NULL DEFAULT 0,
275 275
 					PRIMARY KEY  (EMT_ID),
276 276
 					KEY EVT_ID (EVT_ID),
277 277
 					KEY GRP_ID (GRP_ID)";
278
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
279
-        $table_name = 'esp_payment';
280
-        $sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
278
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
279
+		$table_name = 'esp_payment';
280
+		$sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
281 281
 					TXN_ID int(10) unsigned DEFAULT NULL,
282 282
 					STS_ID varchar(3) COLLATE utf8_bin DEFAULT NULL,
283 283
 					PAY_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 					PRIMARY KEY  (PAY_ID),
295 295
 					KEY PAY_timestamp (PAY_timestamp),
296 296
 					KEY TXN_ID (TXN_ID)";
297
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
298
-        $table_name = 'esp_payment_method';
299
-        $sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
297
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
298
+		$table_name = 'esp_payment_method';
299
+		$sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
300 300
 				PMD_type varchar(124) DEFAULT NULL,
301 301
 				PMD_name varchar(255) DEFAULT NULL,
302 302
 				PMD_desc text,
@@ -312,32 +312,32 @@  discard block
 block discarded – undo
312 312
 				PRIMARY KEY  (PMD_ID),
313 313
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug),
314 314
 				KEY PMD_type (PMD_type)";
315
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
316
-        $table_name = "esp_ticket_price";
317
-        $sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
315
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
316
+		$table_name = "esp_ticket_price";
317
+		$sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
318 318
 					  TKT_ID int(10) unsigned NOT NULL,
319 319
 					  PRC_ID int(10) unsigned NOT NULL,
320 320
 					  PRIMARY KEY  (TKP_ID),
321 321
 					  KEY TKT_ID (TKT_ID),
322 322
 					  KEY PRC_ID (PRC_ID)";
323
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
324
-        $table_name = "esp_datetime_ticket";
325
-        $sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
323
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
324
+		$table_name = "esp_datetime_ticket";
325
+		$sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
326 326
 					  DTT_ID int(10) unsigned NOT NULL,
327 327
 					  TKT_ID int(10) unsigned NOT NULL,
328 328
 					  PRIMARY KEY  (DTK_ID),
329 329
 					  KEY DTT_ID (DTT_ID),
330 330
 					  KEY TKT_ID (TKT_ID)";
331
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
332
-        $table_name = "esp_ticket_template";
333
-        $sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
331
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
332
+		$table_name = "esp_ticket_template";
333
+		$sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
334 334
 					  TTM_name varchar(45) NOT NULL,
335 335
 					  TTM_description text,
336 336
 					  TTM_file varchar(45),
337 337
 					  PRIMARY KEY  (TTM_ID)";
338
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
339
-        $table_name = 'esp_question';
340
-        $sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
338
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
339
+		$table_name = 'esp_question';
340
+		$sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
341 341
 					QST_display_text text NOT NULL,
342 342
 					QST_admin_label varchar(255) NOT NULL,
343 343
 					QST_system varchar(25) DEFAULT NULL,
@@ -350,18 +350,18 @@  discard block
 block discarded – undo
350 350
 					QST_deleted tinyint(2) unsigned NOT NULL DEFAULT 0,
351 351
 					PRIMARY KEY  (QST_ID),
352 352
 					KEY QST_order (QST_order)';
353
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
354
-        $table_name = 'esp_question_group_question';
355
-        $sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
353
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
354
+		$table_name = 'esp_question_group_question';
355
+		$sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
356 356
 					QSG_ID int(10) unsigned NOT NULL,
357 357
 					QST_ID int(10) unsigned NOT NULL,
358 358
 					QGQ_order int(10) unsigned NOT NULL DEFAULT 0,
359 359
 					PRIMARY KEY  (QGQ_ID),
360 360
 					KEY QST_ID (QST_ID),
361 361
 					KEY QSG_ID_order (QSG_ID, QGQ_order)";
362
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
363
-        $table_name = 'esp_question_option';
364
-        $sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
362
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
363
+		$table_name = 'esp_question_option';
364
+		$sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
365 365
 					QSO_value varchar(255) NOT NULL,
366 366
 					QSO_desc text NOT NULL,
367 367
 					QST_ID int(10) unsigned NOT NULL,
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
 					PRIMARY KEY  (QSO_ID),
371 371
 					KEY QST_ID (QST_ID),
372 372
 					KEY QSO_order (QSO_order)";
373
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
374
-        $table_name = 'esp_registration';
375
-        $sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
373
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
374
+		$table_name = 'esp_registration';
375
+		$sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
376 376
 					  EVT_ID bigint(20) unsigned NOT NULL,
377 377
 					  ATT_ID bigint(20) unsigned NOT NULL,
378 378
 					  TXN_ID int(10) unsigned NOT NULL,
@@ -396,18 +396,18 @@  discard block
 block discarded – undo
396 396
 					  KEY TKT_ID (TKT_ID),
397 397
 					  KEY EVT_ID (EVT_ID),
398 398
 					  KEY STS_ID (STS_ID)";
399
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
400
-        $table_name = 'esp_registration_payment';
401
-        $sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
399
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
400
+		$table_name = 'esp_registration_payment';
401
+		$sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
402 402
 					  REG_ID int(10) unsigned NOT NULL,
403 403
 					  PAY_ID int(10) unsigned NULL,
404 404
 					  RPY_amount decimal(10,3) NOT NULL DEFAULT '0.00',
405 405
 					  PRIMARY KEY  (RPY_ID),
406 406
 					  KEY REG_ID (REG_ID),
407 407
 					  KEY PAY_ID (PAY_ID)";
408
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
409
-        $table_name = 'esp_checkin';
410
-        $sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
408
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
409
+		$table_name = 'esp_checkin';
410
+		$sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
411 411
 					REG_ID int(10) unsigned NOT NULL,
412 412
 					DTT_ID int(10) unsigned NOT NULL,
413 413
 					CHK_in tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -415,9 +415,9 @@  discard block
 block discarded – undo
415 415
 					PRIMARY KEY  (CHK_ID),
416 416
 					KEY REG_ID (REG_ID),
417 417
 					KEY DTT_ID (DTT_ID)";
418
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
419
-        $table_name = 'esp_state';
420
-        $sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
418
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
419
+		$table_name = 'esp_state';
420
+		$sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
421 421
 					  CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
422 422
 					  STA_abbrev varchar(24) COLLATE utf8_bin NOT NULL,
423 423
 					  STA_name varchar(100) COLLATE utf8_bin NOT NULL,
@@ -425,9 +425,9 @@  discard block
 block discarded – undo
425 425
 					  PRIMARY KEY  (STA_ID),
426 426
 					  KEY STA_abbrev (STA_abbrev),
427 427
 					  KEY CNT_ISO (CNT_ISO)";
428
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
429
-        $table_name = 'esp_status';
430
-        $sql = "STS_ID varchar(3) COLLATE utf8_bin NOT NULL,
428
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
429
+		$table_name = 'esp_status';
430
+		$sql = "STS_ID varchar(3) COLLATE utf8_bin NOT NULL,
431 431
 					  STS_code varchar(45) COLLATE utf8_bin NOT NULL,
432 432
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
433 433
 					  STS_can_edit tinyint(1) NOT NULL DEFAULT 0,
@@ -435,9 +435,9 @@  discard block
 block discarded – undo
435 435
 					  STS_open tinyint(1) NOT NULL DEFAULT 1,
436 436
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
437 437
 					  KEY STS_type (STS_type)";
438
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
439
-        $table_name = 'esp_transaction';
440
-        $sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
438
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
439
+		$table_name = 'esp_transaction';
440
+		$sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
441 441
 					  TXN_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
442 442
 					  TXN_total decimal(10,3) DEFAULT '0.00',
443 443
 					  TXN_paid decimal(10,3) NOT NULL DEFAULT '0.00',
@@ -449,9 +449,9 @@  discard block
 block discarded – undo
449 449
 					  PRIMARY KEY  (TXN_ID),
450 450
 					  KEY TXN_timestamp (TXN_timestamp),
451 451
 					  KEY STS_ID (STS_ID)";
452
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
453
-        $table_name = 'esp_venue_meta';
454
-        $sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
452
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
453
+		$table_name = 'esp_venue_meta';
454
+		$sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
455 455
 			VNU_ID bigint(20) unsigned NOT NULL DEFAULT 0,
456 456
 			VNU_address varchar(255) DEFAULT NULL,
457 457
 			VNU_address2 varchar(255) DEFAULT NULL,
@@ -470,10 +470,10 @@  discard block
 block discarded – undo
470 470
 			KEY VNU_ID (VNU_ID),
471 471
 			KEY STA_ID (STA_ID),
472 472
 			KEY CNT_ISO (CNT_ISO)";
473
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
474
-        // modified tables
475
-        $table_name = "esp_price";
476
-        $sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
473
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
474
+		// modified tables
475
+		$table_name = "esp_price";
476
+		$sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
477 477
 					  PRT_ID tinyint(3) unsigned NOT NULL,
478 478
 					  PRC_amount decimal(10,3) NOT NULL DEFAULT '0.00',
479 479
 					  PRC_name varchar(245) NOT NULL,
@@ -486,9 +486,9 @@  discard block
 block discarded – undo
486 486
 					  PRC_parent int(10) unsigned DEFAULT 0,
487 487
 					  PRIMARY KEY  (PRC_ID),
488 488
 					  KEY PRT_ID (PRT_ID)";
489
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
490
-        $table_name = "esp_price_type";
491
-        $sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
489
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
490
+		$table_name = "esp_price_type";
491
+		$sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
492 492
 				  PRT_name varchar(45) NOT NULL,
493 493
 				  PBT_ID tinyint(3) unsigned NOT NULL DEFAULT '1',
494 494
 				  PRT_is_percent tinyint(1) NOT NULL DEFAULT '0',
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
 				  PRT_deleted tinyint(1) NOT NULL DEFAULT '0',
498 498
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
499 499
 				  PRIMARY KEY  (PRT_ID)";
500
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
501
-        $table_name = "esp_ticket";
502
-        $sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
500
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
501
+		$table_name = "esp_ticket";
502
+		$sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
503 503
 					  TTM_ID int(10) unsigned NOT NULL,
504 504
 					  TKT_name varchar(245) NOT NULL DEFAULT '',
505 505
 					  TKT_description text NOT NULL,
@@ -521,9 +521,9 @@  discard block
 block discarded – undo
521 521
 					  TKT_deleted tinyint(1) NOT NULL DEFAULT '0',
522 522
 					  PRIMARY KEY  (TKT_ID),
523 523
 					  KEY TKT_start_date (TKT_start_date)";
524
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
525
-        $table_name = 'esp_question_group';
526
-        $sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
524
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
525
+		$table_name = 'esp_question_group';
526
+		$sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
527 527
 					QSG_name varchar(255) NOT NULL,
528 528
 					QSG_identifier varchar(100) NOT NULL,
529 529
 					QSG_desc text NULL,
@@ -536,38 +536,38 @@  discard block
 block discarded – undo
536 536
 					PRIMARY KEY  (QSG_ID),
537 537
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
538 538
 					KEY QSG_order (QSG_order)';
539
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
540
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
541
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
542
-        // (because many need to convert old string states to foreign keys into the states table)
543
-        $script_4_1_defaults->insert_default_states();
544
-        $script_4_1_defaults->insert_default_countries();
545
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
546
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
547
-        $script_4_5_defaults->insert_default_price_types();
548
-        $script_4_5_defaults->insert_default_prices();
549
-        $script_4_5_defaults->insert_default_tickets();
550
-        /** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
551
-        $script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
552
-        $script_4_6_defaults->add_default_admin_only_payments();
553
-        $script_4_6_defaults->insert_default_currencies();
554
-        return true;
555
-    }
539
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
540
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
541
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
542
+		// (because many need to convert old string states to foreign keys into the states table)
543
+		$script_4_1_defaults->insert_default_states();
544
+		$script_4_1_defaults->insert_default_countries();
545
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
546
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
547
+		$script_4_5_defaults->insert_default_price_types();
548
+		$script_4_5_defaults->insert_default_prices();
549
+		$script_4_5_defaults->insert_default_tickets();
550
+		/** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
551
+		$script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
552
+		$script_4_6_defaults->add_default_admin_only_payments();
553
+		$script_4_6_defaults->insert_default_currencies();
554
+		return true;
555
+	}
556 556
 
557 557
 
558 558
 
559
-    /**
560
-     * @return boolean
561
-     */
562
-    public function schema_changes_after_migration()
563
-    {
564
-        return true;
565
-    }
559
+	/**
560
+	 * @return boolean
561
+	 */
562
+	public function schema_changes_after_migration()
563
+	{
564
+		return true;
565
+	}
566 566
 
567 567
 
568 568
 
569
-    public function migration_page_hooks()
570
-    {
571
-    }
569
+	public function migration_page_hooks()
570
+	{
571
+	}
572 572
 }
573 573
 // end of file: /core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha_invisible/InvisibleRecaptcha.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
         static $previous_recaptcha_response = array();
136 136
         $grecaptcha_response = $request->getRequestParam('g-recaptcha-response');
137 137
         // if this token has already been verified, then return previous response
138
-        if (isset($previous_recaptcha_response[ $grecaptcha_response ])) {
139
-            return $previous_recaptcha_response[ $grecaptcha_response ];
138
+        if (isset($previous_recaptcha_response[$grecaptcha_response])) {
139
+            return $previous_recaptcha_response[$grecaptcha_response];
140 140
         }
141 141
         // still here but no g-recaptcha-response ? - verification failed
142
-        if (! $grecaptcha_response) {
142
+        if ( ! $grecaptcha_response) {
143 143
             EE_Error::add_error(
144 144
                 sprintf(
145 145
                     /* translators: 1: missing parameter */
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             return false;
159 159
         }
160 160
         // will update to true if everything passes
161
-        $previous_recaptcha_response[ $grecaptcha_response ] = false;
161
+        $previous_recaptcha_response[$grecaptcha_response] = false;
162 162
         $response                                            = wp_safe_remote_post(
163 163
             InvisibleRecaptcha::URL_GOOGLE_RECAPTCHA_API,
164 164
             array(
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
         }
176 176
         $results = json_decode(wp_remote_retrieve_body($response), true);
177 177
         if (filter_var($results['success'], FILTER_VALIDATE_BOOLEAN) !== true) {
178
-            $errors   = array_map(
178
+            $errors = array_map(
179 179
                 array($this, 'getErrorCode'),
180 180
                 $results['error-codes']
181 181
             );
182 182
             if (isset($results['challenge_ts'])) {
183
-                $errors[] = 'challenge timestamp: ' . $results['challenge_ts'] . '.';
183
+                $errors[] = 'challenge timestamp: '.$results['challenge_ts'].'.';
184 184
             }
185 185
             $this->generateError(implode(' ', $errors), true);
186 186
         }
187
-        $previous_recaptcha_response[ $grecaptcha_response ] = true;
187
+        $previous_recaptcha_response[$grecaptcha_response] = true;
188 188
         add_action('shutdown', array($this, 'setSessionData'));
189 189
         return true;
190 190
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             'bad-request'            => 'The request is invalid or malformed.',
226 226
             'timeout-or-duplicate'   => 'The request took too long to be sent or was a duplicate of a previous request.',
227 227
         );
228
-        return isset($error_codes[ $error_code ]) ? $error_codes[ $error_code ] : '';
228
+        return isset($error_codes[$error_code]) ? $error_codes[$error_code] : '';
229 229
     }
230 230
 
231 231
 
Please login to merge, or discard this patch.
Indentation   +242 added lines, -242 removed lines patch added patch discarded remove patch
@@ -26,272 +26,272 @@
 block discarded – undo
26 26
  */
27 27
 class InvisibleRecaptcha
28 28
 {
29
-    const URL_GOOGLE_RECAPTCHA_API          = 'https://www.google.com/recaptcha/api/siteverify';
29
+	const URL_GOOGLE_RECAPTCHA_API          = 'https://www.google.com/recaptcha/api/siteverify';
30 30
 
31
-    const SESSION_DATA_KEY_RECAPTCHA_PASSED = 'recaptcha_passed';
31
+	const SESSION_DATA_KEY_RECAPTCHA_PASSED = 'recaptcha_passed';
32 32
 
33
-    /**
34
-     * @var EE_Registration_Config $config
35
-     */
36
-    private $config;
33
+	/**
34
+	 * @var EE_Registration_Config $config
35
+	 */
36
+	private $config;
37 37
 
38
-    /**
39
-     * @var EE_Session $session
40
-     */
41
-    private $session;
38
+	/**
39
+	 * @var EE_Session $session
40
+	 */
41
+	private $session;
42 42
 
43
-    /**
44
-     * @var boolean $recaptcha_passed
45
-     */
46
-    private $recaptcha_passed;
43
+	/**
44
+	 * @var boolean $recaptcha_passed
45
+	 */
46
+	private $recaptcha_passed;
47 47
 
48 48
 
49
-    /**
50
-     * InvisibleRecaptcha constructor.
51
-     *
52
-     * @param EE_Registration_Config $registration_config
53
-     * @param EE_Session             $session
54
-     */
55
-    public function __construct(EE_Registration_Config $registration_config, EE_Session $session = null)
56
-    {
57
-        $this->config = $registration_config;
58
-        $this->session = $session;
59
-    }
49
+	/**
50
+	 * InvisibleRecaptcha constructor.
51
+	 *
52
+	 * @param EE_Registration_Config $registration_config
53
+	 * @param EE_Session             $session
54
+	 */
55
+	public function __construct(EE_Registration_Config $registration_config, EE_Session $session = null)
56
+	{
57
+		$this->config = $registration_config;
58
+		$this->session = $session;
59
+	}
60 60
 
61 61
 
62
-    /**
63
-     * @return boolean
64
-     */
65
-    public function useInvisibleRecaptcha()
66
-    {
67
-        return $this->session instanceof EE_Session
68
-               && $this->config->use_captcha
69
-               && $this->config->recaptcha_theme === 'invisible';
70
-    }
62
+	/**
63
+	 * @return boolean
64
+	 */
65
+	public function useInvisibleRecaptcha()
66
+	{
67
+		return $this->session instanceof EE_Session
68
+			   && $this->config->use_captcha
69
+			   && $this->config->recaptcha_theme === 'invisible';
70
+	}
71 71
 
72 72
 
73
-    /**
74
-     * @param array $input_settings
75
-     * @return EE_Invisible_Recaptcha_Input
76
-     * @throws InvalidDataTypeException
77
-     * @throws InvalidInterfaceException
78
-     * @throws InvalidArgumentException
79
-     * @throws DomainException
80
-     */
81
-    public function getInput(array $input_settings = array())
82
-    {
83
-        return new EE_Invisible_Recaptcha_Input(
84
-            $input_settings,
85
-            $this->config
86
-        );
87
-    }
73
+	/**
74
+	 * @param array $input_settings
75
+	 * @return EE_Invisible_Recaptcha_Input
76
+	 * @throws InvalidDataTypeException
77
+	 * @throws InvalidInterfaceException
78
+	 * @throws InvalidArgumentException
79
+	 * @throws DomainException
80
+	 */
81
+	public function getInput(array $input_settings = array())
82
+	{
83
+		return new EE_Invisible_Recaptcha_Input(
84
+			$input_settings,
85
+			$this->config
86
+		);
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * @param array $input_settings
92
-     * @return string
93
-     * @throws EE_Error
94
-     * @throws InvalidDataTypeException
95
-     * @throws InvalidInterfaceException
96
-     * @throws InvalidArgumentException
97
-     * @throws DomainException
98
-     */
99
-    public function getInputHtml(array $input_settings = array())
100
-    {
101
-        return $this->getInput($input_settings)->get_html_for_input();
102
-    }
90
+	/**
91
+	 * @param array $input_settings
92
+	 * @return string
93
+	 * @throws EE_Error
94
+	 * @throws InvalidDataTypeException
95
+	 * @throws InvalidInterfaceException
96
+	 * @throws InvalidArgumentException
97
+	 * @throws DomainException
98
+	 */
99
+	public function getInputHtml(array $input_settings = array())
100
+	{
101
+		return $this->getInput($input_settings)->get_html_for_input();
102
+	}
103 103
 
104 104
 
105
-    /**
106
-     * @param EE_Form_Section_Proper $form
107
-     * @param array                  $input_settings
108
-     * @throws EE_Error
109
-     * @throws InvalidArgumentException
110
-     * @throws InvalidDataTypeException
111
-     * @throws InvalidInterfaceException
112
-     * @throws DomainException
113
-     */
114
-    public function addToFormSection(EE_Form_Section_Proper $form, array $input_settings = array())
115
-    {
116
-        $form->add_subsections(
117
-            array(
118
-                'espresso_recaptcha' => $this->getInput($input_settings),
119
-            ),
120
-            null,
121
-            false
122
-        );
123
-    }
105
+	/**
106
+	 * @param EE_Form_Section_Proper $form
107
+	 * @param array                  $input_settings
108
+	 * @throws EE_Error
109
+	 * @throws InvalidArgumentException
110
+	 * @throws InvalidDataTypeException
111
+	 * @throws InvalidInterfaceException
112
+	 * @throws DomainException
113
+	 */
114
+	public function addToFormSection(EE_Form_Section_Proper $form, array $input_settings = array())
115
+	{
116
+		$form->add_subsections(
117
+			array(
118
+				'espresso_recaptcha' => $this->getInput($input_settings),
119
+			),
120
+			null,
121
+			false
122
+		);
123
+	}
124 124
 
125 125
 
126
-    /**
127
-     * @param RequestInterface $request
128
-     * @return boolean
129
-     * @throws InvalidArgumentException
130
-     * @throws InvalidDataTypeException
131
-     * @throws InvalidInterfaceException
132
-     * @throws RuntimeException
133
-     */
134
-    public function verifyToken(RequestInterface $request)
135
-    {
136
-        static $previous_recaptcha_response = array();
137
-        $grecaptcha_response = $request->getRequestParam('g-recaptcha-response');
138
-        // if this token has already been verified, then return previous response
139
-        if (isset($previous_recaptcha_response[ $grecaptcha_response ])) {
140
-            return $previous_recaptcha_response[ $grecaptcha_response ];
141
-        }
142
-        // still here but no g-recaptcha-response ? - verification failed
143
-        if (! $grecaptcha_response) {
144
-            EE_Error::add_error(
145
-                sprintf(
146
-                    /* translators: 1: missing parameter */
147
-                    esc_html__(
148
-                        // @codingStandardsIgnoreStart
149
-                        'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. Missing "%1$s". Please try again.',
150
-                        // @codingStandardsIgnoreEnd
151
-                        'event_espresso'
152
-                    ),
153
-                    'g-recaptcha-response'
154
-                ),
155
-                __FILE__,
156
-                __FUNCTION__,
157
-                __LINE__
158
-            );
159
-            return false;
160
-        }
161
-        // will update to true if everything passes
162
-        $previous_recaptcha_response[ $grecaptcha_response ] = false;
163
-        $response                                            = wp_safe_remote_post(
164
-            InvisibleRecaptcha::URL_GOOGLE_RECAPTCHA_API,
165
-            array(
166
-                'body' => array(
167
-                    'secret'   => $this->config->recaptcha_privatekey,
168
-                    'response' => $grecaptcha_response,
169
-                    'remoteip' => $request->ipAddress(),
170
-                ),
171
-            )
172
-        );
173
-        if ($response instanceof WP_Error) {
174
-            $this->generateError($response->get_error_messages());
175
-            return false;
176
-        }
177
-        $results = json_decode(wp_remote_retrieve_body($response), true);
178
-        if (filter_var($results['success'], FILTER_VALIDATE_BOOLEAN) !== true) {
179
-            $errors   = array_map(
180
-                array($this, 'getErrorCode'),
181
-                $results['error-codes']
182
-            );
183
-            if (isset($results['challenge_ts'])) {
184
-                $errors[] = 'challenge timestamp: ' . $results['challenge_ts'] . '.';
185
-            }
186
-            $this->generateError(implode(' ', $errors), true);
187
-        }
188
-        $previous_recaptcha_response[ $grecaptcha_response ] = true;
189
-        add_action('shutdown', array($this, 'setSessionData'));
190
-        return true;
191
-    }
126
+	/**
127
+	 * @param RequestInterface $request
128
+	 * @return boolean
129
+	 * @throws InvalidArgumentException
130
+	 * @throws InvalidDataTypeException
131
+	 * @throws InvalidInterfaceException
132
+	 * @throws RuntimeException
133
+	 */
134
+	public function verifyToken(RequestInterface $request)
135
+	{
136
+		static $previous_recaptcha_response = array();
137
+		$grecaptcha_response = $request->getRequestParam('g-recaptcha-response');
138
+		// if this token has already been verified, then return previous response
139
+		if (isset($previous_recaptcha_response[ $grecaptcha_response ])) {
140
+			return $previous_recaptcha_response[ $grecaptcha_response ];
141
+		}
142
+		// still here but no g-recaptcha-response ? - verification failed
143
+		if (! $grecaptcha_response) {
144
+			EE_Error::add_error(
145
+				sprintf(
146
+					/* translators: 1: missing parameter */
147
+					esc_html__(
148
+						// @codingStandardsIgnoreStart
149
+						'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. Missing "%1$s". Please try again.',
150
+						// @codingStandardsIgnoreEnd
151
+						'event_espresso'
152
+					),
153
+					'g-recaptcha-response'
154
+				),
155
+				__FILE__,
156
+				__FUNCTION__,
157
+				__LINE__
158
+			);
159
+			return false;
160
+		}
161
+		// will update to true if everything passes
162
+		$previous_recaptcha_response[ $grecaptcha_response ] = false;
163
+		$response                                            = wp_safe_remote_post(
164
+			InvisibleRecaptcha::URL_GOOGLE_RECAPTCHA_API,
165
+			array(
166
+				'body' => array(
167
+					'secret'   => $this->config->recaptcha_privatekey,
168
+					'response' => $grecaptcha_response,
169
+					'remoteip' => $request->ipAddress(),
170
+				),
171
+			)
172
+		);
173
+		if ($response instanceof WP_Error) {
174
+			$this->generateError($response->get_error_messages());
175
+			return false;
176
+		}
177
+		$results = json_decode(wp_remote_retrieve_body($response), true);
178
+		if (filter_var($results['success'], FILTER_VALIDATE_BOOLEAN) !== true) {
179
+			$errors   = array_map(
180
+				array($this, 'getErrorCode'),
181
+				$results['error-codes']
182
+			);
183
+			if (isset($results['challenge_ts'])) {
184
+				$errors[] = 'challenge timestamp: ' . $results['challenge_ts'] . '.';
185
+			}
186
+			$this->generateError(implode(' ', $errors), true);
187
+		}
188
+		$previous_recaptcha_response[ $grecaptcha_response ] = true;
189
+		add_action('shutdown', array($this, 'setSessionData'));
190
+		return true;
191
+	}
192 192
 
193 193
 
194
-    /**
195
-     * @param string $error_response
196
-     * @param bool   $show_errors
197
-     * @return void
198
-     * @throws RuntimeException
199
-     */
200
-    public function generateError($error_response = '', $show_errors = false)
201
-    {
202
-        throw new RuntimeException(
203
-            sprintf(
204
-                esc_html__(
205
-                    'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. %1$s %2$s Please try again.',
206
-                    'event_espresso'
207
-                ),
208
-                '<br />',
209
-                $show_errors || current_user_can('manage_options') ? $error_response : ''
210
-            )
211
-        );
212
-    }
194
+	/**
195
+	 * @param string $error_response
196
+	 * @param bool   $show_errors
197
+	 * @return void
198
+	 * @throws RuntimeException
199
+	 */
200
+	public function generateError($error_response = '', $show_errors = false)
201
+	{
202
+		throw new RuntimeException(
203
+			sprintf(
204
+				esc_html__(
205
+					'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. %1$s %2$s Please try again.',
206
+					'event_espresso'
207
+				),
208
+				'<br />',
209
+				$show_errors || current_user_can('manage_options') ? $error_response : ''
210
+			)
211
+		);
212
+	}
213 213
 
214 214
 
215
-    /**
216
-     * @param string $error_code
217
-     * @return string
218
-     */
219
-    public function getErrorCode(&$error_code)
220
-    {
221
-        $error_codes = array(
222
-            'missing-input-secret'   => 'The secret parameter is missing.',
223
-            'invalid-input-secret'   => 'The secret parameter is invalid or malformed.',
224
-            'missing-input-response' => 'The response parameter is missing.',
225
-            'invalid-input-response' => 'The response parameter is invalid or malformed.',
226
-            'bad-request'            => 'The request is invalid or malformed.',
227
-            'timeout-or-duplicate'   => 'The request took too long to be sent or was a duplicate of a previous request.',
228
-        );
229
-        return isset($error_codes[ $error_code ]) ? $error_codes[ $error_code ] : '';
230
-    }
215
+	/**
216
+	 * @param string $error_code
217
+	 * @return string
218
+	 */
219
+	public function getErrorCode(&$error_code)
220
+	{
221
+		$error_codes = array(
222
+			'missing-input-secret'   => 'The secret parameter is missing.',
223
+			'invalid-input-secret'   => 'The secret parameter is invalid or malformed.',
224
+			'missing-input-response' => 'The response parameter is missing.',
225
+			'invalid-input-response' => 'The response parameter is invalid or malformed.',
226
+			'bad-request'            => 'The request is invalid or malformed.',
227
+			'timeout-or-duplicate'   => 'The request took too long to be sent or was a duplicate of a previous request.',
228
+		);
229
+		return isset($error_codes[ $error_code ]) ? $error_codes[ $error_code ] : '';
230
+	}
231 231
 
232 232
 
233
-    /**
234
-     * @return array
235
-     * @throws InvalidInterfaceException
236
-     * @throws InvalidDataTypeException
237
-     * @throws InvalidArgumentException
238
-     */
239
-    public function getLocalizedVars()
240
-    {
241
-        return (array) apply_filters(
242
-            'FHEE__EventEspresso_caffeinated_modules_recaptcha_invisible_InvisibleRecaptcha__getLocalizedVars__localized_vars',
243
-            array(
244
-                'siteKey'          => $this->config->recaptcha_publickey,
245
-                'recaptcha_passed' => $this->recaptchaPassed(),
246
-                'wp_debug'         => WP_DEBUG,
247
-                'disable_submit'   => defined('EE_EVENT_QUEUE_BASE_URL'),
248
-                'failed_message'   => wp_strip_all_tags(
249
-                    __(
250
-                        'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. Please try again.',
251
-                        'event_espresso'
252
-                    )
253
-                )
254
-            )
255
-        );
256
-    }
233
+	/**
234
+	 * @return array
235
+	 * @throws InvalidInterfaceException
236
+	 * @throws InvalidDataTypeException
237
+	 * @throws InvalidArgumentException
238
+	 */
239
+	public function getLocalizedVars()
240
+	{
241
+		return (array) apply_filters(
242
+			'FHEE__EventEspresso_caffeinated_modules_recaptcha_invisible_InvisibleRecaptcha__getLocalizedVars__localized_vars',
243
+			array(
244
+				'siteKey'          => $this->config->recaptcha_publickey,
245
+				'recaptcha_passed' => $this->recaptchaPassed(),
246
+				'wp_debug'         => WP_DEBUG,
247
+				'disable_submit'   => defined('EE_EVENT_QUEUE_BASE_URL'),
248
+				'failed_message'   => wp_strip_all_tags(
249
+					__(
250
+						'We\'re sorry but an attempt to verify the form\'s reCAPTCHA has failed. Please try again.',
251
+						'event_espresso'
252
+					)
253
+				)
254
+			)
255
+		);
256
+	}
257 257
 
258 258
 
259
-    /**
260
-     * @return boolean
261
-     * @throws InvalidInterfaceException
262
-     * @throws InvalidDataTypeException
263
-     * @throws InvalidArgumentException
264
-     */
265
-    public function recaptchaPassed()
266
-    {
267
-        if ($this->recaptcha_passed !== null) {
268
-            return $this->recaptcha_passed;
269
-        }
270
-        // logged in means you have already passed a turing test of sorts
271
-        if ($this->useInvisibleRecaptcha() === false || is_user_logged_in()) {
272
-            $this->recaptcha_passed = true;
273
-            return $this->recaptcha_passed;
274
-        }
275
-        // was test already passed?
276
-        $this->recaptcha_passed = filter_var(
277
-            $this->session->get_session_data(
278
-                InvisibleRecaptcha::SESSION_DATA_KEY_RECAPTCHA_PASSED
279
-            ),
280
-            FILTER_VALIDATE_BOOLEAN
281
-        );
282
-        return $this->recaptcha_passed;
283
-    }
259
+	/**
260
+	 * @return boolean
261
+	 * @throws InvalidInterfaceException
262
+	 * @throws InvalidDataTypeException
263
+	 * @throws InvalidArgumentException
264
+	 */
265
+	public function recaptchaPassed()
266
+	{
267
+		if ($this->recaptcha_passed !== null) {
268
+			return $this->recaptcha_passed;
269
+		}
270
+		// logged in means you have already passed a turing test of sorts
271
+		if ($this->useInvisibleRecaptcha() === false || is_user_logged_in()) {
272
+			$this->recaptcha_passed = true;
273
+			return $this->recaptcha_passed;
274
+		}
275
+		// was test already passed?
276
+		$this->recaptcha_passed = filter_var(
277
+			$this->session->get_session_data(
278
+				InvisibleRecaptcha::SESSION_DATA_KEY_RECAPTCHA_PASSED
279
+			),
280
+			FILTER_VALIDATE_BOOLEAN
281
+		);
282
+		return $this->recaptcha_passed;
283
+	}
284 284
 
285 285
 
286
-    /**
287
-     * @throws InvalidArgumentException
288
-     * @throws InvalidDataTypeException
289
-     * @throws InvalidInterfaceException
290
-     */
291
-    public function setSessionData()
292
-    {
293
-        if ($this->session instanceof EE_Session) {
294
-            $this->session->set_session_data([InvisibleRecaptcha::SESSION_DATA_KEY_RECAPTCHA_PASSED => true]);
295
-        }
296
-    }
286
+	/**
287
+	 * @throws InvalidArgumentException
288
+	 * @throws InvalidDataTypeException
289
+	 * @throws InvalidInterfaceException
290
+	 */
291
+	public function setSessionData()
292
+	{
293
+		if ($this->session instanceof EE_Session) {
294
+			$this->session->set_session_data([InvisibleRecaptcha::SESSION_DATA_KEY_RECAPTCHA_PASSED => true]);
295
+		}
296
+	}
297 297
 }
Please login to merge, or discard this patch.
core/services/json/JsonSerializableAndUnserializable.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -15,21 +15,21 @@
 block discarded – undo
15 15
  */
16 16
 interface JsonSerializableAndUnserializable
17 17
 {
18
-    /**
19
-     * Creates a simple PHP array or stdClass from this object's properties, which can be easily serialized using
20
-     * wp_json_serialize().
21
-     * @since 4.9.80.p
22
-     * @return mixed
23
-     */
24
-    public function toJsonSerializableData();
18
+	/**
19
+	 * Creates a simple PHP array or stdClass from this object's properties, which can be easily serialized using
20
+	 * wp_json_serialize().
21
+	 * @since 4.9.80.p
22
+	 * @return mixed
23
+	 */
24
+	public function toJsonSerializableData();
25 25
 
26
-    /**
27
-     * Initializes this object from data
28
-     * @since 4.9.80.p
29
-     * @param mixed $data
30
-     * @return boolean success
31
-     */
32
-    public function fromJsonSerializedData($data);
26
+	/**
27
+	 * Initializes this object from data
28
+	 * @since 4.9.80.p
29
+	 * @param mixed $data
30
+	 * @return boolean success
31
+	 */
32
+	public function fromJsonSerializedData($data);
33 33
 }
34 34
 // End of file JsonSerializableAndUnserializable.php
35 35
 // Location: EventEspresso\core\services\json/JsonSerializableAndUnserializable.php
Please login to merge, or discard this patch.
core/services/options/JsonWpOptionSerializableInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
  */
18 18
 interface JsonWpOptionSerializableInterface extends JsonSerializableAndUnserializable
19 19
 {
20
-    /**
21
-     * Gets the value to use for wp_options.option_name. Note this is not static, so it can use object properties to
22
-     * determine what option name to use.
23
-     * @since 4.9.80.p
24
-     * @return string
25
-     */
26
-    public function getWpOptionName();
20
+	/**
21
+	 * Gets the value to use for wp_options.option_name. Note this is not static, so it can use object properties to
22
+	 * determine what option name to use.
23
+	 * @since 4.9.80.p
24
+	 * @return string
25
+	 */
26
+	public function getWpOptionName();
27 27
 }
28 28
 // End of file JsonWpOptionSerializableInterface.php
29 29
 // Location: EventEspresso\core\services\options/JsonWpOptionSerializableInterface.php
Please login to merge, or discard this patch.
core/domain/Domain.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
      */
64 64
     private function setCaffeinated()
65 65
     {
66
-        $this->caffeinated = (! defined('EE_DECAF') || EE_DECAF !== true)
67
-            && is_readable($this->pluginPath() . 'caffeinated/brewing_regular.php');
66
+        $this->caffeinated = ( ! defined('EE_DECAF') || EE_DECAF !== true)
67
+            && is_readable($this->pluginPath().'caffeinated/brewing_regular.php');
68 68
     }
69 69
 
70 70
 
Please login to merge, or discard this patch.
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -15,87 +15,87 @@
 block discarded – undo
15 15
  */
16 16
 class Domain extends DomainBase implements CaffeinatedInterface
17 17
 {
18
-    /**
19
-     * URL path component used to denote an API request
20
-     */
21
-    const API_NAMESPACE = 'ee/v';
22
-
23
-    const ASSET_NAMESPACE = 'eventespresso';
24
-
25
-    const TEXT_DOMAIN = 'event_espresso';
26
-
27
-    /**
28
-     * Slug used for the context where a registration status is changed from a manual trigger in the Registration Admin
29
-     * Page ui.
30
-     */
31
-    const CONTEXT_REGISTRATION_STATUS_CHANGE_REGISTRATION_ADMIN
32
-        = 'manual_registration_status_change_from_registration_admin';
33
-
34
-    const CONTEXT_REGISTRATION_STATUS_CHANGE_REGISTRATION_ADMIN_NOTIFY
35
-        = 'manual_registration_status_change_from_registration_admin_and_notify';
36
-
37
-
38
-    /**
39
-     * Whether or not EE core is the full premium version.
40
-     * @since 4.9.59.p
41
-     * @var bool
42
-     */
43
-    private $caffeinated;
44
-
45
-    /**
46
-     * @since $VID:$
47
-     * @var bool
48
-     */
49
-    private $multisite;
50
-
51
-
52
-    public function __construct(FilePath $plugin_file, Version $version)
53
-    {
54
-        parent::__construct($plugin_file, $version);
55
-        $this->setCaffeinated();
56
-        $this->multisite = is_multisite();
57
-    }
58
-
59
-    /**
60
-     * Whether or not EE core is the full premium version.
61
-     * @since 4.9.59.p
62
-     * @return bool
63
-     */
64
-    public function isCaffeinated()
65
-    {
66
-        return $this->caffeinated;
67
-    }
68
-
69
-
70
-    /**
71
-     * Setter for $is_caffeinated property.
72
-     * @since 4.9.59.p
73
-     */
74
-    private function setCaffeinated()
75
-    {
76
-        $this->caffeinated = (! defined('EE_DECAF') || EE_DECAF !== true)
77
-            && is_readable($this->pluginPath() . 'caffeinated/brewing_regular.php');
78
-    }
79
-
80
-
81
-    /**
82
-     * This should be used everywhere the Event Espresso brand name is referenced in public facing interfaces
83
-     * to allow for filtering the brand.
84
-     *
85
-     * @return string
86
-     */
87
-    public static function brandName()
88
-    {
89
-        return (string) apply_filters('FHEE__EventEspresso_core_domain_Domain__brandName', 'Event Espresso');
90
-    }
91
-
92
-
93
-    /**
94
-     * @return bool
95
-     * @since $VID:$
96
-     */
97
-    public function isMultiSite(): bool
98
-    {
99
-        return $this->multisite;
100
-    }
18
+	/**
19
+	 * URL path component used to denote an API request
20
+	 */
21
+	const API_NAMESPACE = 'ee/v';
22
+
23
+	const ASSET_NAMESPACE = 'eventespresso';
24
+
25
+	const TEXT_DOMAIN = 'event_espresso';
26
+
27
+	/**
28
+	 * Slug used for the context where a registration status is changed from a manual trigger in the Registration Admin
29
+	 * Page ui.
30
+	 */
31
+	const CONTEXT_REGISTRATION_STATUS_CHANGE_REGISTRATION_ADMIN
32
+		= 'manual_registration_status_change_from_registration_admin';
33
+
34
+	const CONTEXT_REGISTRATION_STATUS_CHANGE_REGISTRATION_ADMIN_NOTIFY
35
+		= 'manual_registration_status_change_from_registration_admin_and_notify';
36
+
37
+
38
+	/**
39
+	 * Whether or not EE core is the full premium version.
40
+	 * @since 4.9.59.p
41
+	 * @var bool
42
+	 */
43
+	private $caffeinated;
44
+
45
+	/**
46
+	 * @since $VID:$
47
+	 * @var bool
48
+	 */
49
+	private $multisite;
50
+
51
+
52
+	public function __construct(FilePath $plugin_file, Version $version)
53
+	{
54
+		parent::__construct($plugin_file, $version);
55
+		$this->setCaffeinated();
56
+		$this->multisite = is_multisite();
57
+	}
58
+
59
+	/**
60
+	 * Whether or not EE core is the full premium version.
61
+	 * @since 4.9.59.p
62
+	 * @return bool
63
+	 */
64
+	public function isCaffeinated()
65
+	{
66
+		return $this->caffeinated;
67
+	}
68
+
69
+
70
+	/**
71
+	 * Setter for $is_caffeinated property.
72
+	 * @since 4.9.59.p
73
+	 */
74
+	private function setCaffeinated()
75
+	{
76
+		$this->caffeinated = (! defined('EE_DECAF') || EE_DECAF !== true)
77
+			&& is_readable($this->pluginPath() . 'caffeinated/brewing_regular.php');
78
+	}
79
+
80
+
81
+	/**
82
+	 * This should be used everywhere the Event Espresso brand name is referenced in public facing interfaces
83
+	 * to allow for filtering the brand.
84
+	 *
85
+	 * @return string
86
+	 */
87
+	public static function brandName()
88
+	{
89
+		return (string) apply_filters('FHEE__EventEspresso_core_domain_Domain__brandName', 'Event Espresso');
90
+	}
91
+
92
+
93
+	/**
94
+	 * @return bool
95
+	 * @since $VID:$
96
+	 */
97
+	public function isMultiSite(): bool
98
+	{
99
+		return $this->multisite;
100
+	}
101 101
 }
Please login to merge, or discard this patch.
admin/new/pricing/help_tabs/pricing_add_new_price_type.help_tab.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 <p><strong><?php esc_html_e('Add New Price Type', 'event_espresso'); ?></strong></p>
5 5
 <p>
6 6
 <?php printf(
7
-    esc_html__('This page allows you to create a new price type for %s.', 'event_espresso'),
8
-    Domain::brandName()
7
+	esc_html__('This page allows you to create a new price type for %s.', 'event_espresso'),
8
+	Domain::brandName()
9 9
 ); ?>
10 10
 </p>
11 11
 <ul>
Please login to merge, or discard this patch.
admin/new/pricing/help_tabs/pricing_edit_default_price.help_tab.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 <p><strong><?php esc_html_e('Edit Default Price', 'event_espresso'); ?></strong></p>
5 5
 <p>
6 6
 <?php printf(
7
-    esc_html__('This page allows you to edit a default price for %s.', 'event_espresso'),
8
-    Domain::brandName()
7
+	esc_html__('This page allows you to edit a default price for %s.', 'event_espresso'),
8
+	Domain::brandName()
9 9
 ); ?>
10 10
 </p>
11 11
 <ul>
Please login to merge, or discard this patch.