Completed
Push — master ( e14cae...f66773 )
by Aimeos
01:52
created
controller/frontend/src/Controller/Frontend/Common/Factory/Base.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param string $classname Full name of the class for which the object should be returned
32 32
 	 * @param \Aimeos\Controller\Frontend\Iface|null $controller Frontend controller object
33 33
 	 */
34
-	public static function injectController( $classname, \Aimeos\Controller\Frontend\Iface $controller = null )
34
+	public static function injectController($classname, \Aimeos\Controller\Frontend\Iface $controller = null)
35 35
 	{
36 36
 		self::$objects[$classname] = $controller;
37 37
 	}
@@ -46,26 +46,26 @@  discard block
 block discarded – undo
46 46
 	 * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Controller\Frontend\Basket\Decorator\"
47 47
 	 * @return \Aimeos\Controller\Frontend\Common\Iface Controller object
48 48
 	 */
49
-	protected static function addDecorators( \Aimeos\MShop\Context\Item\Iface $context,
50
-		\Aimeos\Controller\Frontend\Iface $controller, array $decorators, $classprefix )
49
+	protected static function addDecorators(\Aimeos\MShop\Context\Item\Iface $context,
50
+		\Aimeos\Controller\Frontend\Iface $controller, array $decorators, $classprefix)
51 51
 	{
52
-		foreach( $decorators as $name )
52
+		foreach ($decorators as $name)
53 53
 		{
54
-			if( ctype_alnum( $name ) === false )
54
+			if (ctype_alnum($name) === false)
55 55
 			{
56
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
57
-				throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
56
+				$classname = is_string($name) ? $classprefix . $name : '<not a string>';
57
+				throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
58 58
 			}
59 59
 
60 60
 			$classname = $classprefix . $name;
61 61
 
62
-			if( class_exists( $classname ) === false ) {
63
-				throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
62
+			if (class_exists($classname) === false) {
63
+				throw new \Aimeos\Controller\Frontend\Exception(sprintf('Class "%1$s" not available', $classname));
64 64
 			}
65 65
 
66
-			$controller = new $classname( $controller, $context );
66
+			$controller = new $classname($controller, $context);
67 67
 
68
-			\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\Iface', $controller );
68
+			\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\Iface', $controller);
69 69
 		}
70 70
 
71 71
 		return $controller;
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 	 * @param string $domain Domain name in lower case, e.g. "product"
81 81
 	 * @return \Aimeos\Controller\Frontend\Common\Iface Controller object
82 82
 	 */
83
-	protected static function addControllerDecorators( \Aimeos\MShop\Context\Item\Iface $context,
84
-		\Aimeos\Controller\Frontend\Iface $controller, $domain )
83
+	protected static function addControllerDecorators(\Aimeos\MShop\Context\Item\Iface $context,
84
+		\Aimeos\Controller\Frontend\Iface $controller, $domain)
85 85
 	{
86
-		if( !is_string( $domain ) || $domain === '' ) {
87
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid domain "%1$s"', $domain ) );
86
+		if (!is_string($domain) || $domain === '') {
87
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid domain "%1$s"', $domain));
88 88
 		}
89 89
 
90
-		$localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $domain ) ) );
90
+		$localClass = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $domain)));
91 91
 		$config = $context->getConfig();
92 92
 
93 93
 		/** controller/frontend/common/decorators/default
@@ -112,26 +112,26 @@  discard block
 block discarded – undo
112 112
 		 * @since 2014.03
113 113
 		 * @category Developer
114 114
 		 */
115
-		$decorators = $config->get( 'controller/frontend/common/decorators/default', [] );
116
-		$excludes = $config->get( 'controller/frontend/' . $domain . '/decorators/excludes', [] );
115
+		$decorators = $config->get('controller/frontend/common/decorators/default', []);
116
+		$excludes = $config->get('controller/frontend/' . $domain . '/decorators/excludes', []);
117 117
 
118
-		foreach( $decorators as $key => $name )
118
+		foreach ($decorators as $key => $name)
119 119
 		{
120
-			if( in_array( $name, $excludes ) ) {
121
-				unset( $decorators[$key] );
120
+			if (in_array($name, $excludes)) {
121
+				unset($decorators[$key]);
122 122
 			}
123 123
 		}
124 124
 
125 125
 		$classprefix = '\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\';
126
-		$controller = self::addDecorators( $context, $controller, $decorators, $classprefix );
126
+		$controller = self::addDecorators($context, $controller, $decorators, $classprefix);
127 127
 
128 128
 		$classprefix = '\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\';
129
-		$decorators = $config->get( 'controller/frontend/' . $domain . '/decorators/global', [] );
130
-		$controller = self::addDecorators( $context, $controller, $decorators, $classprefix );
129
+		$decorators = $config->get('controller/frontend/' . $domain . '/decorators/global', []);
130
+		$controller = self::addDecorators($context, $controller, $decorators, $classprefix);
131 131
 
132
-		$classprefix = '\\Aimeos\\Controller\\Frontend\\' . ucfirst( $localClass ) . '\\Decorator\\';
133
-		$decorators = $config->get( 'controller/frontend/' . $domain . '/decorators/local', [] );
134
-		$controller = self::addDecorators( $context, $controller, $decorators, $classprefix );
132
+		$classprefix = '\\Aimeos\\Controller\\Frontend\\' . ucfirst($localClass) . '\\Decorator\\';
133
+		$decorators = $config->get('controller/frontend/' . $domain . '/decorators/local', []);
134
+		$controller = self::addDecorators($context, $controller, $decorators, $classprefix);
135 135
 
136 136
 		return $controller;
137 137
 	}
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
 	 * @param string $interface Name of the controller interface
146 146
 	 * @return \Aimeos\Controller\Frontend\Common\Iface Controller object
147 147
 	 */
148
-	protected static function createControllerBase( \Aimeos\MShop\Context\Item\Iface $context, $classname, $interface )
148
+	protected static function createControllerBase(\Aimeos\MShop\Context\Item\Iface $context, $classname, $interface)
149 149
 	{
150
-		if( isset( self::$objects[$classname] ) ) {
150
+		if (isset(self::$objects[$classname])) {
151 151
 			return self::$objects[$classname];
152 152
 		}
153 153
 
154
-		if( class_exists( $classname ) === false ) {
155
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
154
+		if (class_exists($classname) === false) {
155
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Class "%1$s" not available', $classname));
156 156
 		}
157 157
 
158
-		$controller = new $classname( $context );
158
+		$controller = new $classname($context);
159 159
 
160
-		\Aimeos\MW\Common\Base::checkClass( $interface, $controller );
160
+		\Aimeos\MW\Common\Base::checkClass($interface, $controller);
161 161
 
162 162
 		return $controller;
163 163
 	}
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Locale/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Locale\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Locale\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Locale\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Locale\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Locale\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Locale\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Locale\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Locale\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Locale\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Locale\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Locale\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Subscription/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Subscription\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Subscription\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Subscription\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Subscription\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Subscription\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Subscription\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Subscription\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Subscription\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Subscription\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Subscription\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Subscription\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Product/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Product\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Product\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Product\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Product\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Product\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Product\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Product\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Product\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Product\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Product\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Product\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Service/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Service\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Order/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,31 +16,31 @@
 block discarded – undo
16 16
 	{
17 17
 		$target = '\\Aimeos\\Controller\\Frontend\\Order\\Iface';
18 18
 
19
-		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext() );
20
-		$this->assertInstanceOf( $target, $controller );
19
+		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext());
20
+		$this->assertInstanceOf($target, $controller);
21 21
 
22
-		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
23
-		$this->assertInstanceOf( $target, $controller );
22
+		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
23
+		$this->assertInstanceOf($target, $controller);
24 24
 	}
25 25
 
26 26
 
27 27
 	public function testCreateControllerInvalidImplementation()
28 28
 	{
29
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
30
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
29
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
30
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testCreateControllerInvalidName()
35 35
 	{
36
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
37
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
36
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
37
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), '%^');
38 38
 	}
39 39
 
40 40
 
41 41
 	public function testCreateControllerNotExisting()
42 42
 	{
43
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
44
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
43
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
44
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
45 45
 	}
46 46
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Customer/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Customer\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Customer\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Customer\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Customer\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Customer\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Customer\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Customer\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Customer\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Customer\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Customer\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Customer\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Stock/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Stock\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Stock\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Stock\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Stock\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Stock\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Stock\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Stock\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Stock\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Stock\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Stock\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Stock\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Supplier/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 	{
16 16
 		$target = '\\Aimeos\\Controller\\Frontend\\Supplier\\Iface';
17 17
 
18
-		$controller = \Aimeos\Controller\Frontend\Supplier\Factory::createController( \TestHelperFrontend::getContext() );
19
-		$this->assertInstanceOf( $target, $controller );
18
+		$controller = \Aimeos\Controller\Frontend\Supplier\Factory::createController(\TestHelperFrontend::getContext());
19
+		$this->assertInstanceOf($target, $controller);
20 20
 
21
-		$controller = \Aimeos\Controller\Frontend\Supplier\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
22
-		$this->assertInstanceOf( $target, $controller );
21
+		$controller = \Aimeos\Controller\Frontend\Supplier\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
22
+		$this->assertInstanceOf($target, $controller);
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testCreateControllerInvalidImplementation()
27 27
 	{
28
-		$this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' );
29
-		\Aimeos\Controller\Frontend\Supplier\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
28
+		$this->setExpectedException('\\Aimeos\\MW\\Common\\Exception');
29
+		\Aimeos\Controller\Frontend\Supplier\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCreateControllerInvalidName()
34 34
 	{
35
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
36
-		\Aimeos\Controller\Frontend\Supplier\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
35
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
36
+		\Aimeos\Controller\Frontend\Supplier\Factory::createController(\TestHelperFrontend::getContext(), '%^');
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateControllerNotExisting()
41 41
 	{
42
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
43
-		\Aimeos\Controller\Frontend\Supplier\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
42
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
43
+		\Aimeos\Controller\Frontend\Supplier\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.