Completed
Branch 973/fix-visible-recaptcha (0580c7)
by
unknown
03:03 queued 30s
created
core/services/commands/ticket/CancelTicketLineItemCommandHandler.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -23,36 +23,36 @@
 block discarded – undo
23 23
 {
24 24
 
25 25
 
26
-    /**
27
-     * @var CancelTicketLineItemService $cancel_ticket_line_item_service
28
-     */
29
-    private $cancel_ticket_line_item_service;
30
-
31
-
32
-    /**
33
-     * Command constructor
34
-     *
35
-     * @param CancelTicketLineItemService $cancel_ticket_line_item_service
36
-     */
37
-    public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service)
38
-    {
39
-        $this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service;
40
-    }
41
-
42
-
43
-    /**
44
-     * @param CommandInterface|CancelTicketLineItemCommand $command
45
-     * @return mixed
46
-     * @throws InvalidEntityException
47
-     * @throws RuntimeException
48
-     */
49
-    public function handle(CommandInterface $command)
50
-    {
51
-        return $this->cancel_ticket_line_item_service->cancel(
52
-            $command->transaction(),
53
-            $command->ticket(),
54
-            $command->quantity(),
55
-            $command->ticketLineItem()
56
-        );
57
-    }
26
+	/**
27
+	 * @var CancelTicketLineItemService $cancel_ticket_line_item_service
28
+	 */
29
+	private $cancel_ticket_line_item_service;
30
+
31
+
32
+	/**
33
+	 * Command constructor
34
+	 *
35
+	 * @param CancelTicketLineItemService $cancel_ticket_line_item_service
36
+	 */
37
+	public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service)
38
+	{
39
+		$this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service;
40
+	}
41
+
42
+
43
+	/**
44
+	 * @param CommandInterface|CancelTicketLineItemCommand $command
45
+	 * @return mixed
46
+	 * @throws InvalidEntityException
47
+	 * @throws RuntimeException
48
+	 */
49
+	public function handle(CommandInterface $command)
50
+	{
51
+		return $this->cancel_ticket_line_item_service->cancel(
52
+			$command->transaction(),
53
+			$command->ticket(),
54
+			$command->quantity(),
55
+			$command->ticketLineItem()
56
+		);
57
+	}
58 58
 }
Please login to merge, or discard this patch.
core/services/commands/ticket/CreateTicketLineItemCommandHandler.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -22,37 +22,37 @@
 block discarded – undo
22 22
 {
23 23
 
24 24
 
25
-    /**
26
-     * @var CreateTicketLineItemService $factory
27
-     */
28
-    private $factory;
29
-
30
-
31
-    /**
32
-     * Command constructor
33
-     *
34
-     * @param CreateTicketLineItemService $factory
35
-     */
36
-    public function __construct(CreateTicketLineItemService $factory)
37
-    {
38
-        $this->factory = $factory;
39
-    }
40
-
41
-
42
-    /**
43
-     * @param CommandInterface|CreateTicketLineItemCommand $command
44
-     * @return EE_Line_Item
45
-     * @throws InvalidEntityException
46
-     * @throws UnexpectedEntityException
47
-     * @throws EE_Error
48
-     */
49
-    public function handle(CommandInterface $command)
50
-    {
51
-        // create new line item for ticket
52
-        return $this->factory->create(
53
-            $command->transaction(),
54
-            $command->ticket(),
55
-            $command->quantity()
56
-        );
57
-    }
25
+	/**
26
+	 * @var CreateTicketLineItemService $factory
27
+	 */
28
+	private $factory;
29
+
30
+
31
+	/**
32
+	 * Command constructor
33
+	 *
34
+	 * @param CreateTicketLineItemService $factory
35
+	 */
36
+	public function __construct(CreateTicketLineItemService $factory)
37
+	{
38
+		$this->factory = $factory;
39
+	}
40
+
41
+
42
+	/**
43
+	 * @param CommandInterface|CreateTicketLineItemCommand $command
44
+	 * @return EE_Line_Item
45
+	 * @throws InvalidEntityException
46
+	 * @throws UnexpectedEntityException
47
+	 * @throws EE_Error
48
+	 */
49
+	public function handle(CommandInterface $command)
50
+	{
51
+		// create new line item for ticket
52
+		return $this->factory->create(
53
+			$command->transaction(),
54
+			$command->ticket(),
55
+			$command->quantity()
56
+		);
57
+	}
58 58
 }
Please login to merge, or discard this patch.
core/services/commands/registration/CreateRegistrationCommandHandler.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -21,42 +21,42 @@
 block discarded – undo
21 21
 class CreateRegistrationCommandHandler extends CommandHandler
22 22
 {
23 23
 
24
-    /**
25
-     * @var CreateRegistrationService $registration_service
26
-     */
27
-    private $registration_service;
28
-
29
-
30
-    /**
31
-     * Command constructor
32
-     *
33
-     * @param CreateRegistrationService $registration_service
34
-     */
35
-    public function __construct(CreateRegistrationService $registration_service)
36
-    {
37
-        $this->registration_service = $registration_service;
38
-    }
39
-
40
-
41
-    /**
42
-     * @param  CommandInterface|CreateRegistrationCommand $command
43
-     * @return mixed
44
-     * @throws OutOfRangeException
45
-     * @throws UnexpectedEntityException
46
-     * @throws EE_Error
47
-     * @throws InvalidEntityException
48
-     */
49
-    public function handle(CommandInterface $command)
50
-    {
51
-        // now create a new registration for the ticket
52
-        return $this->registration_service->create(
53
-            $command->ticket()->get_related_event(),
54
-            $command->transaction(),
55
-            $command->ticket(),
56
-            $command->ticketLineItem(),
57
-            $command->regCount(),
58
-            $command->regGroupSize(),
59
-            $command->regStatus()
60
-        );
61
-    }
24
+	/**
25
+	 * @var CreateRegistrationService $registration_service
26
+	 */
27
+	private $registration_service;
28
+
29
+
30
+	/**
31
+	 * Command constructor
32
+	 *
33
+	 * @param CreateRegistrationService $registration_service
34
+	 */
35
+	public function __construct(CreateRegistrationService $registration_service)
36
+	{
37
+		$this->registration_service = $registration_service;
38
+	}
39
+
40
+
41
+	/**
42
+	 * @param  CommandInterface|CreateRegistrationCommand $command
43
+	 * @return mixed
44
+	 * @throws OutOfRangeException
45
+	 * @throws UnexpectedEntityException
46
+	 * @throws EE_Error
47
+	 * @throws InvalidEntityException
48
+	 */
49
+	public function handle(CommandInterface $command)
50
+	{
51
+		// now create a new registration for the ticket
52
+		return $this->registration_service->create(
53
+			$command->ticket()->get_related_event(),
54
+			$command->transaction(),
55
+			$command->ticket(),
56
+			$command->ticketLineItem(),
57
+			$command->regCount(),
58
+			$command->regGroupSize(),
59
+			$command->regStatus()
60
+		);
61
+	}
62 62
 }
Please login to merge, or discard this patch.
registration/UpdateRegistrationAndTransactionAfterChangeCommandHandler.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -19,31 +19,31 @@
 block discarded – undo
19 19
 {
20 20
 
21 21
 
22
-    /**
23
-     * @var UpdateRegistrationService $update_registration_service
24
-     */
25
-    private $update_registration_service;
26
-
27
-
28
-    /**
29
-     * Command constructor
30
-     *
31
-     * @param UpdateRegistrationService $update_registration_service
32
-     */
33
-    public function __construct(
34
-        UpdateRegistrationService $update_registration_service
35
-    ) {
36
-        $this->update_registration_service = $update_registration_service;
37
-    }
38
-
39
-
40
-    /**
41
-     * @param CommandInterface|UpdateRegistrationAndTransactionAfterChangeCommand $command
42
-     * @return boolean
43
-     * @throws InvalidEntityException
44
-     */
45
-    public function handle(CommandInterface $command)
46
-    {
47
-        return $this->update_registration_service->updateRegistrationAndTransaction($command->registration());
48
-    }
22
+	/**
23
+	 * @var UpdateRegistrationService $update_registration_service
24
+	 */
25
+	private $update_registration_service;
26
+
27
+
28
+	/**
29
+	 * Command constructor
30
+	 *
31
+	 * @param UpdateRegistrationService $update_registration_service
32
+	 */
33
+	public function __construct(
34
+		UpdateRegistrationService $update_registration_service
35
+	) {
36
+		$this->update_registration_service = $update_registration_service;
37
+	}
38
+
39
+
40
+	/**
41
+	 * @param CommandInterface|UpdateRegistrationAndTransactionAfterChangeCommand $command
42
+	 * @return boolean
43
+	 * @throws InvalidEntityException
44
+	 */
45
+	public function handle(CommandInterface $command)
46
+	{
47
+		return $this->update_registration_service->updateRegistrationAndTransaction($command->registration());
48
+	}
49 49
 }
Please login to merge, or discard this patch.
services/commands/registration/CopyRegistrationPaymentsCommandHandler.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -23,35 +23,35 @@
 block discarded – undo
23 23
 {
24 24
 
25 25
 
26
-    /**
27
-     * @var CopyRegistrationService $copy_registration_service
28
-     */
29
-    private $copy_registration_service;
30
-
31
-
32
-    /**
33
-     * Command constructor
34
-     *
35
-     * @param CopyRegistrationService $copy_registration_service
36
-     */
37
-    public function __construct(CopyRegistrationService $copy_registration_service)
38
-    {
39
-        $this->copy_registration_service = $copy_registration_service;
40
-    }
41
-
42
-
43
-    /**
44
-     * @param CommandInterface|CopyRegistrationPaymentsCommand $command
45
-     * @return boolean
46
-     * @throws EE_Error
47
-     * @throws UnexpectedEntityException
48
-     * @throws RuntimeException
49
-     */
50
-    public function handle(CommandInterface $command)
51
-    {
52
-        return $this->copy_registration_service->copyPaymentDetails(
53
-            $command->targetRegistration(),
54
-            $command->registrationToCopy()
55
-        );
56
-    }
26
+	/**
27
+	 * @var CopyRegistrationService $copy_registration_service
28
+	 */
29
+	private $copy_registration_service;
30
+
31
+
32
+	/**
33
+	 * Command constructor
34
+	 *
35
+	 * @param CopyRegistrationService $copy_registration_service
36
+	 */
37
+	public function __construct(CopyRegistrationService $copy_registration_service)
38
+	{
39
+		$this->copy_registration_service = $copy_registration_service;
40
+	}
41
+
42
+
43
+	/**
44
+	 * @param CommandInterface|CopyRegistrationPaymentsCommand $command
45
+	 * @return boolean
46
+	 * @throws EE_Error
47
+	 * @throws UnexpectedEntityException
48
+	 * @throws RuntimeException
49
+	 */
50
+	public function handle(CommandInterface $command)
51
+	{
52
+		return $this->copy_registration_service->copyPaymentDetails(
53
+			$command->targetRegistration(),
54
+			$command->registrationToCopy()
55
+		);
56
+	}
57 57
 }
Please login to merge, or discard this patch.
commands/registration/CancelRegistrationAndTicketLineItemCommandHandler.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -28,43 +28,43 @@
 block discarded – undo
28 28
 {
29 29
 
30 30
 
31
-    /**
32
-     * @var CancelTicketLineItemService $cancel_ticket_line_item_service
33
-     */
34
-    private $cancel_ticket_line_item_service;
31
+	/**
32
+	 * @var CancelTicketLineItemService $cancel_ticket_line_item_service
33
+	 */
34
+	private $cancel_ticket_line_item_service;
35 35
 
36 36
 
37
-    /**
38
-     * Command constructor
39
-     *
40
-     * @param CancelTicketLineItemService $cancel_ticket_line_item_service
41
-     */
42
-    public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service)
43
-    {
44
-        $this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service;
45
-    }
37
+	/**
38
+	 * Command constructor
39
+	 *
40
+	 * @param CancelTicketLineItemService $cancel_ticket_line_item_service
41
+	 */
42
+	public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service)
43
+	{
44
+		$this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service;
45
+	}
46 46
 
47 47
 
48
-    /**
49
-     * @param CommandInterface|CancelRegistrationAndTicketLineItemCommand $command
50
-     * @return boolean
51
-     * @throws DomainException
52
-     * @throws EE_Error
53
-     * @throws EntityNotFoundException
54
-     * @throws InvalidDataTypeException
55
-     * @throws InvalidInterfaceException
56
-     * @throws UnexpectedEntityException
57
-     * @throws InvalidArgumentException
58
-     * @throws ReflectionException
59
-     * @throws RuntimeException
60
-     */
61
-    public function handle(CommandInterface $command)
62
-    {
63
-        $registration = $command->registration();
64
-        $this->cancel_ticket_line_item_service->forRegistration($registration);
65
-        // cancel original registration
66
-        $registration->set_status(EEM_Registration::status_id_cancelled);
67
-        $registration->save();
68
-        return true;
69
-    }
48
+	/**
49
+	 * @param CommandInterface|CancelRegistrationAndTicketLineItemCommand $command
50
+	 * @return boolean
51
+	 * @throws DomainException
52
+	 * @throws EE_Error
53
+	 * @throws EntityNotFoundException
54
+	 * @throws InvalidDataTypeException
55
+	 * @throws InvalidInterfaceException
56
+	 * @throws UnexpectedEntityException
57
+	 * @throws InvalidArgumentException
58
+	 * @throws ReflectionException
59
+	 * @throws RuntimeException
60
+	 */
61
+	public function handle(CommandInterface $command)
62
+	{
63
+		$registration = $command->registration();
64
+		$this->cancel_ticket_line_item_service->forRegistration($registration);
65
+		// cancel original registration
66
+		$registration->set_status(EEM_Registration::status_id_cancelled);
67
+		$registration->save();
68
+		return true;
69
+	}
70 70
 }
Please login to merge, or discard this patch.
services/commands/registration/CopyRegistrationDetailsCommandHandler.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -24,37 +24,37 @@
 block discarded – undo
24 24
 {
25 25
 
26 26
 
27
-    /**
28
-     * @var CopyRegistrationService $copy_registration_service
29
-     */
30
-    private $copy_registration_service;
31
-
32
-
33
-    /**
34
-     * Command constructor
35
-     *
36
-     * @param CopyRegistrationService $copy_registration_service
37
-     */
38
-    public function __construct(CopyRegistrationService $copy_registration_service)
39
-    {
40
-        $this->copy_registration_service = $copy_registration_service;
41
-    }
42
-
43
-
44
-    /**
45
-     * @param CommandInterface|CopyRegistrationDetailsCommand $command
46
-     * @return boolean
47
-     * @throws InvalidEntityException
48
-     * @throws EE_Error
49
-     * @throws EntityNotFoundException
50
-     * @throws UnexpectedEntityException
51
-     * @throws RuntimeException
52
-     */
53
-    public function handle(CommandInterface $command)
54
-    {
55
-        return $this->copy_registration_service->copyRegistrationDetails(
56
-            $command->targetRegistration(),
57
-            $command->registrationToCopy()
58
-        );
59
-    }
27
+	/**
28
+	 * @var CopyRegistrationService $copy_registration_service
29
+	 */
30
+	private $copy_registration_service;
31
+
32
+
33
+	/**
34
+	 * Command constructor
35
+	 *
36
+	 * @param CopyRegistrationService $copy_registration_service
37
+	 */
38
+	public function __construct(CopyRegistrationService $copy_registration_service)
39
+	{
40
+		$this->copy_registration_service = $copy_registration_service;
41
+	}
42
+
43
+
44
+	/**
45
+	 * @param CommandInterface|CopyRegistrationDetailsCommand $command
46
+	 * @return boolean
47
+	 * @throws InvalidEntityException
48
+	 * @throws EE_Error
49
+	 * @throws EntityNotFoundException
50
+	 * @throws UnexpectedEntityException
51
+	 * @throws RuntimeException
52
+	 */
53
+	public function handle(CommandInterface $command)
54
+	{
55
+		return $this->copy_registration_service->copyRegistrationDetails(
56
+			$command->targetRegistration(),
57
+			$command->registrationToCopy()
58
+		);
59
+	}
60 60
 }
Please login to merge, or discard this patch.
core/services/commands/CommandBus.php 2 patches
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -34,74 +34,74 @@
 block discarded – undo
34 34
 class CommandBus implements CommandBusInterface
35 35
 {
36 36
 
37
-    /**
38
-     * @type CommandHandlerManagerInterface $command_handler_manager
39
-     */
40
-    private $command_handler_manager;
37
+	/**
38
+	 * @type CommandHandlerManagerInterface $command_handler_manager
39
+	 */
40
+	private $command_handler_manager;
41 41
 
42
-    /**
43
-     * @type CommandBusMiddlewareInterface[] $command_bus_middleware
44
-     */
45
-    private $command_bus_middleware;
42
+	/**
43
+	 * @type CommandBusMiddlewareInterface[] $command_bus_middleware
44
+	 */
45
+	private $command_bus_middleware;
46 46
 
47 47
 
48
-    /**
49
-     * CommandBus constructor
50
-     *
51
-     * @param CommandHandlerManagerInterface  $command_handler_manager
52
-     * @param CommandBusMiddlewareInterface[] $command_bus_middleware
53
-     */
54
-    public function __construct(
55
-        CommandHandlerManagerInterface $command_handler_manager,
56
-        array $command_bus_middleware = array()
57
-    ) {
58
-        $this->command_handler_manager = $command_handler_manager;
59
-        $this->command_bus_middleware = is_array($command_bus_middleware)
60
-            ? $command_bus_middleware
61
-            : array($command_bus_middleware);
62
-    }
48
+	/**
49
+	 * CommandBus constructor
50
+	 *
51
+	 * @param CommandHandlerManagerInterface  $command_handler_manager
52
+	 * @param CommandBusMiddlewareInterface[] $command_bus_middleware
53
+	 */
54
+	public function __construct(
55
+		CommandHandlerManagerInterface $command_handler_manager,
56
+		array $command_bus_middleware = array()
57
+	) {
58
+		$this->command_handler_manager = $command_handler_manager;
59
+		$this->command_bus_middleware = is_array($command_bus_middleware)
60
+			? $command_bus_middleware
61
+			: array($command_bus_middleware);
62
+	}
63 63
 
64 64
 
65
-    /**
66
-     * @return CommandHandlerManagerInterface
67
-     */
68
-    public function getCommandHandlerManager()
69
-    {
70
-        return $this->command_handler_manager;
71
-    }
65
+	/**
66
+	 * @return CommandHandlerManagerInterface
67
+	 */
68
+	public function getCommandHandlerManager()
69
+	{
70
+		return $this->command_handler_manager;
71
+	}
72 72
 
73 73
 
74
-    /**
75
-     * @param CommandInterface $command
76
-     * @return mixed
77
-     * @throws InvalidDataTypeException
78
-     * @throws InvalidCommandBusMiddlewareException
79
-     */
80
-    public function execute($command)
81
-    {
82
-        if (! $command instanceof CommandInterface) {
83
-            throw new InvalidDataTypeException(__METHOD__ . '( $command )', $command, 'CommandInterface');
84
-        }
85
-        // we're going to add the Command Handler as a callable
86
-        // that will get run at the end of our middleware stack
87
-        // can't pass $this to a Closure, so use a named variable
88
-        $command_bus = $this;
89
-        $middleware = static function ($command) use ($command_bus) {
90
-            return $command_bus->getCommandHandlerManager()
91
-                               ->getCommandHandler($command, $command_bus)
92
-                               ->verify($command)
93
-                               ->handle($command);
94
-        };
95
-        // now build the rest of the middleware stack
96
-        while ($command_bus_middleware = array_pop($this->command_bus_middleware)) {
97
-            if (! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
98
-                throw new InvalidCommandBusMiddlewareException($command_bus_middleware);
99
-            }
100
-            $middleware = static function ($command) use ($command_bus_middleware, $middleware) {
101
-                return $command_bus_middleware->handle($command, $middleware);
102
-            };
103
-        }
104
-        // and finally, pass the command into the stack and return the results
105
-        return $middleware($command);
106
-    }
74
+	/**
75
+	 * @param CommandInterface $command
76
+	 * @return mixed
77
+	 * @throws InvalidDataTypeException
78
+	 * @throws InvalidCommandBusMiddlewareException
79
+	 */
80
+	public function execute($command)
81
+	{
82
+		if (! $command instanceof CommandInterface) {
83
+			throw new InvalidDataTypeException(__METHOD__ . '( $command )', $command, 'CommandInterface');
84
+		}
85
+		// we're going to add the Command Handler as a callable
86
+		// that will get run at the end of our middleware stack
87
+		// can't pass $this to a Closure, so use a named variable
88
+		$command_bus = $this;
89
+		$middleware = static function ($command) use ($command_bus) {
90
+			return $command_bus->getCommandHandlerManager()
91
+							   ->getCommandHandler($command, $command_bus)
92
+							   ->verify($command)
93
+							   ->handle($command);
94
+		};
95
+		// now build the rest of the middleware stack
96
+		while ($command_bus_middleware = array_pop($this->command_bus_middleware)) {
97
+			if (! $command_bus_middleware instanceof CommandBusMiddlewareInterface) {
98
+				throw new InvalidCommandBusMiddlewareException($command_bus_middleware);
99
+			}
100
+			$middleware = static function ($command) use ($command_bus_middleware, $middleware) {
101
+				return $command_bus_middleware->handle($command, $middleware);
102
+			};
103
+		}
104
+		// and finally, pass the command into the stack and return the results
105
+		return $middleware($command);
106
+	}
107 107
 }
Please login to merge, or discard this patch.
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.
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
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 $stages = glob(EE_CORE . 'data_migration_scripts/4_7_0_stages/*');
20 20
 $class_to_filepath = array();
21 21
 foreach ($stages as $filepath) {
22
-    $matches = array();
23
-    preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
24
-    $class_to_filepath[ $matches[1] ] = $filepath;
22
+	$matches = array();
23
+	preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
24
+	$class_to_filepath[ $matches[1] ] = $filepath;
25 25
 }
26 26
 // give addons a chance to autoload their stages too
27 27
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages', $class_to_filepath);
@@ -40,72 +40,72 @@  discard block
 block discarded – undo
40 40
 class EE_DMS_Core_4_7_0 extends EE_Data_Migration_Script_Base
41 41
 {
42 42
 
43
-    /**
44
-     * return EE_DMS_Core_4_7_0
45
-     *
46
-     * @param TableManager  $table_manager
47
-     * @param TableAnalysis $table_analysis
48
-     */
49
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
50
-    {
51
-        $this->_pretty_name = esc_html__("Data Update to Event Espresso 4.7.0", "event_espresso");
52
-        $this->_priority = 10;
53
-        $this->_migration_stages = array(
54
-            new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
55
-            new EE_DMS_4_7_0_Registration_Payments(),
56
-        );
57
-        parent::__construct($table_manager, $table_analysis);
58
-    }
43
+	/**
44
+	 * return EE_DMS_Core_4_7_0
45
+	 *
46
+	 * @param TableManager  $table_manager
47
+	 * @param TableAnalysis $table_analysis
48
+	 */
49
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
50
+	{
51
+		$this->_pretty_name = esc_html__("Data Update to Event Espresso 4.7.0", "event_espresso");
52
+		$this->_priority = 10;
53
+		$this->_migration_stages = array(
54
+			new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
55
+			new EE_DMS_4_7_0_Registration_Payments(),
56
+		);
57
+		parent::__construct($table_manager, $table_analysis);
58
+	}
59 59
 
60 60
 
61 61
 
62
-    /**
63
-     * @param array $version_array
64
-     * @return bool
65
-     */
66
-    public function can_migrate_from_version($version_array)
67
-    {
68
-        $version_string = $version_array['Core'];
69
-        if (
70
-            (
71
-                version_compare($version_string, '4.7.0.decaf', '<')
72
-                && version_compare($version_string, '4.6.0.decaf', '>=')
73
-            )
74
-            || (
75
-                version_compare($version_string, '4.7.0.decaf', '>=')
76
-                && ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
77
-                && $this->_get_table_analysis()->tableExists('esp_registration')
78
-            )
79
-        ) {
80
-            return true;
81
-        } elseif (! $version_string) {
82
-            // no version string provided... this must be pre 4.3
83
-            return false;// changed mind. dont want people thinking they should migrate yet because they cant
84
-        } else {
85
-            return false;
86
-        }
87
-    }
62
+	/**
63
+	 * @param array $version_array
64
+	 * @return bool
65
+	 */
66
+	public function can_migrate_from_version($version_array)
67
+	{
68
+		$version_string = $version_array['Core'];
69
+		if (
70
+			(
71
+				version_compare($version_string, '4.7.0.decaf', '<')
72
+				&& version_compare($version_string, '4.6.0.decaf', '>=')
73
+			)
74
+			|| (
75
+				version_compare($version_string, '4.7.0.decaf', '>=')
76
+				&& ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
77
+				&& $this->_get_table_analysis()->tableExists('esp_registration')
78
+			)
79
+		) {
80
+			return true;
81
+		} elseif (! $version_string) {
82
+			// no version string provided... this must be pre 4.3
83
+			return false;// changed mind. dont want people thinking they should migrate yet because they cant
84
+		} else {
85
+			return false;
86
+		}
87
+	}
88 88
 
89 89
 
90 90
 
91
-    /**
92
-     * @return bool
93
-     */
94
-    public function schema_changes_before_migration()
95
-    {
96
-        // relies on 4.1's EEH_Activation::create_table
97
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
98
-        $table_name = 'esp_answer';
99
-        $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
91
+	/**
92
+	 * @return bool
93
+	 */
94
+	public function schema_changes_before_migration()
95
+	{
96
+		// relies on 4.1's EEH_Activation::create_table
97
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
98
+		$table_name = 'esp_answer';
99
+		$sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
100 100
 					REG_ID int(10) unsigned NOT NULL,
101 101
 					QST_ID int(10) unsigned NOT NULL,
102 102
 					ANS_value text NOT NULL,
103 103
 					PRIMARY KEY  (ANS_ID),
104 104
 					KEY REG_ID (REG_ID),
105 105
 					KEY QST_ID (QST_ID)";
106
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
107
-        $table_name = 'esp_attendee_meta';
108
-        $sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
106
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
107
+		$table_name = 'esp_attendee_meta';
108
+		$sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
109 109
 						ATT_ID bigint(20) unsigned NOT NULL,
110 110
 						ATT_fname varchar(45) NOT NULL,
111 111
 						ATT_lname varchar(45) NOT	NULL,
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 								KEY ATT_email (ATT_email(191)),
123 123
 								KEY ATT_lname (ATT_lname),
124 124
 								KEY ATT_fname (ATT_fname)";
125
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
126
-        $table_name = 'esp_country';
127
-        $sql = "CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
125
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
126
+		$table_name = 'esp_country';
127
+		$sql = "CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
128 128
 					  CNT_ISO3 varchar(3) COLLATE utf8_bin NOT NULL,
129 129
 					  RGN_ID tinyint(3) unsigned DEFAULT NULL,
130 130
 					  CNT_name varchar(45) COLLATE utf8_bin NOT NULL,
@@ -140,25 +140,25 @@  discard block
 block discarded – undo
140 140
 					  CNT_is_EU tinyint(1) DEFAULT '0',
141 141
 					  CNT_active tinyint(1) DEFAULT '0',
142 142
 					  PRIMARY KEY  (CNT_ISO)";
143
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
144
-        $table_name = 'esp_currency';
145
-        $sql = "CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
143
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
144
+		$table_name = 'esp_currency';
145
+		$sql = "CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
146 146
 				CUR_single varchar(45) COLLATE utf8_bin DEFAULT 'dollar',
147 147
 				CUR_plural varchar(45) COLLATE utf8_bin DEFAULT 'dollars',
148 148
 				CUR_sign varchar(45) COLLATE utf8_bin DEFAULT '$',
149 149
 				CUR_dec_plc varchar(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
150 150
 				CUR_active tinyint(1) DEFAULT '0',
151 151
 				PRIMARY KEY  (CUR_code)";
152
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
153
-        $table_name = 'esp_currency_payment_method';
154
-        $sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
152
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
153
+		$table_name = 'esp_currency_payment_method';
154
+		$sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
155 155
 				CUR_code varchar(6) COLLATE utf8_bin NOT NULL,
156 156
 				PMD_ID int(11) NOT NULL,
157 157
 				PRIMARY KEY  (CPM_ID),
158 158
 				KEY PMD_ID (PMD_ID)";
159
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
160
-        $table_name = 'esp_datetime';
161
-        $sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
159
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
160
+		$table_name = 'esp_datetime';
161
+		$sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
162 162
 				  EVT_ID bigint(20) unsigned NOT NULL,
163 163
 				  DTT_name varchar(255) NOT NULL DEFAULT '',
164 164
 				  DTT_description text NOT NULL,
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 						KEY DTT_EVT_start (DTT_EVT_start),
175 175
 						KEY EVT_ID (EVT_ID),
176 176
 						KEY DTT_is_primary (DTT_is_primary)";
177
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
178
-        $table_name = 'esp_event_meta';
179
-        $sql = "
177
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
178
+		$table_name = 'esp_event_meta';
179
+		$sql = "
180 180
 			EVTM_ID int(10) NOT NULL AUTO_INCREMENT,
181 181
 			EVT_ID bigint(20) unsigned NOT NULL,
182 182
 			EVT_display_desc tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -192,34 +192,34 @@  discard block
 block discarded – undo
192 192
 			EVT_donations tinyint(1) NULL,
193 193
 			PRIMARY KEY  (EVTM_ID),
194 194
 			KEY EVT_ID (EVT_ID)";
195
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
196
-        $table_name = 'esp_event_question_group';
197
-        $sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
195
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
196
+		$table_name = 'esp_event_question_group';
197
+		$sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
198 198
 					EVT_ID bigint(20) unsigned NOT NULL,
199 199
 					QSG_ID int(10) unsigned NOT NULL,
200 200
 					EQG_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
201 201
 					PRIMARY KEY  (EQG_ID),
202 202
 					KEY EVT_ID (EVT_ID),
203 203
 					KEY QSG_ID (QSG_ID)";
204
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
205
-        $table_name = 'esp_event_venue';
206
-        $sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
204
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
205
+		$table_name = 'esp_event_venue';
206
+		$sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
207 207
 				EVT_ID bigint(20) unsigned NOT NULL,
208 208
 				VNU_ID bigint(20) unsigned NOT NULL,
209 209
 				EVV_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
210 210
 				PRIMARY KEY  (EVV_ID)";
211
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
212
-        $table_name = 'esp_extra_meta';
213
-        $sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
211
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
212
+		$table_name = 'esp_extra_meta';
213
+		$sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
214 214
 				OBJ_ID int(11) DEFAULT NULL,
215 215
 				EXM_type varchar(45) DEFAULT NULL,
216 216
 				EXM_key varchar(45) DEFAULT NULL,
217 217
 				EXM_value text,
218 218
 				PRIMARY KEY  (EXM_ID),
219 219
 				KEY EXM_type (EXM_type, OBJ_ID, EXM_key(45))";
220
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
221
-        $table_name = 'esp_line_item';
222
-        $sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
220
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
221
+		$table_name = 'esp_line_item';
222
+		$sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
223 223
 				LIN_code varchar(245) NOT NULL DEFAULT '',
224 224
 				TXN_ID int(11) DEFAULT NULL,
225 225
 				LIN_name varchar(245) NOT NULL DEFAULT '',
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
 				PRIMARY KEY  (LIN_ID),
238 238
 				KEY LIN_code (LIN_code(191)),
239 239
 				KEY TXN_ID (TXN_ID)";
240
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
241
-        $table_name = 'esp_log';
242
-        $sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
240
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
241
+		$table_name = 'esp_log';
242
+		$sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
243 243
 				LOG_time datetime DEFAULT NULL,
244 244
 				OBJ_ID varchar(45) DEFAULT NULL,
245 245
 				OBJ_type varchar(45) DEFAULT NULL,
@@ -250,18 +250,18 @@  discard block
 block discarded – undo
250 250
 				KEY LOG_time (LOG_time),
251 251
 				KEY OBJ (OBJ_type,OBJ_ID),
252 252
 				KEY LOG_type (LOG_type)";
253
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
254
-        $table_name = 'esp_message_template';
255
-        $sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
253
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
254
+		$table_name = 'esp_message_template';
255
+		$sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
256 256
 					GRP_ID int(10) unsigned NOT NULL,
257 257
 					MTP_context varchar(50) NOT NULL,
258 258
 					MTP_template_field varchar(30) NOT NULL,
259 259
 					MTP_content text NOT NULL,
260 260
 					PRIMARY KEY  (MTP_ID),
261 261
 					KEY GRP_ID (GRP_ID)";
262
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
263
-        $table_name = 'esp_message_template_group';
264
-        $sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
262
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
263
+		$table_name = 'esp_message_template_group';
264
+		$sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
265 265
 					MTP_user_id int(10) NOT NULL DEFAULT '1',
266 266
 					MTP_name varchar(245) NOT NULL DEFAULT '',
267 267
 					MTP_description varchar(245) NOT NULL DEFAULT '',
@@ -273,17 +273,17 @@  discard block
 block discarded – undo
273 273
 					MTP_is_active tinyint(1) NOT NULL DEFAULT '1',
274 274
 					PRIMARY KEY  (GRP_ID),
275 275
 					KEY MTP_user_id (MTP_user_id)";
276
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
277
-        $table_name = 'esp_event_message_template';
278
-        $sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
276
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
277
+		$table_name = 'esp_event_message_template';
278
+		$sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
279 279
 					EVT_ID bigint(20) unsigned NOT NULL DEFAULT 0,
280 280
 					GRP_ID int(10) unsigned NOT NULL DEFAULT 0,
281 281
 					PRIMARY KEY  (EMT_ID),
282 282
 					KEY EVT_ID (EVT_ID),
283 283
 					KEY GRP_ID (GRP_ID)";
284
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
285
-        $table_name = 'esp_payment';
286
-        $sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
284
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
285
+		$table_name = 'esp_payment';
286
+		$sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
287 287
 					TXN_ID int(10) unsigned DEFAULT NULL,
288 288
 					STS_ID varchar(3) COLLATE utf8_bin DEFAULT NULL,
289 289
 					PAY_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 					PRIMARY KEY  (PAY_ID),
301 301
 					KEY PAY_timestamp (PAY_timestamp),
302 302
 					KEY TXN_ID (TXN_ID)";
303
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
304
-        $table_name = 'esp_payment_method';
305
-        $sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
303
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
304
+		$table_name = 'esp_payment_method';
305
+		$sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
306 306
 				PMD_type varchar(124) DEFAULT NULL,
307 307
 				PMD_name varchar(255) DEFAULT NULL,
308 308
 				PMD_desc text,
@@ -318,32 +318,32 @@  discard block
 block discarded – undo
318 318
 				PRIMARY KEY  (PMD_ID),
319 319
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug),
320 320
 				KEY PMD_type (PMD_type)";
321
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
322
-        $table_name = "esp_ticket_price";
323
-        $sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
321
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
322
+		$table_name = "esp_ticket_price";
323
+		$sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
324 324
 					  TKT_ID int(10) unsigned NOT NULL,
325 325
 					  PRC_ID int(10) unsigned NOT NULL,
326 326
 					  PRIMARY KEY  (TKP_ID),
327 327
 					  KEY TKT_ID (TKT_ID),
328 328
 					  KEY PRC_ID (PRC_ID)";
329
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
330
-        $table_name = "esp_datetime_ticket";
331
-        $sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
329
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
330
+		$table_name = "esp_datetime_ticket";
331
+		$sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
332 332
 					  DTT_ID int(10) unsigned NOT NULL,
333 333
 					  TKT_ID int(10) unsigned NOT NULL,
334 334
 					  PRIMARY KEY  (DTK_ID),
335 335
 					  KEY DTT_ID (DTT_ID),
336 336
 					  KEY TKT_ID (TKT_ID)";
337
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
338
-        $table_name = "esp_ticket_template";
339
-        $sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
337
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
338
+		$table_name = "esp_ticket_template";
339
+		$sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
340 340
 					  TTM_name varchar(45) NOT NULL,
341 341
 					  TTM_description text,
342 342
 					  TTM_file varchar(45),
343 343
 					  PRIMARY KEY  (TTM_ID)";
344
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
345
-        $table_name = 'esp_question';
346
-        $sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
344
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
345
+		$table_name = 'esp_question';
346
+		$sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
347 347
 					QST_display_text text NOT NULL,
348 348
 					QST_admin_label varchar(255) NOT NULL,
349 349
 					QST_system varchar(25) DEFAULT NULL,
@@ -356,18 +356,18 @@  discard block
 block discarded – undo
356 356
 					QST_deleted tinyint(2) unsigned NOT NULL DEFAULT 0,
357 357
 					PRIMARY KEY  (QST_ID),
358 358
 					KEY QST_order (QST_order)';
359
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
360
-        $table_name = 'esp_question_group_question';
361
-        $sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
359
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
360
+		$table_name = 'esp_question_group_question';
361
+		$sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
362 362
 					QSG_ID int(10) unsigned NOT NULL,
363 363
 					QST_ID int(10) unsigned NOT NULL,
364 364
 					QGQ_order int(10) unsigned NOT NULL DEFAULT 0,
365 365
 					PRIMARY KEY  (QGQ_ID),
366 366
 					KEY QST_ID (QST_ID),
367 367
 					KEY QSG_ID_order (QSG_ID, QGQ_order)";
368
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
369
-        $table_name = 'esp_question_option';
370
-        $sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
368
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
369
+		$table_name = 'esp_question_option';
370
+		$sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
371 371
 					QSO_value varchar(255) NOT NULL,
372 372
 					QSO_desc text NOT NULL,
373 373
 					QST_ID int(10) unsigned NOT NULL,
@@ -376,9 +376,9 @@  discard block
 block discarded – undo
376 376
 					PRIMARY KEY  (QSO_ID),
377 377
 					KEY QST_ID (QST_ID),
378 378
 					KEY QSO_order (QSO_order)";
379
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
380
-        $table_name = 'esp_registration';
381
-        $sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
379
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
380
+		$table_name = 'esp_registration';
381
+		$sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
382 382
 					  EVT_ID bigint(20) unsigned NOT NULL,
383 383
 					  ATT_ID bigint(20) unsigned NOT NULL,
384 384
 					  TXN_ID int(10) unsigned NOT NULL,
@@ -402,18 +402,18 @@  discard block
 block discarded – undo
402 402
 					  KEY TKT_ID (TKT_ID),
403 403
 					  KEY EVT_ID (EVT_ID),
404 404
 					  KEY STS_ID (STS_ID)";
405
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
406
-        $table_name = 'esp_registration_payment';
407
-        $sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
405
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
406
+		$table_name = 'esp_registration_payment';
407
+		$sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
408 408
 					  REG_ID int(10) unsigned NOT NULL,
409 409
 					  PAY_ID int(10) unsigned NULL,
410 410
 					  RPY_amount decimal(10,3) NOT NULL DEFAULT '0.00',
411 411
 					  PRIMARY KEY  (RPY_ID),
412 412
 					  KEY REG_ID (REG_ID),
413 413
 					  KEY PAY_ID (PAY_ID)";
414
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
415
-        $table_name = 'esp_checkin';
416
-        $sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
414
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
415
+		$table_name = 'esp_checkin';
416
+		$sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
417 417
 					REG_ID int(10) unsigned NOT NULL,
418 418
 					DTT_ID int(10) unsigned NOT NULL,
419 419
 					CHK_in tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
 					PRIMARY KEY  (CHK_ID),
422 422
 					KEY REG_ID (REG_ID),
423 423
 					KEY DTT_ID (DTT_ID)";
424
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
425
-        $table_name = 'esp_state';
426
-        $sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
424
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
425
+		$table_name = 'esp_state';
426
+		$sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
427 427
 					  CNT_ISO varchar(2) COLLATE utf8_bin NOT NULL,
428 428
 					  STA_abbrev varchar(24) COLLATE utf8_bin NOT NULL,
429 429
 					  STA_name varchar(100) COLLATE utf8_bin NOT NULL,
@@ -431,9 +431,9 @@  discard block
 block discarded – undo
431 431
 					  PRIMARY KEY  (STA_ID),
432 432
 					  KEY STA_abbrev (STA_abbrev),
433 433
 					  KEY CNT_ISO (CNT_ISO)";
434
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
435
-        $table_name = 'esp_status';
436
-        $sql = "STS_ID varchar(3) COLLATE utf8_bin NOT NULL,
434
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
435
+		$table_name = 'esp_status';
436
+		$sql = "STS_ID varchar(3) COLLATE utf8_bin NOT NULL,
437 437
 					  STS_code varchar(45) COLLATE utf8_bin NOT NULL,
438 438
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
439 439
 					  STS_can_edit tinyint(1) NOT NULL DEFAULT 0,
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 					  STS_open tinyint(1) NOT NULL DEFAULT 1,
442 442
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
443 443
 					  KEY STS_type (STS_type)";
444
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
445
-        $table_name = 'esp_transaction';
446
-        $sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
444
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
445
+		$table_name = 'esp_transaction';
446
+		$sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
447 447
 					  TXN_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
448 448
 					  TXN_total decimal(10,3) DEFAULT '0.00',
449 449
 					  TXN_paid decimal(10,3) NOT NULL DEFAULT '0.00',
@@ -455,9 +455,9 @@  discard block
 block discarded – undo
455 455
 					  PRIMARY KEY  (TXN_ID),
456 456
 					  KEY TXN_timestamp (TXN_timestamp),
457 457
 					  KEY STS_ID (STS_ID)";
458
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
459
-        $table_name = 'esp_venue_meta';
460
-        $sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
458
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
459
+		$table_name = 'esp_venue_meta';
460
+		$sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
461 461
 			VNU_ID bigint(20) unsigned NOT NULL DEFAULT 0,
462 462
 			VNU_address varchar(255) DEFAULT NULL,
463 463
 			VNU_address2 varchar(255) DEFAULT NULL,
@@ -476,10 +476,10 @@  discard block
 block discarded – undo
476 476
 			KEY VNU_ID (VNU_ID),
477 477
 			KEY STA_ID (STA_ID),
478 478
 			KEY CNT_ISO (CNT_ISO)";
479
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
480
-        // modified tables
481
-        $table_name = "esp_price";
482
-        $sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
479
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
480
+		// modified tables
481
+		$table_name = "esp_price";
482
+		$sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
483 483
 					  PRT_ID tinyint(3) unsigned NOT NULL,
484 484
 					  PRC_amount decimal(10,3) NOT NULL DEFAULT '0.00',
485 485
 					  PRC_name varchar(245) NOT NULL,
@@ -492,9 +492,9 @@  discard block
 block discarded – undo
492 492
 					  PRC_parent int(10) unsigned DEFAULT 0,
493 493
 					  PRIMARY KEY  (PRC_ID),
494 494
 					  KEY PRT_ID (PRT_ID)";
495
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
496
-        $table_name = "esp_price_type";
497
-        $sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
495
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
496
+		$table_name = "esp_price_type";
497
+		$sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
498 498
 				  PRT_name varchar(45) NOT NULL,
499 499
 				  PBT_ID tinyint(3) unsigned NOT NULL DEFAULT '1',
500 500
 				  PRT_is_percent tinyint(1) NOT NULL DEFAULT '0',
@@ -503,9 +503,9 @@  discard block
 block discarded – undo
503 503
 				  PRT_deleted tinyint(1) NOT NULL DEFAULT '0',
504 504
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
505 505
 				  PRIMARY KEY  (PRT_ID)";
506
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
507
-        $table_name = "esp_ticket";
508
-        $sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
506
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
507
+		$table_name = "esp_ticket";
508
+		$sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
509 509
 					  TTM_ID int(10) unsigned NOT NULL,
510 510
 					  TKT_name varchar(245) NOT NULL DEFAULT '',
511 511
 					  TKT_description text NOT NULL,
@@ -527,9 +527,9 @@  discard block
 block discarded – undo
527 527
 					  TKT_deleted tinyint(1) NOT NULL DEFAULT '0',
528 528
 					  PRIMARY KEY  (TKT_ID),
529 529
 					  KEY TKT_start_date (TKT_start_date)";
530
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
531
-        $table_name = 'esp_question_group';
532
-        $sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
530
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
531
+		$table_name = 'esp_question_group';
532
+		$sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
533 533
 					QSG_name varchar(255) NOT NULL,
534 534
 					QSG_identifier varchar(100) NOT NULL,
535 535
 					QSG_desc text NULL,
@@ -542,38 +542,38 @@  discard block
 block discarded – undo
542 542
 					PRIMARY KEY  (QSG_ID),
543 543
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
544 544
 					KEY QSG_order (QSG_order)';
545
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
546
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
547
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
548
-        // (because many need to convert old string states to foreign keys into the states table)
549
-        $script_4_1_defaults->insert_default_states();
550
-        $script_4_1_defaults->insert_default_countries();
551
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
552
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
553
-        $script_4_5_defaults->insert_default_price_types();
554
-        $script_4_5_defaults->insert_default_prices();
555
-        $script_4_5_defaults->insert_default_tickets();
556
-        /** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
557
-        $script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
558
-        $script_4_6_defaults->add_default_admin_only_payments();
559
-        $script_4_6_defaults->insert_default_currencies();
560
-        return true;
561
-    }
545
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
546
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
547
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
548
+		// (because many need to convert old string states to foreign keys into the states table)
549
+		$script_4_1_defaults->insert_default_states();
550
+		$script_4_1_defaults->insert_default_countries();
551
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
552
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
553
+		$script_4_5_defaults->insert_default_price_types();
554
+		$script_4_5_defaults->insert_default_prices();
555
+		$script_4_5_defaults->insert_default_tickets();
556
+		/** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
557
+		$script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
558
+		$script_4_6_defaults->add_default_admin_only_payments();
559
+		$script_4_6_defaults->insert_default_currencies();
560
+		return true;
561
+	}
562 562
 
563 563
 
564 564
 
565
-    /**
566
-     * @return boolean
567
-     */
568
-    public function schema_changes_after_migration()
569
-    {
570
-        return true;
571
-    }
565
+	/**
566
+	 * @return boolean
567
+	 */
568
+	public function schema_changes_after_migration()
569
+	{
570
+		return true;
571
+	}
572 572
 
573 573
 
574 574
 
575
-    public function migration_page_hooks()
576
-    {
577
-    }
575
+	public function migration_page_hooks()
576
+	{
577
+	}
578 578
 }
579 579
 // end of file: /core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php
Please login to merge, or discard this patch.