Completed
Push — master ( 7164bc...d21ec6 )
by Aimeos
02:07
created
controller/frontend/src/Controller/Frontend/Attribute/Standard.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
30 30
 	 * @since 2017.03
31 31
 	 */
32
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
32
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
33 33
 	{
34
-		if( !empty( $codes ) )
34
+		if (!empty($codes))
35 35
 		{
36 36
 			$expr = [
37
-				$filter->compare( '==', 'attribute.type.code', $codes ),
37
+				$filter->compare('==', 'attribute.type.code', $codes),
38 38
 				$filter->getConditions(),
39 39
 			];
40
-			$filter->setConditions( $filter->combine( '&&', $expr ) );
40
+			$filter->setConditions($filter->combine('&&', $expr));
41 41
 		}
42 42
 
43 43
 		return $filter;
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function createFilter()
55 55
 	{
56
-		$filter = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->createSearch( true );
56
+		$filter = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->createSearch(true);
57 57
 
58 58
 		$expr = array(
59
-			$filter->compare( '==', 'attribute.domain', 'product' ),
59
+			$filter->compare('==', 'attribute.domain', 'product'),
60 60
 			$filter->getConditions(),
61 61
 		);
62 62
 
63
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
64
-		$filter->setSortations( array( $filter->sort( '+', 'attribute.position' ) ) );
63
+		$filter->setConditions($filter->combine('&&', $expr));
64
+		$filter->setSortations(array($filter->sort('+', 'attribute.position')));
65 65
 
66 66
 		return $filter;
67 67
 	}
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items
76 76
 	 * @since 2017.03
77 77
 	 */
78
-	public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) )
78
+	public function getItem($id, array $domains = array('media', 'price', 'text'))
79 79
 	{
80
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->getItem( $id, $domains, true );
80
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->getItem($id, $domains, true);
81 81
 	}
82 82
 
83 83
 
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of attribute item including the referenced domains items
90 90
 	 * @since 2017.03
91 91
 	 */
92
-	public function getItems( array $ids, array $domains = array( 'media', 'price', 'text' ) )
92
+	public function getItems(array $ids, array $domains = array('media', 'price', 'text'))
93 93
 	{
94
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' );
94
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute');
95 95
 
96
-		$filter = $manager->createSearch( true );
96
+		$filter = $manager->createSearch(true);
97 97
 		$expr = [
98
-			$filter->compare( '==', 'attribute.domain', 'product' ),
99
-			$filter->compare( '==', 'attribute.id', $ids ),
98
+			$filter->compare('==', 'attribute.domain', 'product'),
99
+			$filter->compare('==', 'attribute.id', $ids),
100 100
 			$filter->getConditions(),
101 101
 		];
102
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
103
-		$filter->setSortations( array( $filter->sort( '+', 'attribute.position' ) ) );
102
+		$filter->setConditions($filter->combine('&&', $expr));
103
+		$filter->setSortations(array($filter->sort('+', 'attribute.position')));
104 104
 
105
-		return $manager->searchItems( $filter, $domains );
105
+		return $manager->searchItems($filter, $domains);
106 106
 	}
107 107
 
108 108
 
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 	 * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface
116 116
 	 * @since 2017.03
117 117
 	 */
118
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
118
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
119 119
 	{
120
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->searchItems( $filter, $domains, $total );
120
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->searchItems($filter, $domains, $total);
121 121
 	}
122 122
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Iface.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @param string $type Arbitrary order type (max. eight chars)
28 28
 	 * @return \Aimeos\MShop\Order\Item\Iface Created order object
29 29
 	 */
30
-	public function addItem( $baseId, $type );
30
+	public function addItem($baseId, $type);
31 31
 
32 32
 
33 33
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @param boolean $default Use default criteria to limit orders
46 46
 	 * @return \Aimeos\MShop\Order\Item\Iface Order object
47 47
 	 */
48
-	public function getItem( $id, $default = true );
48
+	public function getItem($id, $default = true);
49 49
 
50 50
 
51 51
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param integer &$total|null Variable that will contain the total number of available items
56 56
 	 * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values
57 57
 	 */
58
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
58
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
59 59
 
60 60
 
61 61
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
78 78
 	 * @return void
79 79
 	 */
80
-	public function block( \Aimeos\MShop\Order\Item\Iface $orderItem );
80
+	public function block(\Aimeos\MShop\Order\Item\Iface $orderItem);
81 81
 
82 82
 
83 83
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
100 100
 	 * @return void
101 101
 	 */
102
-	public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem );
102
+	public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem);
103 103
 
104 104
 
105 105
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
118 118
 	 * @return void
119 119
 	 */
120
-	public function update( \Aimeos\MShop\Order\Item\Iface $orderItem );
120
+	public function update(\Aimeos\MShop\Order\Item\Iface $orderItem);
121 121
 
122 122
 
123 123
 	/**
@@ -131,5 +131,5 @@  discard block
 block discarded – undo
131 131
 	 * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket
132 132
 	 * @deprecated 2017.04 Use store() from basket controller instead
133 133
 	 */
134
-	public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket );
134
+	public function store(\Aimeos\MShop\Order\Item\Base\Iface $basket);
135 135
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Decorator/Base.php 1 patch
Spacing   +21 added lines, -21 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\Order\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
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 	 * @param string $type Arbitrary order type (max. eight chars)
67 67
 	 * @return \Aimeos\MShop\Order\Item\Iface Created order object
68 68
 	 */
69
-	public function addItem( $baseId, $type )
69
+	public function addItem($baseId, $type)
70 70
 	{
71
-		return $this->controller->addItem( $baseId, $type );
71
+		return $this->controller->addItem($baseId, $type);
72 72
 	}
73 73
 
74 74
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @param boolean $default Use default criteria to limit orders
91 91
 	 * @return \Aimeos\MShop\Order\Item\Iface Order object
92 92
 	 */
93
-	public function getItem( $id, $default = true )
93
+	public function getItem($id, $default = true)
94 94
 	{
95
-		return $this->controller->getItem( $id );
95
+		return $this->controller->getItem($id);
96 96
 	}
97 97
 
98 98
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	 * @param integer &$total|null Variable that will contain the total number of available items
104 104
 	 * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values
105 105
 	 */
106
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
106
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
107 107
 	{
108
-		return $this->controller->searchItems( $filter, $total );
108
+		return $this->controller->searchItems($filter, $total);
109 109
 	}
110 110
 
111 111
 
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
129 129
 	 * @return void
130 130
 	 */
131
-	public function block( \Aimeos\MShop\Order\Item\Iface $orderItem )
131
+	public function block(\Aimeos\MShop\Order\Item\Iface $orderItem)
132 132
 	{
133
-		$this->getController()->block( $orderItem );
133
+		$this->getController()->block($orderItem);
134 134
 	}
135 135
 
136 136
 
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
154 154
 	 * @return void
155 155
 	 */
156
-	public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem )
156
+	public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem)
157 157
 	{
158
-		$this->getController()->unblock( $orderItem );
158
+		$this->getController()->unblock($orderItem);
159 159
 	}
160 160
 
161 161
 
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
175 175
 	 * @return void
176 176
 	 */
177
-	public function update( \Aimeos\MShop\Order\Item\Iface $orderItem )
177
+	public function update(\Aimeos\MShop\Order\Item\Iface $orderItem)
178 178
 	{
179
-		$this->getController()->update( $orderItem );
179
+		$this->getController()->update($orderItem);
180 180
 	}
181 181
 
182 182
 
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
 	 * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket
192 192
 	 * @deprecated 2017.04 Use store() from basket controller instead
193 193
 	 */
194
-	public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket )
194
+	public function store(\Aimeos\MShop\Order\Item\Base\Iface $basket)
195 195
 	{
196
-		return $this->getController()->store( $basket );
196
+		return $this->getController()->store($basket);
197 197
 	}
198 198
 
199 199
 
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Service/StandardTest.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -17,125 +17,125 @@  discard block
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		\Aimeos\MShop\Factory::setCache( true );
20
+		\Aimeos\MShop\Factory::setCache(true);
21 21
 
22 22
 		$this->context = \TestHelperFrontend::getContext();
23
-		$this->object = new \Aimeos\Controller\Frontend\Service\Standard( $this->context );
23
+		$this->object = new \Aimeos\Controller\Frontend\Service\Standard($this->context);
24 24
 	}
25 25
 
26 26
 
27 27
 	public static function setUpBeforeClass()
28 28
 	{
29
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
30
-		$orderBaseMgr = $orderManager->getSubManager( 'base' );
29
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
30
+		$orderBaseMgr = $orderManager->getSubManager('base');
31 31
 		self::$basket = $orderBaseMgr->createItem();
32 32
 	}
33 33
 
34 34
 
35 35
 	protected function tearDown()
36 36
 	{
37
-		unset( $this->object, $this->context );
37
+		unset($this->object, $this->context);
38 38
 
39
-		\Aimeos\MShop\Factory::setCache( false );
39
+		\Aimeos\MShop\Factory::setCache(false);
40 40
 		\Aimeos\MShop\Factory::clear();
41 41
 	}
42 42
 
43 43
 
44 44
 	public function testCheckAttributes()
45 45
 	{
46
-		$attributes = $this->object->checkAttributes( $this->getServiceItem()->getId(), [] );
47
-		$this->assertEquals( [], $attributes );
46
+		$attributes = $this->object->checkAttributes($this->getServiceItem()->getId(), []);
47
+		$this->assertEquals([], $attributes);
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testGetProviders()
52 52
 	{
53
-		$providers = $this->object->getProviders( 'delivery' );
54
-		$this->assertGreaterThan( 0, count( $providers ) );
53
+		$providers = $this->object->getProviders('delivery');
54
+		$this->assertGreaterThan(0, count($providers));
55 55
 
56
-		foreach( $providers as $provider ) {
57
-			$this->assertInstanceOf( '\\Aimeos\\MShop\\Service\\Provider\\Iface', $provider );
56
+		foreach ($providers as $provider) {
57
+			$this->assertInstanceOf('\\Aimeos\\MShop\\Service\\Provider\\Iface', $provider);
58 58
 		}
59 59
 	}
60 60
 
61 61
 
62 62
 	public function testGetProvider()
63 63
 	{
64
-		$provider = $this->object->getProvider( $this->getServiceItem()->getId() );
65
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Service\\Provider\\Iface', $provider );
64
+		$provider = $this->object->getProvider($this->getServiceItem()->getId());
65
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Service\\Provider\\Iface', $provider);
66 66
 	}
67 67
 
68 68
 
69 69
 	public function testProcess()
70 70
 	{
71 71
 		$form = new \Aimeos\MShop\Common\Item\Helper\Form\Standard();
72
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
73
-		$serviceId = \Aimeos\MShop\Factory::createManager( $this->context, 'service' )->findItem( 'unitcode' )->getId();
72
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
73
+		$serviceId = \Aimeos\MShop\Factory::createManager($this->context, 'service')->findItem('unitcode')->getId();
74 74
 
75
-		$provider = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' )
75
+		$provider = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard')
76 76
 			->disableOriginalConstructor()
77
-			->setMethods( ['process'] )
77
+			->setMethods(['process'])
78 78
 			->getMock();
79 79
 
80
-		$manager = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
81
-			->setConstructorArgs( [$this->context] )
82
-			->setMethods( ['getProvider'] )
80
+		$manager = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
81
+			->setConstructorArgs([$this->context])
82
+			->setMethods(['getProvider'])
83 83
 			->getMock();
84 84
 
85
-		\Aimeos\MShop\Factory::injectManager( $this->context, 'service', $manager );
85
+		\Aimeos\MShop\Factory::injectManager($this->context, 'service', $manager);
86 86
 
87
-		$provider->expects( $this->once() )->method( 'process' )->will( $this->returnValue( $form ) );
88
-		$manager->expects( $this->once() )->method( 'getProvider' )->will( $this->returnValue( $provider ) );
87
+		$provider->expects($this->once())->method('process')->will($this->returnValue($form));
88
+		$manager->expects($this->once())->method('getProvider')->will($this->returnValue($provider));
89 89
 
90 90
 
91
-		$result = $this->object->process( $item, $serviceId, [], [] );
92
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Helper\Form\Iface', $result );
91
+		$result = $this->object->process($item, $serviceId, [], []);
92
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Item\Helper\Form\Iface', $result);
93 93
 	}
94 94
 
95 95
 
96 96
 	public function testUpdateSync()
97 97
 	{
98
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
98
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
99 99
 
100
-		$stream = $this->getMockBuilder( 'Psr\Http\Message\StreamInterface' )->getMock();
101
-		$request = $this->getMockBuilder( '\Psr\Http\Message\ServerRequestInterface' )->getMock();
102
-		$response = $this->getMockBuilder( '\Aimeos\MW\View\Helper\Response\Iface' )
100
+		$stream = $this->getMockBuilder('Psr\Http\Message\StreamInterface')->getMock();
101
+		$request = $this->getMockBuilder('\Psr\Http\Message\ServerRequestInterface')->getMock();
102
+		$response = $this->getMockBuilder('\Aimeos\MW\View\Helper\Response\Iface')
103 103
 			->getMock();
104 104
 
105
-		$provider = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' )
106
-			->setMethods( ['updateSync', 'query', 'isImplemented'] )
105
+		$provider = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard')
106
+			->setMethods(['updateSync', 'query', 'isImplemented'])
107 107
 			->disableOriginalConstructor()
108 108
 			->getMock();
109 109
 
110
-		$manager = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
111
-			->setConstructorArgs( array( $this->context ) )
112
-			->setMethods( ['getProvider'] )
110
+		$manager = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
111
+			->setConstructorArgs(array($this->context))
112
+			->setMethods(['getProvider'])
113 113
 			->getMock();
114 114
 
115
-		\Aimeos\MShop\Factory::injectManager( $this->context, 'service', $manager );
115
+		\Aimeos\MShop\Factory::injectManager($this->context, 'service', $manager);
116 116
 
117 117
 
118
-		$request->expects( $this->once() )->method( 'getQueryParams' )->will( $this->returnValue( ['code' => 'unitcode'] ) );
119
-		$response->expects( $this->once() )->method( 'createStreamFromString' )->will( $this->returnValue( $stream ) );
120
-		$manager->expects( $this->once() )->method( 'getProvider' )->will( $this->returnValue( $provider ) );
121
-		$provider->expects( $this->once() )->method( 'updateSync' )->will( $this->returnValue( $item ) );
122
-		$provider->expects( $this->once() )->method( 'isImplemented' )->will( $this->returnValue( true ) );
123
-		$provider->expects( $this->once() )->method( 'query' );
118
+		$request->expects($this->once())->method('getQueryParams')->will($this->returnValue(['code' => 'unitcode']));
119
+		$response->expects($this->once())->method('createStreamFromString')->will($this->returnValue($stream));
120
+		$manager->expects($this->once())->method('getProvider')->will($this->returnValue($provider));
121
+		$provider->expects($this->once())->method('updateSync')->will($this->returnValue($item));
122
+		$provider->expects($this->once())->method('isImplemented')->will($this->returnValue(true));
123
+		$provider->expects($this->once())->method('query');
124 124
 
125
-		$this->object->updateSync( $request, $response, [], 'paypalexpress', -1 );
125
+		$this->object->updateSync($request, $response, [], 'paypalexpress', -1);
126 126
 	}
127 127
 
128 128
 
129 129
 	public function testGetServices()
130 130
 	{
131
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
132
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
131
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
132
+		$basket = $orderManager->getSubManager('base')->createItem();
133 133
 
134
-		$services = $this->object->getServices( 'delivery', $basket );
135
-		$this->assertGreaterThan( 0, count( $services ) );
134
+		$services = $this->object->getServices('delivery', $basket);
135
+		$this->assertGreaterThan(0, count($services));
136 136
 
137
-		foreach( $services as $service ) {
138
-			$this->assertInstanceOf( '\\Aimeos\\MShop\\Service\\Item\\Iface', $service );
137
+		foreach ($services as $service) {
138
+			$this->assertInstanceOf('\\Aimeos\\MShop\\Service\\Item\\Iface', $service);
139 139
 		}
140 140
 	}
141 141
 
@@ -143,83 +143,83 @@  discard block
 block discarded – undo
143 143
 	public function testGetServiceAttributes()
144 144
 	{
145 145
 		$service = $this->getServiceItem();
146
-		$attributes = $this->object->getServiceAttributes( 'delivery', $service->getId(), self::$basket );
146
+		$attributes = $this->object->getServiceAttributes('delivery', $service->getId(), self::$basket);
147 147
 
148
-		$this->assertEquals( 0, count( $attributes ) );
148
+		$this->assertEquals(0, count($attributes));
149 149
 	}
150 150
 
151 151
 
152 152
 	public function testGetServiceAttributesCache()
153 153
 	{
154
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
155
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
154
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
155
+		$basket = $orderManager->getSubManager('base')->createItem();
156 156
 
157
-		$services = $this->object->getServices( 'delivery', $basket );
157
+		$services = $this->object->getServices('delivery', $basket);
158 158
 
159
-		if( ( $service = reset( $services ) ) === false ) {
160
-			throw new \RuntimeException( 'No service item found' );
159
+		if (($service = reset($services)) === false) {
160
+			throw new \RuntimeException('No service item found');
161 161
 		}
162 162
 
163
-		$attributes = $this->object->getServiceAttributes( 'delivery', $service->getId(), self::$basket );
163
+		$attributes = $this->object->getServiceAttributes('delivery', $service->getId(), self::$basket);
164 164
 
165
-		$this->assertEquals( 0, count( $attributes ) );
165
+		$this->assertEquals(0, count($attributes));
166 166
 	}
167 167
 
168 168
 
169 169
 	public function testGetServiceAttributesNoItems()
170 170
 	{
171
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
172
-		$this->object->getServiceAttributes( 'invalid', -1, self::$basket );
171
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
172
+		$this->object->getServiceAttributes('invalid', -1, self::$basket);
173 173
 	}
174 174
 
175 175
 
176 176
 	public function testGetServicePrice()
177 177
 	{
178
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
179
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
178
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
179
+		$basket = $orderManager->getSubManager('base')->createItem();
180 180
 
181 181
 		$service = $this->getServiceItem();
182
-		$price = $this->object->getServicePrice( 'delivery', $service->getId(), $basket );
182
+		$price = $this->object->getServicePrice('delivery', $service->getId(), $basket);
183 183
 
184
-		$this->assertEquals( '12.95', $price->getValue() );
185
-		$this->assertEquals( '1.99', $price->getCosts() );
184
+		$this->assertEquals('12.95', $price->getValue());
185
+		$this->assertEquals('1.99', $price->getCosts());
186 186
 	}
187 187
 
188 188
 
189 189
 	public function testGetServicePriceCache()
190 190
 	{
191
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
192
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
191
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
192
+		$basket = $orderManager->getSubManager('base')->createItem();
193 193
 
194
-		$services = $this->object->getServices( 'delivery', $basket );
194
+		$services = $this->object->getServices('delivery', $basket);
195 195
 
196
-		if( ( $service = reset( $services ) ) === false ) {
197
-			throw new \RuntimeException( 'No service item found' );
196
+		if (($service = reset($services)) === false) {
197
+			throw new \RuntimeException('No service item found');
198 198
 		}
199 199
 
200
-		$price = $this->object->getServicePrice( 'delivery', $service->getId(), $basket );
200
+		$price = $this->object->getServicePrice('delivery', $service->getId(), $basket);
201 201
 
202
-		$this->assertEquals( '12.95', $price->getValue() );
203
-		$this->assertEquals( '1.99', $price->getCosts() );
202
+		$this->assertEquals('12.95', $price->getValue());
203
+		$this->assertEquals('1.99', $price->getCosts());
204 204
 	}
205 205
 
206 206
 
207 207
 	public function testGetServicePriceNoItems()
208 208
 	{
209
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
210
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
209
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
210
+		$basket = $orderManager->getSubManager('base')->createItem();
211 211
 
212
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
213
-		$this->object->getServicePrice( 'invalid', -1, $basket );
212
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
213
+		$this->object->getServicePrice('invalid', -1, $basket);
214 214
 	}
215 215
 
216 216
 
217 217
 	public function testCheckServiceAttributes()
218 218
 	{
219 219
 		$service = $this->getServiceItem();
220
-		$attributes = $this->object->checkServiceAttributes( 'delivery', $service->getId(), [] );
220
+		$attributes = $this->object->checkServiceAttributes('delivery', $service->getId(), []);
221 221
 
222
-		$this->assertEquals( [], $attributes );
222
+		$this->assertEquals([], $attributes);
223 223
 	}
224 224
 
225 225
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 */
229 229
 	protected function getServiceItem()
230 230
 	{
231
-		$manager = \Aimeos\MShop\Service\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
232
-		return $manager->findItem( 'unitcode' );
231
+		$manager = \Aimeos\MShop\Service\Manager\Factory::createManager(\TestHelperFrontend::getContext());
232
+		return $manager->findItem('unitcode');
233 233
 	}
234 234
 }
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Service/Decorator/BaseTest.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -20,161 +20,161 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testConstructException()
40 40
 	{
41
-		$stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Iface' )->getMock();
41
+		$stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Iface')->getMock();
42 42
 
43
-		$this->setExpectedException( '\Aimeos\Controller\Frontend\Exception' );
43
+		$this->setExpectedException('\Aimeos\Controller\Frontend\Exception');
44 44
 
45
-		$this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Decorator\Base' )
46
-			->setConstructorArgs( [$stub, $this->context] )
45
+		$this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Decorator\Base')
46
+			->setConstructorArgs([$stub, $this->context])
47 47
 			->getMockForAbstractClass();
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testCall()
52 52
 	{
53
-		$stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Standard' )
53
+		$stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Standard')
54 54
 			->disableOriginalConstructor()
55
-			->setMethods( ['invalid'] )
55
+			->setMethods(['invalid'])
56 56
 			->getMock();
57 57
 
58
-		$object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Decorator\Base' )
59
-			->setConstructorArgs( [$stub, $this->context] )
58
+		$object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Decorator\Base')
59
+			->setConstructorArgs([$stub, $this->context])
60 60
 			->getMockForAbstractClass();
61 61
 
62
-		$stub->expects( $this->once() )->method( 'invalid' )->will( $this->returnValue( true ) );
62
+		$stub->expects($this->once())->method('invalid')->will($this->returnValue(true));
63 63
 
64
-		$this->assertTrue( $object->invalid() );
64
+		$this->assertTrue($object->invalid());
65 65
 	}
66 66
 
67 67
 
68 68
 	public function testCheckAttributes()
69 69
 	{
70
-		$this->stub->expects( $this->once() )->method( 'checkAttributes' )
71
-			->will( $this->returnValue( [] ) );
70
+		$this->stub->expects($this->once())->method('checkAttributes')
71
+			->will($this->returnValue([]));
72 72
 
73
-		$this->assertEquals( [], $this->object->checkAttributes( -1, [] ) );
73
+		$this->assertEquals([], $this->object->checkAttributes( -1, [] ));
74 74
 	}
75 75
 
76 76
 
77 77
 	public function testGetProvider()
78 78
 	{
79
-		$manager = \Aimeos\MShop\Factory::createManager( $this->context, 'service' );
80
-		$provider = $manager->getProvider( $manager->findItem( 'unitcode', [], 'service', 'delivery' ) );
79
+		$manager = \Aimeos\MShop\Factory::createManager($this->context, 'service');
80
+		$provider = $manager->getProvider($manager->findItem('unitcode', [], 'service', 'delivery'));
81 81
 
82
-		$this->stub->expects( $this->once() )->method( 'getProvider' )
83
-			->will( $this->returnValue( $provider ) );
82
+		$this->stub->expects($this->once())->method('getProvider')
83
+			->will($this->returnValue($provider));
84 84
 
85
-		$this->assertSame( $provider, $this->object->getProvider( -1 ) );
85
+		$this->assertSame($provider, $this->object->getProvider( -1 ));
86 86
 	}
87 87
 
88 88
 
89 89
 	public function testGetProviders()
90 90
 	{
91
-		$this->stub->expects( $this->once() )->method( 'getProviders' )
92
-			->will( $this->returnValue( [] ) );
91
+		$this->stub->expects($this->once())->method('getProviders')
92
+			->will($this->returnValue([]));
93 93
 
94
-		$this->assertEquals( [], $this->object->getProviders( 'payment' ) );
94
+		$this->assertEquals([], $this->object->getProviders('payment'));
95 95
 	}
96 96
 
97 97
 
98 98
 	public function testProcess()
99 99
 	{
100
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
100
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
101 101
 
102
-		$this->stub->expects( $this->once() )->method( 'process' )
103
-			->will( $this->returnValue( new \Aimeos\MShop\Common\Item\Helper\Form\Standard() ) );
102
+		$this->stub->expects($this->once())->method('process')
103
+			->will($this->returnValue(new \Aimeos\MShop\Common\Item\Helper\Form\Standard()));
104 104
 
105
-		$this->assertInstanceOf( 'Aimeos\MShop\Common\Item\Helper\Form\Iface', $this->object->process( $item, -1, [], [] ) );
105
+		$this->assertInstanceOf('Aimeos\MShop\Common\Item\Helper\Form\Iface', $this->object->process($item, -1, [], []));
106 106
 	}
107 107
 
108 108
 
109 109
 	public function testUpdateSync()
110 110
 	{
111
-		$response = $this->getMockBuilder( '\Psr\Http\Message\ResponseInterface' )->getMock();
112
-		$request = $this->getMockBuilder( '\Psr\Http\Message\ServerRequestInterface' )->getMock();
113
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
111
+		$response = $this->getMockBuilder('\Psr\Http\Message\ResponseInterface')->getMock();
112
+		$request = $this->getMockBuilder('\Psr\Http\Message\ServerRequestInterface')->getMock();
113
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
114 114
 
115
-		$this->stub->expects( $this->once() )->method( 'updateSync' )
116
-			->will( $this->returnValue( $item ) );
115
+		$this->stub->expects($this->once())->method('updateSync')
116
+			->will($this->returnValue($item));
117 117
 
118
-		$this->assertInstanceOf( 'Aimeos\MShop\Order\Item\Iface', $this->object->updateSync( $request, $response, [], 'test', -1 ) );
118
+		$this->assertInstanceOf('Aimeos\MShop\Order\Item\Iface', $this->object->updateSync($request, $response, [], 'test', -1));
119 119
 	}
120 120
 
121 121
 
122 122
 	public function testGetServices()
123 123
 	{
124
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
124
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
125 125
 
126
-		$this->stub->expects( $this->once() )->method( 'getServices' )
127
-			->will( $this->returnValue( [] ) );
126
+		$this->stub->expects($this->once())->method('getServices')
127
+			->will($this->returnValue([]));
128 128
 
129
-		$this->assertEquals( [], $this->object->getServices( 'payment', $basket ) );
129
+		$this->assertEquals([], $this->object->getServices('payment', $basket));
130 130
 	}
131 131
 
132 132
 
133 133
 	public function testGetServiceAttributes()
134 134
 	{
135
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
135
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
136 136
 
137
-		$this->stub->expects( $this->once() )->method( 'getServiceAttributes' )
138
-			->will( $this->returnValue( [] ) );
137
+		$this->stub->expects($this->once())->method('getServiceAttributes')
138
+			->will($this->returnValue([]));
139 139
 
140
-		$this->assertEquals( [], $this->object->getServiceAttributes( 'payment', -1, $basket ) );
140
+		$this->assertEquals([], $this->object->getServiceAttributes('payment', -1, $basket));
141 141
 	}
142 142
 
143 143
 
144 144
 	public function testGetServicePrice()
145 145
 	{
146
-		$priceItem = \Aimeos\MShop\Factory::createManager( $this->context, 'price' )->createItem();
147
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
146
+		$priceItem = \Aimeos\MShop\Factory::createManager($this->context, 'price')->createItem();
147
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
148 148
 
149
-		$this->stub->expects( $this->once() )->method( 'getServicePrice' )
150
-			->will( $this->returnValue( $priceItem ) );
149
+		$this->stub->expects($this->once())->method('getServicePrice')
150
+			->will($this->returnValue($priceItem));
151 151
 
152
-		$this->assertInstanceOf( '\Aimeos\MShop\Price\Item\Iface', $this->object->getServicePrice( 'payment', -1, $basket ) );
152
+		$this->assertInstanceOf('\Aimeos\MShop\Price\Item\Iface', $this->object->getServicePrice('payment', -1, $basket));
153 153
 	}
154 154
 
155 155
 
156 156
 	public function testCheckServiceAttributes()
157 157
 	{
158
-		$this->stub->expects( $this->once() )->method( 'checkServiceAttributes' )
159
-			->will( $this->returnValue( [] ) );
158
+		$this->stub->expects($this->once())->method('checkServiceAttributes')
159
+			->will($this->returnValue([]));
160 160
 
161
-		$this->assertEquals( [], $this->object->checkServiceAttributes( 'payment', -1, [] ) );
161
+		$this->assertEquals([], $this->object->checkServiceAttributes('payment', -1, []));
162 162
 	}
163 163
 
164 164
 
165 165
 	public function testGetController()
166 166
 	{
167
-		$result = $this->access( 'getController' )->invokeArgs( $this->object, [] );
167
+		$result = $this->access('getController')->invokeArgs($this->object, []);
168 168
 
169
-		$this->assertSame( $this->stub, $result );
169
+		$this->assertSame($this->stub, $result);
170 170
 	}
171 171
 
172 172
 
173
-	protected function access( $name )
173
+	protected function access($name)
174 174
 	{
175
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Service\Decorator\Base' );
176
-		$method = $class->getMethod( $name );
177
-		$method->setAccessible( true );
175
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Service\Decorator\Base');
176
+		$method = $class->getMethod($name);
177
+		$method->setAccessible(true);
178 178
 
179 179
 		return $method;
180 180
 	}
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Iface.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @param string[] $attributes List of attribute codes as keys and strings entered by the customer as value
31 31
 	 * @return string[] List of attributes codes as keys and error messages as values for invalid or missing values
32 32
 	 */
33
-	public function checkAttributes( $serviceId, array $attributes );
33
+	public function checkAttributes($serviceId, array $attributes);
34 34
 
35 35
 	/**
36 36
 	 * Returns the service item for the given ID
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
40 40
 	 * @return \Aimeos\MShop\Service\Provider\Iface Service provider object
41 41
 	 */
42
-	public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] );
42
+	public function getProvider($serviceId, $ref = ['media', 'price', 'text']);
43 43
 
44 44
 	/**
45 45
 	 * Returns the service providers for the given type
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
49 49
 	 * @return \Aimeos\MShop\Service\Provider\Iface[] List of service IDs as keys and service provider objects as values
50 50
 	 */
51
-	public function getProviders( $type = null, $ref = ['media', 'price', 'text'] );
51
+	public function getProviders($type = null, $ref = ['media', 'price', 'text']);
52 52
 
53 53
 	/**
54 54
 	 * Processes the service for the given order, e.g. payment and delivery services
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Iface|null Form object with URL, parameters, etc.
62 62
 	 * 	or null if no form data is required
63 63
 	 */
64
-	public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params );
64
+	public function process(\Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params);
65 65
 
66 66
 	/**
67 67
 	 * Updates the payment or delivery status for the given request
@@ -74,5 +74,5 @@  discard block
 block discarded – undo
74 74
 	 * @param string $orderid Unique ID of the order whose payment status should be updated
75 75
 	 * @return \Aimeos\MShop\Order\Item\Iface $orderItem Order item that has been updated
76 76
 	 */
77
-	public function updateSync( ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid );
77
+	public function updateSync(ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid);
78 78
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Standard.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 	 * @param string[] $attributes List of attribute codes as keys and strings entered by the customer as value
36 36
 	 * @return string[] List of attributes codes as keys and error messages as values for invalid or missing values
37 37
 	 */
38
-	public function checkAttributes( $serviceId, array $attributes )
38
+	public function checkAttributes($serviceId, array $attributes)
39 39
 	{
40
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
41
-		$provider = $manager->getProvider( $manager->getItem( $serviceId, [], true ) );
40
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
41
+		$provider = $manager->getProvider($manager->getItem($serviceId, [], true));
42 42
 
43
-		return array_filter( $provider->checkConfigFE( $attributes ) );
43
+		return array_filter($provider->checkConfigFE($attributes));
44 44
 	}
45 45
 
46 46
 
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 	 * @param string[] $ref List of domain names whose items should be fetched too
52 52
 	 * @return \Aimeos\MShop\Service\Provider\Iface Service provider object
53 53
 	 */
54
-	public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] )
54
+	public function getProvider($serviceId, $ref = ['media', 'price', 'text'])
55 55
 	{
56
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
57
-		return $manager->getProvider( $manager->getItem( $serviceId, $ref, true ) );
56
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
57
+		return $manager->getProvider($manager->getItem($serviceId, $ref, true));
58 58
 	}
59 59
 
60 60
 
@@ -65,26 +65,26 @@  discard block
 block discarded – undo
65 65
 	 * @param string[] $ref List of domain names whose items should be fetched too
66 66
 	 * @return \Aimeos\MShop\Service\Provider\Iface[] List of service IDs as keys and service provider objects as values
67 67
 	 */
68
-	public function getProviders( $type = null, $ref = ['media', 'price', 'text'] )
68
+	public function getProviders($type = null, $ref = ['media', 'price', 'text'])
69 69
 	{
70 70
 		$list = [];
71
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
71
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
72 72
 
73
-		$search = $manager->createSearch( true );
74
-		$search->setSortations( array( $search->sort( '+', 'service.position' ) ) );
73
+		$search = $manager->createSearch(true);
74
+		$search->setSortations(array($search->sort('+', 'service.position')));
75 75
 
76
-		if( $type != null )
76
+		if ($type != null)
77 77
 		{
78 78
 			$expr = array(
79 79
 				$search->getConditions(),
80
-				$search->compare( '==', 'service.type.code', $type ),
81
-				$search->compare( '==', 'service.type.domain', 'service' ),
80
+				$search->compare('==', 'service.type.code', $type),
81
+				$search->compare('==', 'service.type.domain', 'service'),
82 82
 			);
83
-			$search->setConditions( $search->combine( '&&', $expr ) );
83
+			$search->setConditions($search->combine('&&', $expr));
84 84
 		}
85 85
 
86
-		foreach( $manager->searchItems( $search, $ref ) as $id => $item ) {
87
-			$list[$id] = $manager->getProvider( $item );
86
+		foreach ($manager->searchItems($search, $ref) as $id => $item) {
87
+			$list[$id] = $manager->getProvider($item);
88 88
 		}
89 89
 
90 90
 		return $list;
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Iface|null Form object with URL, parameters, etc.
103 103
 	 * 	or null if no form data is required
104 104
 	 */
105
-	public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params )
105
+	public function process(\Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params)
106 106
 	{
107
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
107
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
108 108
 
109
-		$provider = $manager->getProvider( $manager->getItem( $serviceId, [], true ) );
110
-		$provider->injectGlobalConfigBE( $urls );
109
+		$provider = $manager->getProvider($manager->getItem($serviceId, [], true));
110
+		$provider->injectGlobalConfigBE($urls);
111 111
 
112
-		return $provider->process( $orderItem, $params );
112
+		return $provider->process($orderItem, $params);
113 113
 	}
114 114
 
115 115
 
@@ -124,38 +124,38 @@  discard block
 block discarded – undo
124 124
 	 * @param string $orderid Unique ID of the order whose payment status should be updated
125 125
 	 * @return \Aimeos\MShop\Order\Item\Iface $orderItem Order item that has been updated
126 126
 	 */
127
-	public function updateSync( ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid )
127
+	public function updateSync(ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid)
128 128
 	{
129 129
 		$params = (array) $request->getAttributes() + (array) $request->getParsedBody() + (array) $request->getQueryParams();
130 130
 		$params['orderid'] = $orderid;
131 131
 
132 132
 		$context = $this->getContext();
133
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'service' );
133
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'service');
134 134
 
135
-		$provider = $manager->getProvider( $manager->findItem( $code ) );
136
-		$provider->injectGlobalConfigBE( $urls );
135
+		$provider = $manager->getProvider($manager->findItem($code));
136
+		$provider->injectGlobalConfigBE($urls);
137 137
 
138 138
 		$body = (string) $request->getBody();
139 139
 		$output = null;
140 140
 		$headers = [];
141 141
 
142
-		if( ( $orderItem = $provider->updateSync( $params, $body, $output, $headers ) ) !== null )
142
+		if (($orderItem = $provider->updateSync($params, $body, $output, $headers)) !== null)
143 143
 		{
144
-			if( $orderItem->getPaymentStatus() === \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED
145
-				&& $provider->isImplemented( \Aimeos\MShop\Service\Provider\Payment\Base::FEAT_QUERY )
144
+			if ($orderItem->getPaymentStatus() === \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED
145
+				&& $provider->isImplemented(\Aimeos\MShop\Service\Provider\Payment\Base::FEAT_QUERY)
146 146
 			) {
147
-				$provider->query( $orderItem );
147
+				$provider->query($orderItem);
148 148
 			}
149 149
 
150 150
 			// update stock, coupons, etc.
151
-			\Aimeos\Controller\Frontend\Factory::createController( $context, 'order' )->update( $orderItem );
151
+			\Aimeos\Controller\Frontend\Factory::createController($context, 'order')->update($orderItem);
152 152
 		}
153 153
 
154
-		foreach( $headers as $name => $header ) {
155
-			$response->withHeader( $name, $header );
154
+		foreach ($headers as $name => $header) {
155
+			$response->withHeader($name, $header);
156 156
 		}
157 157
 
158
-		$response->withBody( $response->createStreamFromString( $output ) );
158
+		$response->withBody($response->createStreamFromString($output));
159 159
 
160 160
 		return $orderItem;
161 161
 	}
@@ -171,38 +171,38 @@  discard block
 block discarded – undo
171 171
 	 * @throws \Exception If an error occurs
172 172
 	 * @deprecated Use getProviders() instead
173 173
 	 */
174
-	public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket, $ref = ['media', 'price', 'text'] )
174
+	public function getServices($type, \Aimeos\MShop\Order\Item\Base\Iface $basket, $ref = ['media', 'price', 'text'])
175 175
 	{
176
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
176
+		$serviceManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
177 177
 
178
-		$search = $serviceManager->createSearch( true );
178
+		$search = $serviceManager->createSearch(true);
179 179
 		$expr = array(
180 180
 			$search->getConditions(),
181
-			$search->compare( '==', 'service.type.domain', 'service' ),
182
-			$search->compare( '==', 'service.type.code', $type ),
181
+			$search->compare('==', 'service.type.domain', 'service'),
182
+			$search->compare('==', 'service.type.code', $type),
183 183
 		);
184
-		$search->setConditions( $search->combine( '&&', $expr ) );
185
-		$search->setSortations( array( $search->sort( '+', 'service.position' ) ) );
184
+		$search->setConditions($search->combine('&&', $expr));
185
+		$search->setSortations(array($search->sort('+', 'service.position')));
186 186
 
187
-		$items = $serviceManager->searchItems( $search, $ref );
187
+		$items = $serviceManager->searchItems($search, $ref);
188 188
 
189 189
 
190
-		foreach( $items as $id => $service )
190
+		foreach ($items as $id => $service)
191 191
 		{
192 192
 			try
193 193
 			{
194
-				$provider = $serviceManager->getProvider( $service );
194
+				$provider = $serviceManager->getProvider($service);
195 195
 
196
-				if( $provider->isAvailable( $basket ) ) {
196
+				if ($provider->isAvailable($basket)) {
197 197
 					$this->providers[$type][$id] = $provider;
198 198
 				} else {
199
-					unset( $items[$id] );
199
+					unset($items[$id]);
200 200
 				}
201 201
 			}
202
-			catch( \Aimeos\MShop\Service\Exception $e )
202
+			catch (\Aimeos\MShop\Service\Exception $e)
203 203
 			{
204
-				$msg = sprintf( 'Unable to create provider "%1$s" for service with ID "%2$s"', $service->getCode(), $id );
205
-				$this->getContext()->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::WARN );
204
+				$msg = sprintf('Unable to create provider "%1$s" for service with ID "%2$s"', $service->getCode(), $id);
205
+				$this->getContext()->getLogger()->log($msg, \Aimeos\MW\Logger\Base::WARN);
206 206
 			}
207 207
 		}
208 208
 
@@ -223,16 +223,16 @@  discard block
 block discarded – undo
223 223
 	 * @throws \Exception If an error occurs
224 224
 	 * @deprecated Use getProvider() instead
225 225
 	 */
226
-	public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
226
+	public function getServiceAttributes($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
227 227
 	{
228
-		if( isset( $this->providers[$type][$serviceId] ) ) {
229
-			return $this->providers[$type][$serviceId]->getConfigFE( $basket );
228
+		if (isset($this->providers[$type][$serviceId])) {
229
+			return $this->providers[$type][$serviceId]->getConfigFE($basket);
230 230
 		}
231 231
 
232
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
233
-		$item = $serviceManager->getItem( $serviceId, ['price'], true );
232
+		$serviceManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
233
+		$item = $serviceManager->getItem($serviceId, ['price'], true);
234 234
 
235
-		return $serviceManager->getProvider( $item )->getConfigFE( $basket );
235
+		return $serviceManager->getProvider($item)->getConfigFE($basket);
236 236
 	}
237 237
 
238 238
 
@@ -248,16 +248,16 @@  discard block
 block discarded – undo
248 248
 	 * @throws \Exception If an error occurs
249 249
 	 * @deprecated Use getProvider() instead
250 250
 	 */
251
-	public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
251
+	public function getServicePrice($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
252 252
 	{
253
-		if( isset( $this->providers[$type][$serviceId] ) ) {
254
-			return $this->providers[$type][$serviceId]->calcPrice( $basket );
253
+		if (isset($this->providers[$type][$serviceId])) {
254
+			return $this->providers[$type][$serviceId]->calcPrice($basket);
255 255
 		}
256 256
 
257
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
258
-		$item = $serviceManager->getItem( $serviceId, ['price'], true );
257
+		$serviceManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
258
+		$item = $serviceManager->getItem($serviceId, ['price'], true);
259 259
 
260
-		return $serviceManager->getProvider( $item )->calcPrice( $basket );
260
+		return $serviceManager->getProvider($item)->calcPrice($basket);
261 261
 	}
262 262
 
263 263
 
@@ -273,22 +273,22 @@  discard block
 block discarded – undo
273 273
 	 * @throws \Aimeos\Controller\Frontend\Service\Exception If no active service provider for this ID is available
274 274
 	 * @deprecated Use checkAttributes() instead
275 275
 	 */
276
-	public function checkServiceAttributes( $type, $serviceId, array $attributes )
276
+	public function checkServiceAttributes($type, $serviceId, array $attributes)
277 277
 	{
278
-		if( !isset( $this->providers[$type][$serviceId] ) )
278
+		if (!isset($this->providers[$type][$serviceId]))
279 279
 		{
280
-			$serviceManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
281
-			$item = $serviceManager->getItem( $serviceId, ['price'], true );
280
+			$serviceManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
281
+			$item = $serviceManager->getItem($serviceId, ['price'], true);
282 282
 
283
-			$this->providers[$type][$serviceId] = $serviceManager->getProvider( $item );
283
+			$this->providers[$type][$serviceId] = $serviceManager->getProvider($item);
284 284
 		}
285 285
 
286
-		$errors = $this->providers[$type][$serviceId]->checkConfigFE( $attributes );
286
+		$errors = $this->providers[$type][$serviceId]->checkConfigFE($attributes);
287 287
 
288
-		foreach( $errors as $key => $msg )
288
+		foreach ($errors as $key => $msg)
289 289
 		{
290
-			if( $msg === null ) {
291
-				unset( $errors[$key] );
290
+			if ($msg === null) {
291
+				unset($errors[$key]);
292 292
 			}
293 293
 		}
294 294
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Decorator/Base.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
34 34
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
35 35
 	 */
36
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
36
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
37 37
 	{
38 38
 		$iface = '\Aimeos\Controller\Frontend\Service\Iface';
39
-		if( !( $controller instanceof $iface ) )
39
+		if (!($controller instanceof $iface))
40 40
 		{
41
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
42
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
41
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
42
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
43 43
 		}
44 44
 
45 45
 		$this->controller = $controller;
46 46
 
47
-		parent::__construct( $context );
47
+		parent::__construct($context);
48 48
 	}
49 49
 
50 50
 
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 	 * @return mixed Returns the value of the called method
57 57
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
58 58
 	 */
59
-	public function __call( $name, array $param )
59
+	public function __call($name, array $param)
60 60
 	{
61
-		return @call_user_func_array( array( $this->controller, $name ), $param );
61
+		return @call_user_func_array(array($this->controller, $name), $param);
62 62
 	}
63 63
 
64 64
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 	 * @param string[] $attributes List of attribute codes as keys and strings entered by the customer as value
70 70
 	 * @return string[] List of attributes codes as keys and error messages as values for invalid or missing values
71 71
 	 */
72
-	public function checkAttributes( $serviceId, array $attributes )
72
+	public function checkAttributes($serviceId, array $attributes)
73 73
 	{
74
-		return $this->controller->checkAttributes( $serviceId, $attributes );
74
+		return $this->controller->checkAttributes($serviceId, $attributes);
75 75
 	}
76 76
 
77 77
 
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
83 83
 	 * @return \Aimeos\MShop\Service\Provider\Iface Service provider object
84 84
 	 */
85
-	public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] )
85
+	public function getProvider($serviceId, $ref = ['media', 'price', 'text'])
86 86
 	{
87
-		return $this->controller->getProvider( $serviceId, $ref );
87
+		return $this->controller->getProvider($serviceId, $ref);
88 88
 	}
89 89
 
90 90
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
96 96
 	 * @return \Aimeos\MShop\Service\Provider\Iface[] List of service IDs as keys and service provider objects as values
97 97
 	 */
98
-	public function getProviders( $type = null, $ref = ['media', 'price', 'text'] )
98
+	public function getProviders($type = null, $ref = ['media', 'price', 'text'])
99 99
 	{
100
-		return $this->controller->getProviders( $type, $ref );
100
+		return $this->controller->getProviders($type, $ref);
101 101
 	}
102 102
 
103 103
 
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Iface|null Form object with URL, parameters, etc.
113 113
 	 * 	or null if no form data is required
114 114
 	 */
115
-	public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params )
115
+	public function process(\Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params)
116 116
 	{
117
-		return $this->controller->process( $orderItem, $serviceId, $urls, $params );
117
+		return $this->controller->process($orderItem, $serviceId, $urls, $params);
118 118
 	}
119 119
 
120 120
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 	 * @param string $orderid Unique ID of the order whose payment status should be updated
130 130
 	 * @return \Aimeos\MShop\Order\Item\Iface $orderItem Order item that has been updated
131 131
 	 */
132
-	public function updateSync( ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid )
132
+	public function updateSync(ServerRequestInterface $request, ResponseInterface $response, array $urls, $code, $orderid)
133 133
 	{
134
-		return $this->controller->updateSync( $request, $response, $urls, $code, $orderid );
134
+		return $this->controller->updateSync($request, $response, $urls, $code, $orderid);
135 135
 	}
136 136
 
137 137
 
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
 	 * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface with referenced items
145 145
 	 * @deprecated Use getProviders() instead
146 146
 	 */
147
-	public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
148
-		$ref = array( 'media', 'price', 'text' ) )
147
+	public function getServices($type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
148
+		$ref = array('media', 'price', 'text'))
149 149
 	{
150
-		return $this->controller->getServices( $type, $basket, $ref );
150
+		return $this->controller->getServices($type, $basket, $ref);
151 151
 	}
152 152
 
153 153
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface
162 162
 	 * @deprecated Use getProvider() instead
163 163
 	 */
164
-	public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
164
+	public function getServiceAttributes($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
165 165
 	{
166
-		return $this->controller->getServiceAttributes( $type, $serviceId, $basket );
166
+		return $this->controller->getServiceAttributes($type, $serviceId, $basket);
167 167
 	}
168 168
 
169 169
 
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 	 * @throws \Exception If an error occurs
180 180
 	 * @deprecated Use getProvider() instead
181 181
 	 */
182
-	public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
182
+	public function getServicePrice($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
183 183
 	{
184
-		return $this->controller->getServicePrice( $type, $serviceId, $basket );
184
+		return $this->controller->getServicePrice($type, $serviceId, $basket);
185 185
 	}
186 186
 
187 187
 
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 	 * 	missing
197 197
 	 * @deprecated Use checkAttributes() instead
198 198
 	 */
199
-	public function checkServiceAttributes( $type, $serviceId, array $attributes )
199
+	public function checkServiceAttributes($type, $serviceId, array $attributes)
200 200
 	{
201
-		return $this->controller->checkServiceAttributes( $type, $serviceId, $attributes );
201
+		return $this->controller->checkServiceAttributes($type, $serviceId, $attributes);
202 202
 	}
203 203
 
204 204
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Iface.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
27 27
 	 * @since 2017.04
28 28
 	 */
29
-	public function addItem( array $values );
29
+	public function addItem(array $values);
30 30
 
31 31
 
32 32
 	/**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
36 36
 	 * @since 2017.04
37 37
 	 */
38
-	public function createItem( array $values = [] );
38
+	public function createItem(array $values = []);
39 39
 
40 40
 
41 41
 	/**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param string $id Unique customer ID
45 45
 	 * @since 2017.04
46 46
 	 */
47
-	public function deleteItem( $id );
47
+	public function deleteItem($id);
48 48
 
49 49
 
50 50
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
56 56
 	 * @since 2017.04
57 57
 	 */
58
-	public function editItem( $id, array $values );
58
+	public function editItem($id, array $values);
59 59
 
60 60
 
61 61
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
67 67
 	 * @since 2017.04
68 68
 	 */
69
-	public function getItem( $id = null, array $domains = [] );
69
+	public function getItem($id = null, array $domains = []);
70 70
 
71 71
 
72 72
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
80 80
 	 * @since 2017.04
81 81
 	 */
82
-	public function findItem( $code, array $domains = [] );
82
+	public function findItem($code, array $domains = []);
83 83
 
84 84
 
85 85
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
90 90
 	 * @since 2017.04
91 91
 	 */
92
-	public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item );
92
+	public function saveItem(\Aimeos\MShop\Customer\Item\Iface $item);
93 93
 
94 94
 
95 95
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
100 100
 	 * @since 2017.04
101 101
 	 */
102
-	public function addAddressItem( array $values );
102
+	public function addAddressItem(array $values);
103 103
 
104 104
 
105 105
 	/**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
109 109
 	 * @since 2017.04
110 110
 	 */
111
-	public function createAddressItem( array $values = [] );
111
+	public function createAddressItem(array $values = []);
112 112
 
113 113
 
114 114
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param string $id Unique customer address ID
118 118
 	 * @since 2017.04
119 119
 	 */
120
-	public function deleteAddressItem( $id );
120
+	public function deleteAddressItem($id);
121 121
 
122 122
 
123 123
 	/**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
129 129
 	 * @since 2017.04
130 130
 	 */
131
-	public function editAddressItem( $id, array $values );
131
+	public function editAddressItem($id, array $values);
132 132
 
133 133
 
134 134
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
139 139
 	 * @since 2017.04
140 140
 	 */
141
-	public function getAddressItem( $id );
141
+	public function getAddressItem($id);
142 142
 
143 143
 
144 144
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
149 149
 	 * @since 2017.04
150 150
 	 */
151
-	public function saveAddressItem( \Aimeos\MShop\Customer\Item\Address\Iface $item );
151
+	public function saveAddressItem(\Aimeos\MShop\Customer\Item\Address\Iface $item);
152 152
 
153 153
 	/**
154 154
 	 * Creates and returns a new list item object
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
158 158
 	 * @since 2017.06
159 159
 	 */
160
-	public function addListItem( array $values );
160
+	public function addListItem(array $values);
161 161
 
162 162
 	/**
163 163
 	 * Returns a new customer lists filter criteria object
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * @param string $id Unique customer address ID
174 174
 	 * @since 2017.06
175 175
 	 */
176
-	public function deleteListItem( $id );
176
+	public function deleteListItem($id);
177 177
 
178 178
 	/**
179 179
 	 * Saves a modified customer lists item object
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
184 184
 	 * @since 2017.06
185 185
 	 */
186
-	public function editListItem( $id, array $values );
186
+	public function editListItem($id, array $values);
187 187
 
188 188
 	/**
189 189
 	 * Returns the customer item for the given customer ID
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
193 193
 	 * @since 2017.06
194 194
 	 */
195
-	public function getListItem( $id );
195
+	public function getListItem($id);
196 196
 
197 197
 	/**
198 198
 	 * Returns the customer lists items filtered by the given criteria
@@ -202,5 +202,5 @@  discard block
 block discarded – undo
202 202
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface[] Customer list items
203 203
 	 * @since 2017.06
204 204
 	 */
205
-	public function searchListItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
205
+	public function searchListItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
206 206
 }
Please login to merge, or discard this patch.