Completed
Push — master ( b890cc...a98373 )
by Aimeos
02:16
created
controller/frontend/src/Controller/Frontend/Stock/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 	/**
141 141
 	 * Returns the frontend controller
142 142
 	 *
143
-	 * @return \Aimeos\Controller\Frontend\Stock\Iface Frontend controller object
143
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
144 144
 	 */
145 145
 	protected function getController()
146 146
 	{
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Stock\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Stock\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
63 63
 	 * @since 2017.03
64 64
 	 */
65
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
65
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
66 66
 	{
67
-		return $this->controller->addFilterCodes( $filter, $codes );
67
+		return $this->controller->addFilterCodes($filter, $codes);
68 68
 	}
69 69
 
70 70
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
77 77
 	 * @since 2017.03
78 78
 	 */
79
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
79
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
80 80
 	{
81
-		return $this->controller->addFilterTypes( $filter, $codes );
81
+		return $this->controller->addFilterTypes($filter, $codes);
82 82
 	}
83 83
 
84 84
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
103 103
 	 * @since 2017.03
104 104
 	 */
105
-	public function getItem( $id )
105
+	public function getItem($id)
106 106
 	{
107
-		return $this->controller->getItem( $id );
107
+		return $this->controller->getItem($id);
108 108
 	}
109 109
 
110 110
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
117 117
 	 * @since 2017.03
118 118
 	 */
119
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
119
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
120 120
 	{
121
-		return $this->controller->searchItems( $filter, $total );
121
+		return $this->controller->searchItems($filter, $total);
122 122
 	}
123 123
 
124 124
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Attribute/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Attribute\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/attribute/name
34 34
 		 * Class name of the used attribute frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2014.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/attribute/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/attribute/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Attribute\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/attribute/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the attribute frontend controllers
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/attribute/decorators/excludes
153 153
 		 * @see controller/frontend/attribute/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'attribute' );
155
+		return self::addControllerDecorators($context, $manager, 'attribute');
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Attribute/Iface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
28 28
 	 * @since 2017.03
29 29
 	 */
30
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes );
30
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes);
31 31
 
32 32
 
33 33
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items
48 48
 	 * @since 2017.03
49 49
 	 */
50
-	public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) );
50
+	public function getItem($id, array $domains = array('media', 'price', 'text'));
51 51
 
52 52
 
53 53
 	/**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * @return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of attribute item including the referenced domains items
59 59
 	 * @since 2017.03
60 60
 	 */
61
-	public function getItems( array $ids, array $domains = array( 'media', 'price', 'text' ) );
61
+	public function getItems(array $ids, array $domains = array('media', 'price', 'text'));
62 62
 
63 63
 
64 64
 	/**
@@ -70,5 +70,5 @@  discard block
 block discarded – undo
70 70
 	 * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface
71 71
 	 * @since 2017.03
72 72
 	 */
73
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null );
73
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null);
74 74
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/FactoryTest.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -14,92 +14,92 @@
 block discarded – undo
14 14
 {
15 15
 	public function testCreateController()
16 16
 	{
17
-		$controller = \Aimeos\Controller\Frontend\Factory::createController( \TestHelperFrontend::getContext(), 'basket' );
18
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Frontend\\Iface', $controller );
17
+		$controller = \Aimeos\Controller\Frontend\Factory::createController(\TestHelperFrontend::getContext(), 'basket');
18
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Frontend\\Iface', $controller);
19 19
 	}
20 20
 
21 21
 
22 22
 	public function testCreateControllerEmpty()
23 23
 	{
24
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
25
-		\Aimeos\Controller\Frontend\Factory::createController( \TestHelperFrontend::getContext(), '' );
24
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
25
+		\Aimeos\Controller\Frontend\Factory::createController(\TestHelperFrontend::getContext(), '');
26 26
 	}
27 27
 
28 28
 
29 29
 	public function testCreateControllerInvalidName()
30 30
 	{
31
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
32
-		\Aimeos\Controller\Frontend\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
31
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
32
+		\Aimeos\Controller\Frontend\Factory::createController(\TestHelperFrontend::getContext(), '%^');
33 33
 	}
34 34
 
35 35
 
36 36
 	public function testCreateControllerNotExisting()
37 37
 	{
38
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
39
-		\Aimeos\Controller\Frontend\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
38
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
39
+		\Aimeos\Controller\Frontend\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
40 40
 	}
41 41
 
42 42
 
43 43
 	public function testCreateSubControllerNotExisting()
44 44
 	{
45
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
46
-		\Aimeos\Controller\Frontend\Factory::createController( \TestHelperFrontend::getContext(), 'basket/notexist' );
45
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
46
+		\Aimeos\Controller\Frontend\Factory::createController(\TestHelperFrontend::getContext(), 'basket/notexist');
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testClear()
51 51
 	{
52
-		$cache = \Aimeos\Controller\Frontend\Factory::setCache( true );
52
+		$cache = \Aimeos\Controller\Frontend\Factory::setCache(true);
53 53
 
54 54
 		$context = \TestHelperFrontend::getContext();
55 55
 
56
-		$controller1 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
56
+		$controller1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
57 57
 		\Aimeos\Controller\Frontend\Factory::clear();
58
-		$controller2 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
58
+		$controller2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
59 59
 
60
-		\Aimeos\Controller\Frontend\Factory::setCache( $cache );
60
+		\Aimeos\Controller\Frontend\Factory::setCache($cache);
61 61
 
62
-		$this->assertNotSame( $controller1, $controller2 );
62
+		$this->assertNotSame($controller1, $controller2);
63 63
 	}
64 64
 
65 65
 
66 66
 	public function testClearSite()
67 67
 	{
68
-		$cache = \Aimeos\Controller\Frontend\Factory::setCache( true );
68
+		$cache = \Aimeos\Controller\Frontend\Factory::setCache(true);
69 69
 
70 70
 		$context = \TestHelperFrontend::getContext();
71 71
 
72
-		$basket1 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
73
-		$catalog1 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
74
-		\Aimeos\Controller\Frontend\Factory::clear( (string) $context );
72
+		$basket1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
73
+		$catalog1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
74
+		\Aimeos\Controller\Frontend\Factory::clear((string) $context);
75 75
 
76
-		$basket2 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
77
-		$catalog2 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
76
+		$basket2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
77
+		$catalog2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
78 78
 
79
-		\Aimeos\Controller\Frontend\Factory::setCache( $cache );
79
+		\Aimeos\Controller\Frontend\Factory::setCache($cache);
80 80
 
81
-		$this->assertNotSame( $basket1, $basket2 );
82
-		$this->assertNotSame( $catalog1, $catalog2 );
81
+		$this->assertNotSame($basket1, $basket2);
82
+		$this->assertNotSame($catalog1, $catalog2);
83 83
 	}
84 84
 
85 85
 
86 86
 	public function testClearSpecific()
87 87
 	{
88
-		$cache = \Aimeos\Controller\Frontend\Factory::setCache( true );
88
+		$cache = \Aimeos\Controller\Frontend\Factory::setCache(true);
89 89
 
90 90
 		$context = \TestHelperFrontend::getContext();
91 91
 
92
-		$basket1 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
93
-		$catalog1 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
94
-		\Aimeos\Controller\Frontend\Factory::clear( (string) $context, 'basket' );
92
+		$basket1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
93
+		$catalog1 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
94
+		\Aimeos\Controller\Frontend\Factory::clear((string) $context, 'basket');
95 95
 
96
-		$basket2 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
97
-		$catalog2 = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
96
+		$basket2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
97
+		$catalog2 = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
98 98
 
99
-		\Aimeos\Controller\Frontend\Factory::setCache( $cache );
99
+		\Aimeos\Controller\Frontend\Factory::setCache($cache);
100 100
 
101
-		$this->assertNotSame( $basket1, $basket2 );
102
-		$this->assertSame( $catalog1, $catalog2 );
101
+		$this->assertNotSame($basket1, $basket2);
102
+		$this->assertSame($catalog1, $catalog2);
103 103
 	}
104 104
 
105 105
 }
106 106
\ No newline at end of file
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Locale/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 	/**
105 105
 	 * Returns the frontend controller
106 106
 	 *
107
-	 * @return \Aimeos\Controller\Frontend\Locale\Iface Frontend controller object
107
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
108 108
 	 */
109 109
 	protected function getController()
110 110
 	{
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Locale\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Locale\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item including the referenced domains items
76 76
 	 * @since 2017.03
77 77
 	 */
78
-	public function getItem( $id, array $domains = [] )
78
+	public function getItem($id, array $domains = [])
79 79
 	{
80
-		return $this->controller->getItem( $id, $domains );
80
+		return $this->controller->getItem($id, $domains);
81 81
 	}
82 82
 
83 83
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @return array Ordered list of locale items implementing \Aimeos\MShop\Locale\Item\Iface
91 91
 	 * @since 2017.03
92 92
 	 */
93
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null )
93
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null)
94 94
 	{
95
-		return $this->controller->searchItems( $filter, $domains, $total );
95
+		return $this->controller->searchItems($filter, $domains, $total);
96 96
 	}
97 97
 
98 98
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Locale/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Locale\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/locale/name
34 34
 		 * Class name of the used locale frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2014.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/locale/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/locale/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Locale\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Locale\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Locale\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Locale\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/locale/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the locale frontend controllers
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/locale/decorators/excludes
153 153
 		 * @see controller/frontend/locale/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'locale' );
155
+		return self::addControllerDecorators($context, $manager, 'locale');
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
 	/**
232 232
 	 * Returns the frontend controller
233 233
 	 *
234
-	 * @return \Aimeos\Controller\Frontend\Customer\Iface Frontend controller object
234
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
235 235
 	 * @since 2017.04
236 236
 	 */
237 237
 	protected function getController()
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Customer\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Customer\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
62 62
 	 * @since 2017.04
63 63
 	 */
64
-	public function addItem( array $values )
64
+	public function addItem(array $values)
65 65
 	{
66
-		return $this->controller->addItem( $values );
66
+		return $this->controller->addItem($values);
67 67
 	}
68 68
 
69 69
 
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
74 74
 	 * @since 2017.04
75 75
 	 */
76
-	public function createItem( array $values = [] )
76
+	public function createItem(array $values = [])
77 77
 	{
78
-		return $this->controller->createItem( $values );
78
+		return $this->controller->createItem($values);
79 79
 	}
80 80
 
81 81
 
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 	 * @param string $id Unique customer ID
86 86
 	 * @since 2017.04
87 87
 	 */
88
-	public function deleteItem( $id )
88
+	public function deleteItem($id)
89 89
 	{
90
-		return $this->controller->deleteItem( $id );
90
+		return $this->controller->deleteItem($id);
91 91
 	}
92 92
 
93 93
 
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
100 100
 	 * @since 2017.04
101 101
 	 */
102
-	public function editItem( $id, array $values )
102
+	public function editItem($id, array $values)
103 103
 	{
104
-		return $this->controller->editItem( $id, $values );
104
+		return $this->controller->editItem($id, $values);
105 105
 	}
106 106
 
107 107
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
114 114
 	 * @since 2017.04
115 115
 	 */
116
-	public function getItem( $id = null, array $domains = [] )
116
+	public function getItem($id = null, array $domains = [])
117 117
 	{
118
-		return $this->controller->getItem( $id, $domains );
118
+		return $this->controller->getItem($id, $domains);
119 119
 	}
120 120
 
121 121
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
130 130
 	 * @since 2017.04
131 131
 	 */
132
-	public function findItem( $code, array $domains = [] )
132
+	public function findItem($code, array $domains = [])
133 133
 	{
134
-		return $this->controller->findItem( $code, $domains );
134
+		return $this->controller->findItem($code, $domains);
135 135
 	}
136 136
 
137 137
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 	 * @param \Aimeos\MShop\Customer\Item\Iface Customer item
142 142
 	 * @since 2017.04
143 143
 	 */
144
-	public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item )
144
+	public function saveItem(\Aimeos\MShop\Customer\Item\Iface $item)
145 145
 	{
146
-		return $this->controller->saveItem( $item );
146
+		return $this->controller->saveItem($item);
147 147
 	}
148 148
 
149 149
 
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
155 155
 	 * @since 2017.04
156 156
 	 */
157
-	public function addAddressItem( array $values )
157
+	public function addAddressItem(array $values)
158 158
 	{
159
-		return $this->controller->addAddressItem( $values );
159
+		return $this->controller->addAddressItem($values);
160 160
 	}
161 161
 
162 162
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
167 167
 	 * @since 2017.04
168 168
 	 */
169
-	public function createAddressItem( array $values = [] )
169
+	public function createAddressItem(array $values = [])
170 170
 	{
171
-		return $this->controller->createAddressItem( $values );
171
+		return $this->controller->createAddressItem($values);
172 172
 	}
173 173
 
174 174
 
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 	 * @param string $id Unique customer address ID
179 179
 	 * @since 2017.04
180 180
 	 */
181
-	public function deleteAddressItem( $id )
181
+	public function deleteAddressItem($id)
182 182
 	{
183
-		$this->controller->deleteAddressItem( $id );
183
+		$this->controller->deleteAddressItem($id);
184 184
 	}
185 185
 
186 186
 
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
193 193
 	 * @since 2017.04
194 194
 	 */
195
-	public function editAddressItem( $id, array $values )
195
+	public function editAddressItem($id, array $values)
196 196
 	{
197
-		return $this->controller->editAddressItem( $id, $values );
197
+		return $this->controller->editAddressItem($id, $values);
198 198
 	}
199 199
 
200 200
 
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
206 206
 	 * @since 2017.04
207 207
 	 */
208
-	public function getAddressItem( $id )
208
+	public function getAddressItem($id)
209 209
 	{
210
-		return $this->controller->getAddressItem( $id );
210
+		return $this->controller->getAddressItem($id);
211 211
 	}
212 212
 
213 213
 
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
 	 * @param \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
218 218
 	 * @since 2017.04
219 219
 	 */
220
-	public function saveAddressItem( \Aimeos\MShop\Customer\Item\Address\Iface $item )
220
+	public function saveAddressItem(\Aimeos\MShop\Customer\Item\Address\Iface $item)
221 221
 	{
222
-		$this->controller->saveAddressItem( $item );
222
+		$this->controller->saveAddressItem($item);
223 223
 	}
224 224
 
225 225
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Customer\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/customer/name
34 34
 		 * Class name of the used customer frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2014.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/customer/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/customer/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Customer\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Customer\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Customer\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Customer\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/customer/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the customer frontend controllers
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/customer/decorators/excludes
153 153
 		 * @see controller/frontend/customer/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'customer' );
155
+		return self::addControllerDecorators($context, $manager, 'customer');
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Basket/Decorator/BundleTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,40 +18,40 @@
 block discarded – undo
18 18
 	protected function setUp()
19 19
 	{
20 20
 		$this->context = \TestHelperFrontend::getContext();
21
-		$object = new \Aimeos\Controller\Frontend\Basket\Standard( $this->context );
22
-		$this->object = new \Aimeos\Controller\Frontend\Basket\Decorator\Bundle( $object, $this->context );
21
+		$object = new \Aimeos\Controller\Frontend\Basket\Standard($this->context);
22
+		$this->object = new \Aimeos\Controller\Frontend\Basket\Decorator\Bundle($object, $this->context);
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28 28
 		$this->object->clear();
29
-		$this->context->getSession()->set( 'aimeos', [] );
29
+		$this->context->getSession()->set('aimeos', []);
30 30
 
31
-		unset( $this->object );
31
+		unset($this->object);
32 32
 	}
33 33
 
34 34
 
35 35
 	public function testAddProductBundle()
36 36
 	{
37
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( 'U:BUNDLE' );
37
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'product')->findItem('U:BUNDLE');
38 38
 
39
-		$this->object->addProduct( $item->getId(), 1 );
39
+		$this->object->addProduct($item->getId(), 1);
40 40
 
41
-		$this->assertEquals( 1, count( $this->object->get()->getProducts() ) );
42
-		$this->assertEquals( 'U:BUNDLE', $this->object->get()->getProduct( 0 )->getProductCode() );
43
-		$this->assertEquals( 2, count( $this->object->get()->getProduct( 0 )->getProducts() ) );
41
+		$this->assertEquals(1, count($this->object->get()->getProducts()));
42
+		$this->assertEquals('U:BUNDLE', $this->object->get()->getProduct(0)->getProductCode());
43
+		$this->assertEquals(2, count($this->object->get()->getProduct(0)->getProducts()));
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testAddProductNoBundle()
48 48
 	{
49
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( 'CNC' );
49
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'product')->findItem('CNC');
50 50
 
51
-		$this->object->addProduct( $item->getId(), 1 );
51
+		$this->object->addProduct($item->getId(), 1);
52 52
 
53
-		$this->assertEquals( 1, count( $this->object->get()->getProducts() ) );
54
-		$this->assertEquals( 'CNC', $this->object->get()->getProduct( 0 )->getProductCode() );
55
-		$this->assertEquals( 0, count( $this->object->get()->getProduct( 0 )->getProducts() ) );
53
+		$this->assertEquals(1, count($this->object->get()->getProducts()));
54
+		$this->assertEquals('CNC', $this->object->get()->getProduct(0)->getProductCode());
55
+		$this->assertEquals(0, count($this->object->get()->getProduct(0)->getProducts()));
56 56
 	}
57 57
 }
Please login to merge, or discard this patch.