Completed
Pull Request — master (#378)
by Darren
19:13
created
core/services/address/formatters/NullAddressFormatter.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@
 block discarded – undo
13 13
 class NullAddressFormatter implements \EEI_Address_Formatter
14 14
 {
15 15
 
16
-    /**
17
-     * @param string $address
18
-     * @param string $address2
19
-     * @param string $city
20
-     * @param string $state
21
-     * @param string $zip
22
-     * @param string $country
23
-     * @param string $CNT_ISO
24
-     * @return string
25
-     */
26
-    public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
27
-    {
28
-        return null;
29
-    }
16
+	/**
17
+	 * @param string $address
18
+	 * @param string $address2
19
+	 * @param string $city
20
+	 * @param string $state
21
+	 * @param string $zip
22
+	 * @param string $country
23
+	 * @param string $CNT_ISO
24
+	 * @return string
25
+	 */
26
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
27
+	{
28
+		return null;
29
+	}
30 30
 }
Please login to merge, or discard this patch.
core/services/address/formatters/MultiLineAddressFormatter.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -15,39 +15,39 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * @param string $address
20
-     * @param string $address2
21
-     * @param string $city
22
-     * @param string $state
23
-     * @param string $zip
24
-     * @param string $country
25
-     * @param string $CNT_ISO
26
-     * @return string
27
-     */
28
-    public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
29
-    {
30
-        $address_formats = apply_filters(
31
-            'FHEE__EE_MultiLine_Address_Formatter__address_formats',
32
-            array(
33
-                'CA' => "{address}%{address2}%{city}%{state}%{country}%{zip}",
34
-                'GB' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
35
-                'US' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
36
-                'ZZ' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
37
-            )
38
-        );
39
-        // if the incoming country has a set format, use that, else use the default
40
-        $formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
41
-            : $address_formats['ZZ'];
42
-        return $this->parse_formatted_address(
43
-            $address,
44
-            $address2,
45
-            $city,
46
-            $state,
47
-            $zip,
48
-            $country,
49
-            $formatted_address,
50
-            '<br />'
51
-        );
52
-    }
18
+	/**
19
+	 * @param string $address
20
+	 * @param string $address2
21
+	 * @param string $city
22
+	 * @param string $state
23
+	 * @param string $zip
24
+	 * @param string $country
25
+	 * @param string $CNT_ISO
26
+	 * @return string
27
+	 */
28
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
29
+	{
30
+		$address_formats = apply_filters(
31
+			'FHEE__EE_MultiLine_Address_Formatter__address_formats',
32
+			array(
33
+				'CA' => "{address}%{address2}%{city}%{state}%{country}%{zip}",
34
+				'GB' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
35
+				'US' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
36
+				'ZZ' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
37
+			)
38
+		);
39
+		// if the incoming country has a set format, use that, else use the default
40
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
41
+			: $address_formats['ZZ'];
42
+		return $this->parse_formatted_address(
43
+			$address,
44
+			$address2,
45
+			$city,
46
+			$state,
47
+			$zip,
48
+			$country,
49
+			$formatted_address,
50
+			'<br />'
51
+		);
52
+	}
53 53
 }
Please login to merge, or discard this patch.
core/services/address/formatters/InlineAddressFormatter.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -14,39 +14,39 @@
 block discarded – undo
14 14
 class InlineAddressFormatter extends AddressFormatter implements \EEI_Address_Formatter
15 15
 {
16 16
 
17
-    /**
18
-     * @param string $address
19
-     * @param string $address2
20
-     * @param string $city
21
-     * @param string $state
22
-     * @param string $zip
23
-     * @param string $country
24
-     * @param string $CNT_ISO
25
-     * @return string
26
-     */
27
-    public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
28
-    {
29
-        $address_formats = apply_filters(
30
-            'FHEE__EE_Inline_Address_Formatter__address_formats',
31
-            array(
32
-                'CA'  => "{address}%{address2}%{city}%{state}%{country}%{zip}",
33
-                'GB'  => "{address}%{address2}%{city}%{state}%{zip}%{country}",
34
-                'US'  => "{address}%{address2}%{city}%{state}%{zip}%{country}",
35
-                'ZZZ' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
36
-            )
37
-        );
38
-        // if the incoming country has a set format, use that, else use the default
39
-        $formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
40
-            : $address_formats['ZZZ'];
41
-        return $this->parse_formatted_address(
42
-            $address,
43
-            $address2,
44
-            $city,
45
-            $state,
46
-            $zip,
47
-            $country,
48
-            $formatted_address,
49
-            ', '
50
-        );
51
-    }
17
+	/**
18
+	 * @param string $address
19
+	 * @param string $address2
20
+	 * @param string $city
21
+	 * @param string $state
22
+	 * @param string $zip
23
+	 * @param string $country
24
+	 * @param string $CNT_ISO
25
+	 * @return string
26
+	 */
27
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO)
28
+	{
29
+		$address_formats = apply_filters(
30
+			'FHEE__EE_Inline_Address_Formatter__address_formats',
31
+			array(
32
+				'CA'  => "{address}%{address2}%{city}%{state}%{country}%{zip}",
33
+				'GB'  => "{address}%{address2}%{city}%{state}%{zip}%{country}",
34
+				'US'  => "{address}%{address2}%{city}%{state}%{zip}%{country}",
35
+				'ZZZ' => "{address}%{address2}%{city}%{state}%{zip}%{country}",
36
+			)
37
+		);
38
+		// if the incoming country has a set format, use that, else use the default
39
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
40
+			: $address_formats['ZZZ'];
41
+		return $this->parse_formatted_address(
42
+			$address,
43
+			$address2,
44
+			$city,
45
+			$state,
46
+			$zip,
47
+			$country,
48
+			$formatted_address,
49
+			', '
50
+		);
51
+	}
52 52
 }
Please login to merge, or discard this patch.
core/services/commands/CommandFactory.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -18,36 +18,36 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    /**
22
-     * @var LoaderInterface $loader
23
-     */
24
-    private $loader;
25
-
26
-
27
-    /**
28
-     * CommandFactory constructor
29
-     *
30
-     * @param LoaderInterface $loader
31
-     * @throws InvalidDataTypeException
32
-     * @throws InvalidInterfaceException
33
-     * @throws InvalidArgumentException
34
-     */
35
-    public function __construct(LoaderInterface $loader = null)
36
-    {
37
-        $this->loader = $loader;
38
-    }
39
-
40
-
41
-    /**
42
-     * @param string $command_fqcn
43
-     * @param array  $arguments
44
-     * @return mixed
45
-     * @throws InvalidArgumentException
46
-     * @throws InvalidDataTypeException
47
-     * @throws InvalidInterfaceException
48
-     */
49
-    public function getNew($command_fqcn, $arguments = array())
50
-    {
51
-        return $this->loader->getNew($command_fqcn, $arguments);
52
-    }
21
+	/**
22
+	 * @var LoaderInterface $loader
23
+	 */
24
+	private $loader;
25
+
26
+
27
+	/**
28
+	 * CommandFactory constructor
29
+	 *
30
+	 * @param LoaderInterface $loader
31
+	 * @throws InvalidDataTypeException
32
+	 * @throws InvalidInterfaceException
33
+	 * @throws InvalidArgumentException
34
+	 */
35
+	public function __construct(LoaderInterface $loader = null)
36
+	{
37
+		$this->loader = $loader;
38
+	}
39
+
40
+
41
+	/**
42
+	 * @param string $command_fqcn
43
+	 * @param array  $arguments
44
+	 * @return mixed
45
+	 * @throws InvalidArgumentException
46
+	 * @throws InvalidDataTypeException
47
+	 * @throws InvalidInterfaceException
48
+	 */
49
+	public function getNew($command_fqcn, $arguments = array())
50
+	{
51
+		return $this->loader->getNew($command_fqcn, $arguments);
52
+	}
53 53
 }
Please login to merge, or discard this patch.
core/services/commands/Command.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -17,26 +17,26 @@
 block discarded – undo
17 17
 abstract class Command implements CommandInterface
18 18
 {
19 19
 
20
-    /*
20
+	/*
21 21
      * @var CapCheckInterface $cap_check
22 22
      */
23
-    protected $cap_check;
23
+	protected $cap_check;
24 24
 
25 25
 
26
-    /**
27
-     * @return mixed
28
-     */
29
-    public function getCapCheck()
30
-    {
31
-        return $this->cap_check;
32
-    }
26
+	/**
27
+	 * @return mixed
28
+	 */
29
+	public function getCapCheck()
30
+	{
31
+		return $this->cap_check;
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * @param CapCheckInterface $cap_check
37
-     */
38
-    public function setCapCheck(CapCheckInterface $cap_check)
39
-    {
40
-        $this->cap_check = $cap_check;
41
-    }
35
+	/**
36
+	 * @param CapCheckInterface $cap_check
37
+	 */
38
+	public function setCapCheck(CapCheckInterface $cap_check)
39
+	{
40
+		$this->cap_check = $cap_check;
41
+	}
42 42
 }
Please login to merge, or discard this patch.
core/services/commands/InvalidCommandHandlerException.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -13,24 +13,24 @@
 block discarded – undo
13 13
 class InvalidCommandHandlerException extends \DomainException
14 14
 {
15 15
 
16
-    /**
17
-     * @access public
18
-     * @param  string     $command_name
19
-     * @param  string     $message
20
-     * @param  int        $code
21
-     * @param  \Exception $previous
22
-     */
23
-    public function __construct($command_name, $message = '', $code = 0, \Exception $previous = null)
24
-    {
25
-        if (empty($message)) {
26
-            $message = sprintf(
27
-                __(
28
-                    'The supplied Command Handler "%1$s" does not have a valid name. It should be in the following format: "{CommandName}Handler" ',
29
-                    'event_espresso'
30
-                ),
31
-                $command_name
32
-            );
33
-        }
34
-        parent::__construct($message, $code, $previous);
35
-    }
16
+	/**
17
+	 * @access public
18
+	 * @param  string     $command_name
19
+	 * @param  string     $message
20
+	 * @param  int        $code
21
+	 * @param  \Exception $previous
22
+	 */
23
+	public function __construct($command_name, $message = '', $code = 0, \Exception $previous = null)
24
+	{
25
+		if (empty($message)) {
26
+			$message = sprintf(
27
+				__(
28
+					'The supplied Command Handler "%1$s" does not have a valid name. It should be in the following format: "{CommandName}Handler" ',
29
+					'event_espresso'
30
+				),
31
+				$command_name
32
+			);
33
+		}
34
+		parent::__construct($message, $code, $previous);
35
+	}
36 36
 }
Please login to merge, or discard this patch.
core/services/commands/CompositeCommandHandler.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -15,53 +15,53 @@
 block discarded – undo
15 15
 abstract class CompositeCommandHandler extends CommandHandler
16 16
 {
17 17
 
18
-    /**
19
-     * @type CommandBusInterface $command_bus
20
-     */
21
-    private $command_bus;
18
+	/**
19
+	 * @type CommandBusInterface $command_bus
20
+	 */
21
+	private $command_bus;
22 22
 
23
-    /**
24
-     * @type CommandFactoryInterface $command_factory
25
-     */
26
-    private $command_factory;
23
+	/**
24
+	 * @type CommandFactoryInterface $command_factory
25
+	 */
26
+	private $command_factory;
27 27
 
28 28
 
29
-    /**
30
-     * CompositeCommandHandler constructor.
31
-     *
32
-     * @param CommandBusInterface     $command_bus
33
-     * @param CommandFactoryInterface $command_factory
34
-     */
35
-    public function __construct(CommandBusInterface $command_bus, CommandFactoryInterface $command_factory)
36
-    {
37
-        $this->command_bus = $command_bus;
38
-        $this->command_factory = $command_factory;
39
-    }
29
+	/**
30
+	 * CompositeCommandHandler constructor.
31
+	 *
32
+	 * @param CommandBusInterface     $command_bus
33
+	 * @param CommandFactoryInterface $command_factory
34
+	 */
35
+	public function __construct(CommandBusInterface $command_bus, CommandFactoryInterface $command_factory)
36
+	{
37
+		$this->command_bus = $command_bus;
38
+		$this->command_factory = $command_factory;
39
+	}
40 40
 
41 41
 
42
-    /**
43
-     * @param CommandBusInterface $command_bus
44
-     */
45
-    public function setCommandBus(CommandBusInterface $command_bus)
46
-    {
47
-        $this->command_bus = $command_bus;
48
-    }
42
+	/**
43
+	 * @param CommandBusInterface $command_bus
44
+	 */
45
+	public function setCommandBus(CommandBusInterface $command_bus)
46
+	{
47
+		$this->command_bus = $command_bus;
48
+	}
49 49
 
50 50
 
51
-    /**
52
-     * @return CommandBusInterface
53
-     */
54
-    public function commandBus()
55
-    {
56
-        return $this->command_bus;
57
-    }
51
+	/**
52
+	 * @return CommandBusInterface
53
+	 */
54
+	public function commandBus()
55
+	{
56
+		return $this->command_bus;
57
+	}
58 58
 
59 59
 
60
-    /**
61
-     * @return CommandFactoryInterface
62
-     */
63
-    public function commandFactory()
64
-    {
65
-        return $this->command_factory;
66
-    }
60
+	/**
61
+	 * @return CommandFactoryInterface
62
+	 */
63
+	public function commandFactory()
64
+	{
65
+		return $this->command_factory;
66
+	}
67 67
 }
Please login to merge, or discard this patch.
core/services/commands/CommandHandlerNotFoundException.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
 class CommandHandlerNotFoundException extends \OutOfBoundsException
14 14
 {
15 15
 
16
-    /**
17
-     * @access public
18
-     * @param  string     $command_handler_name
19
-     * @param  string     $message
20
-     * @param  int        $code
21
-     * @param  \Exception $previous
22
-     */
23
-    public function __construct($command_handler_name, $message = '', $code = 0, \Exception $previous = null)
24
-    {
25
-        if (empty($message)) {
26
-            $message = sprintf(
27
-                __('The requested Command Handler "%1$s" could not be located or does not exist.', 'event_espresso'),
28
-                $command_handler_name
29
-            );
30
-        }
31
-        parent::__construct($message, $code, $previous);
32
-    }
16
+	/**
17
+	 * @access public
18
+	 * @param  string     $command_handler_name
19
+	 * @param  string     $message
20
+	 * @param  int        $code
21
+	 * @param  \Exception $previous
22
+	 */
23
+	public function __construct($command_handler_name, $message = '', $code = 0, \Exception $previous = null)
24
+	{
25
+		if (empty($message)) {
26
+			$message = sprintf(
27
+				__('The requested Command Handler "%1$s" could not be located or does not exist.', 'event_espresso'),
28
+				$command_handler_name
29
+			);
30
+		}
31
+		parent::__construct($message, $code, $previous);
32
+	}
33 33
 }
Please login to merge, or discard this patch.
core/services/commands/registration/SingleRegistrationCommand.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,29 +16,29 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * @var \EE_Registration $registration
21
-     */
22
-    private $registration;
23
-
24
-
25
-    /**
26
-     * CancelRegistrationAndTicketLineItemCommand constructor.
27
-     *
28
-     * @param \EE_Registration $registration
29
-     */
30
-    public function __construct(
31
-        \EE_Registration $registration
32
-    ) {
33
-        $this->registration = $registration;
34
-    }
35
-
36
-
37
-    /**
38
-     * @return \EE_Registration
39
-     */
40
-    public function registration()
41
-    {
42
-        return $this->registration;
43
-    }
19
+	/**
20
+	 * @var \EE_Registration $registration
21
+	 */
22
+	private $registration;
23
+
24
+
25
+	/**
26
+	 * CancelRegistrationAndTicketLineItemCommand constructor.
27
+	 *
28
+	 * @param \EE_Registration $registration
29
+	 */
30
+	public function __construct(
31
+		\EE_Registration $registration
32
+	) {
33
+		$this->registration = $registration;
34
+	}
35
+
36
+
37
+	/**
38
+	 * @return \EE_Registration
39
+	 */
40
+	public function registration()
41
+	{
42
+		return $this->registration;
43
+	}
44 44
 }
Please login to merge, or discard this patch.