Completed
Push — master ( 8c1ffe...937f3b )
by Aimeos
08:49
created
controller/frontend/src/Controller/Frontend/Product/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 	/**
192 192
 	 * Returns the frontend controller
193 193
 	 *
194
-	 * @return \Aimeos\Controller\Frontend\Product\Iface Frontend controller object
194
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
195 195
 	 */
196 196
 	protected function getController()
197 197
 	{
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  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 35
 		$iface = '\Aimeos\Controller\Frontend\Product\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->controller = $controller;
43 43
 
44
-		parent::__construct( $context );
44
+		parent::__construct($context);
45 45
 	}
46 46
 
47 47
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return mixed Returns the value of the called method
54 54
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
55 55
 	 */
56
-	public function __call( $name, array $param )
56
+	public function __call($name, array $param)
57 57
 	{
58
-		return @call_user_func_array( array( $this->controller, $name ), $param );
58
+		return @call_user_func_array(array($this->controller, $name), $param);
59 59
 	}
60 60
 
61 61
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
70 70
 	 * @since 2017.03
71 71
 	 */
72
-	public function addFilterAttribute( \Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds )
72
+	public function addFilterAttribute(\Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds)
73 73
 	{
74
-		return $this->controller->addFilterAttribute( $filter, $attrIds, $optIds, $oneIds );
74
+		return $this->controller->addFilterAttribute($filter, $attrIds, $optIds, $oneIds);
75 75
 	}
76 76
 
77 77
 
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
88 88
 	 * @since 2017.03
89 89
 	 */
90
-	public function addFilterCategory( \Aimeos\MW\Criteria\Iface $filter, $catId,
91
-		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default' )
90
+	public function addFilterCategory(\Aimeos\MW\Criteria\Iface $filter, $catId,
91
+		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default')
92 92
 	{
93
-		return $this->controller->addFilterCategory( $filter, $catId, $level, $sort, $direction, $listtype );
93
+		return $this->controller->addFilterCategory($filter, $catId, $level, $sort, $direction, $listtype);
94 94
 	}
95 95
 
96 96
 
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
106 106
 	 * @since 2017.03
107 107
 	 */
108
-	public function addFilterText( \Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default' )
108
+	public function addFilterText(\Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default')
109 109
 	{
110
-		return $this->controller->addFilterText( $filter, $input, $sort, $direction, $listtype );
110
+		return $this->controller->addFilterText($filter, $input, $sort, $direction, $listtype);
111 111
 	}
112 112
 
113 113
 
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * @return array Associative list of key values as key and the product count for this key as value
120 120
 	 * @since 2015.08
121 121
 	 */
122
-	public function aggregate( \Aimeos\MW\Criteria\Iface $filter, $key )
122
+	public function aggregate(\Aimeos\MW\Criteria\Iface $filter, $key)
123 123
 	{
124
-		return $this->controller->aggregate( $filter, $key );
124
+		return $this->controller->aggregate($filter, $key);
125 125
 	}
126 126
 
127 127
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
137 137
 	 * @since 2015.08
138 138
 	 */
139
-	public function createFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
139
+	public function createFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default')
140 140
 	{
141
-		return $this->controller->createFilter( $sort, $direction, $start, $size, $listtype );
141
+		return $this->controller->createFilter($sort, $direction, $start, $size, $listtype);
142 142
 	}
143 143
 
144 144
 
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
 	 * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items
151 151
 	 * @since 2017.03
152 152
 	 */
153
-	public function getItem( $productId, array $domains = array( 'attribute', 'media', 'price', 'product', 'product/property', 'text' ) )
153
+	public function getItem($productId, array $domains = array('attribute', 'media', 'price', 'product', 'product/property', 'text'))
154 154
 	{
155
-		return $this->controller->getItem( $productId, $domains );
155
+		return $this->controller->getItem($productId, $domains);
156 156
 	}
157 157
 
158 158
 
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 	 * @return \Aimeos\MShop\Product\Item\Iface[] Associative list of product IDs as keys and product items as values
165 165
 	 * @since 2017.03
166 166
 	 */
167
-	public function getItems( array $productIds, array $domains = array( 'media', 'price', 'text' ) )
167
+	public function getItems(array $productIds, array $domains = array('media', 'price', 'text'))
168 168
 	{
169
-		return $this->controller->getItems( $productIds, $domains );
169
+		return $this->controller->getItems($productIds, $domains);
170 170
 	}
171 171
 
172 172
 
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 	 * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface
180 180
 	 * @since 2015.08
181 181
 	 */
182
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
182
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
183 183
 	{
184
-		return $this->controller->searchItems( $filter, $domains, $total );
184
+		return $this->controller->searchItems($filter, $domains, $total);
185 185
 	}
186 186
 
187 187
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 	/**
129 129
 	 * Returns the frontend controller
130 130
 	 *
131
-	 * @return \Aimeos\Controller\Frontend\Service\Iface Frontend controller object
131
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
132 132
 	 */
133 133
 	protected function getController()
134 134
 	{
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  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 35
 		$iface = '\Aimeos\Controller\Frontend\Service\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->controller = $controller;
43 43
 
44
-		parent::__construct( $context );
44
+		parent::__construct($context);
45 45
 	}
46 46
 
47 47
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return mixed Returns the value of the called method
54 54
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
55 55
 	 */
56
-	public function __call( $name, array $param )
56
+	public function __call($name, array $param)
57 57
 	{
58
-		return @call_user_func_array( array( $this->controller, $name ), $param );
58
+		return @call_user_func_array(array($this->controller, $name), $param);
59 59
 	}
60 60
 
61 61
 
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
68 68
 	 * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface with referenced items
69 69
 	 */
70
-	public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
71
-		$ref = array( 'media', 'price', 'text' ) )
70
+	public function getServices($type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
71
+		$ref = array('media', 'price', 'text'))
72 72
 	{
73
-		return $this->controller->getServices( $type, $basket, $ref );
73
+		return $this->controller->getServices($type, $basket, $ref);
74 74
 	}
75 75
 
76 76
 
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object
84 84
 	 * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface
85 85
 	 */
86
-	public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
86
+	public function getServiceAttributes($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
87 87
 	{
88
-		return $this->controller->getServiceAttributes( $type, $serviceId, $basket );
88
+		return $this->controller->getServiceAttributes($type, $serviceId, $basket);
89 89
 	}
90 90
 
91 91
 
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 	 * @throws \Aimeos\MShop\Exception If service provider isn't available
101 101
 	 * @throws \Exception If an error occurs
102 102
 	 */
103
-	public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
103
+	public function getServicePrice($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
104 104
 	{
105
-		return $this->controller->getServicePrice( $type, $serviceId, $basket );
105
+		return $this->controller->getServicePrice($type, $serviceId, $basket);
106 106
 	}
107 107
 
108 108
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 * @return array List of key/value pairs of attributes keys and an error message for values that are invalid or
117 117
 	 * 	missing
118 118
 	 */
119
-	public function checkServiceAttributes( $type, $serviceId, array $attributes )
119
+	public function checkServiceAttributes($type, $serviceId, array $attributes)
120 120
 	{
121
-		return $this->controller->checkServiceAttributes( $type, $serviceId, $attributes );
121
+		return $this->controller->checkServiceAttributes($type, $serviceId, $attributes);
122 122
 	}
123 123
 
124 124
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Basket\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/basket/name
35 35
 		 * Class name of the used basket frontend controller implementation
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/basket/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/basket/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false )
71
+		if (ctype_alnum($name) === false)
72 72
 		{
73
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>';
74
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
73
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>';
74
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75 75
 		}
76 76
 
77 77
 		$iface = '\\Aimeos\\Controller\\Frontend\\Basket\\Iface';
78 78
 		$classname = '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name;
79 79
 
80
-		$manager = self::createControllerBase( $context, $classname, $iface );
80
+		$manager = self::createControllerBase($context, $classname, $iface);
81 81
 
82 82
 		/** controller/frontend/basket/decorators/excludes
83 83
 		 * Excludes decorators added by the "common" option from the basket frontend controllers
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		 * @see controller/frontend/basket/decorators/excludes
154 154
 		 * @see controller/frontend/basket/decorators/global
155 155
 		 */
156
-		return self::addControllerDecorators( $context, $manager, 'basket' );
156
+		return self::addControllerDecorators($context, $manager, 'basket');
157 157
 	}
158 158
 
159 159
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Order\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/order/name
35 35
 		 * Class name of the used order frontend controller implementation
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/order/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/order/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false ) {
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
71
+		if (ctype_alnum($name) === false) {
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $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\\Order\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Order\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/order/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the order frontend controllers
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/order/decorators/excludes
153 153
 		 * @see controller/frontend/order/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'order' );
155
+		return self::addControllerDecorators($context, $manager, 'order');
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Catalog/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Catalog\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/catalog/name
35 35
 		 * Class name of the used catalog frontend controller implementation
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/catalog/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/catalog/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false )
71
+		if (ctype_alnum($name) === false)
72 72
 		{
73
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>';
74
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
73
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>';
74
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75 75
 		}
76 76
 
77 77
 		$iface = '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface';
78 78
 		$classname = '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name;
79 79
 
80
-		$manager = self::createControllerBase( $context, $classname, $iface );
80
+		$manager = self::createControllerBase($context, $classname, $iface);
81 81
 
82 82
 		/** controller/frontend/catalog/decorators/excludes
83 83
 		 * Excludes decorators added by the "common" option from the catalog frontend controllers
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		 * @see controller/frontend/catalog/decorators/excludes
154 154
 		 * @see controller/frontend/catalog/decorators/global
155 155
 		 */
156
-		return self::addControllerDecorators( $context, $manager, 'catalog' );
156
+		return self::addControllerDecorators($context, $manager, 'catalog');
157 157
 	}
158 158
 
159 159
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Common MShop context object
30 30
 	 */
31
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
31
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
32 32
 	{
33 33
 		$this->context = $context;
34 34
 	}
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 	 * @param array $param List of method parameter
42 42
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
43 43
 	 */
44
-	public function __call( $name, array $param )
44
+	public function __call($name, array $param)
45 45
 	{
46
-		throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
46
+		throw new \Aimeos\Controller\Frontend\Exception(sprintf('Unable to call method "%1$s"', $name));
47 47
 	}
48 48
 
49 49
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Service\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/service/name
35 35
 		 * Class name of the used service frontend controller implementation
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/service/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/service/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false ) {
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Service\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
71
+		if (ctype_alnum($name) === false) {
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Service\\' . $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\\Service\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Service\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/service/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the service frontend controllers
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/service/decorators/excludes
153 153
 		 * @see controller/frontend/service/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'service' );
155
+		return self::addControllerDecorators($context, $manager, 'service');
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Product/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\Product\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/product/name
34 34
 		 * Class name of the used product frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2017.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/product/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/product/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\\Product\\' . $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\\Product\\' . $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\\Product\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Product\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/product/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the product frontend controllers
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/product/decorators/excludes
153 153
 		 * @see controller/frontend/product/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'product' );
155
+		return self::addControllerDecorators($context, $manager, 'product');
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Factory.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 	 * @param integer $id Context ID the objects have been created with (string of \Aimeos\MShop\Context\Item\Iface)
31 31
 	 * @param string $path Path describing the controller to clear, e.g. "basket"
32 32
 	 */
33
-	static public function clear( $id = null, $path = null )
33
+	static public function clear($id = null, $path = null)
34 34
 	{
35
-		if( $id !== null )
35
+		if ($id !== null)
36 36
 		{
37
-			if( $path !== null ) {
37
+			if ($path !== null) {
38 38
 				self::$controllers[$id][$path] = null;
39 39
 			} else {
40 40
 				self::$controllers[$id] = array();
@@ -62,37 +62,37 @@  discard block
 block discarded – undo
62 62
 	 * @return \Aimeos\Controller\Frontend\Iface New frontend controller
63 63
 	 * @throws \Aimeos\Controller\Frontend\Exception If the given path is invalid or the manager wasn't found
64 64
 	 */
65
-	static public function createController( \Aimeos\MShop\Context\Item\Iface $context, $path )
65
+	static public function createController(\Aimeos\MShop\Context\Item\Iface $context, $path)
66 66
 	{
67
-		if( empty( $path ) ) {
68
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Controller path is empty' ) );
67
+		if (empty($path)) {
68
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Controller path is empty'));
69 69
 		}
70 70
 
71 71
 		$id = (string) $context;
72 72
 
73
-		if( self::$cache === false || !isset( self::$controllers[$id][$path] ) )
73
+		if (self::$cache === false || !isset(self::$controllers[$id][$path]))
74 74
 		{
75
-			$parts = explode( '/', $path );
75
+			$parts = explode('/', $path);
76 76
 
77
-			foreach( $parts as $key => $part )
77
+			foreach ($parts as $key => $part)
78 78
 			{
79
-				if( ctype_alnum( $part ) === false ) {
80
-					throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in controller name "%1$s" in "%2$s"', $part, $path ) );
79
+				if (ctype_alnum($part) === false) {
80
+					throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in controller name "%1$s" in "%2$s"', $part, $path));
81 81
 				}
82 82
 
83
-				$parts[$key] = ucwords( $part );
83
+				$parts[$key] = ucwords($part);
84 84
 			}
85 85
 
86
-			$factory = '\\Aimeos\\Controller\\Frontend\\' . join( '\\', $parts ) . '\\Factory';
86
+			$factory = '\\Aimeos\\Controller\\Frontend\\' . join('\\', $parts) . '\\Factory';
87 87
 
88
-			if( class_exists( $factory ) === false ) {
89
-				throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Class "%1$s" not available', $factory ) );
88
+			if (class_exists($factory) === false) {
89
+				throw new \Aimeos\Controller\Frontend\Exception(sprintf('Class "%1$s" not available', $factory));
90 90
 			}
91 91
 
92
-			$manager = call_user_func_array( array( $factory, 'createController' ), array( $context ) );
92
+			$manager = call_user_func_array(array($factory, 'createController'), array($context));
93 93
 
94
-			if( $manager === false ) {
95
-				throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid factory "%1$s"', $factory ) );
94
+			if ($manager === false) {
95
+				throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid factory "%1$s"', $factory));
96 96
 			}
97 97
 
98 98
 			self::$controllers[$id][$path] = $manager;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * @param boolean $value True to enable caching, false to disable it.
109 109
 	 * @return boolean Previous cache setting
110 110
 	 */
111
-	static public function setCache( $value )
111
+	static public function setCache($value)
112 112
 	{
113 113
 		$old = self::$cache;
114 114
 		self::$cache = (boolean) $value;
Please login to merge, or discard this patch.