Completed
Push — master ( c159b3...130612 )
by Aimeos
04:42
created
Tests/Controller/LocaleControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 {
10 10
 	public function testSelectComponent()
11 11
 	{
12
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\LocaleController' )
13
-			->setMethods( array( 'getOutput' ) )
12
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\LocaleController')
13
+			->setMethods(array('getOutput'))
14 14
 			->disableOriginalConstructor()
15 15
 			->getMock();
16 16
 
17
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
17
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
18 18
 
19
-		$this->assertEquals( 'test', $mock->selectComponentAction() );
19
+		$this->assertEquals('test', $mock->selectComponentAction());
20 20
 	}
21 21
 }
Please login to merge, or discard this patch.
Tests/Controller/BasketControllerTest.php 1 patch
Spacing   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
 	{
12 12
 		$client = static::createClient();
13 13
 
14
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
14
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
15 15
 
16
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
17
-		$crawler = $client->click( $link );
16
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
17
+		$crawler = $client->click($link);
18 18
 
19
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
20
-		$crawler = $client->submit( $form );
19
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
20
+		$crawler = $client->submit($form);
21 21
 
22
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
23
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
24
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
22
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
23
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
24
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
25 25
 	}
26 26
 
27 27
 
@@ -29,18 +29,18 @@  discard block
 block discarded – undo
29 29
 	{
30 30
 		$client = static::createClient();
31 31
 
32
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
32
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
33 33
 
34
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
35
-		$crawler = $client->click( $link );
34
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
35
+		$crawler = $client->click($link);
36 36
 
37
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
37
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
38 38
 		$form['b_prod[0][quantity]'] = 2;
39
-		$crawler = $client->submit( $form );
39
+		$crawler = $client->submit($form);
40 40
 
41
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
42
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
43
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
41
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
42
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
43
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
44 44
 	}
45 45
 
46 46
 
@@ -48,26 +48,26 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		$client = static::createClient();
50 50
 
51
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
51
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
52 52
 
53
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
54
-		$crawler = $client->click( $link );
53
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
54
+		$crawler = $client->click($link);
55 55
 
56
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
57
-		$crawler = $client->submit( $form );
56
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
57
+		$crawler = $client->submit($form);
58 58
 
59
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
60
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
59
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
60
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
61 61
 
62 62
 
63
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
64
-		$crawler = $client->click( $link );
63
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
64
+		$crawler = $client->click($link);
65 65
 
66
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
67
-		$crawler = $client->submit( $form );
66
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
67
+		$crawler = $client->submit($form);
68 68
 
69
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
70
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
69
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
70
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
71 71
 	}
72 72
 
73 73
 
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
 	{
76 76
 		$client = static::createClient();
77 77
 
78
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
78
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
79 79
 
80
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
81
-		$crawler = $client->click( $link );
80
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
81
+		$crawler = $client->click($link);
82 82
 
83
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
84
-		$crawler = $client->submit( $form );
83
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
84
+		$crawler = $client->submit($form);
85 85
 
86 86
 
87
-		$link = $crawler->filter( '.basket-standard .product .action .change' )->link();
88
-		$crawler = $client->click( $link );
87
+		$link = $crawler->filter('.basket-standard .product .action .change')->link();
88
+		$crawler = $client->click($link);
89 89
 
90
-		$this->assertEquals( 0, $crawler->filter( '.basket-standard .product' )->count() );
90
+		$this->assertEquals(0, $crawler->filter('.basket-standard .product')->count());
91 91
 	}
92 92
 
93 93
 
@@ -95,25 +95,25 @@  discard block
 block discarded – undo
95 95
 	{
96 96
 		$client = static::createClient();
97 97
 
98
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
98
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
99 99
 
100
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
101
-		$crawler = $client->click( $link );
100
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
101
+		$crawler = $client->click($link);
102 102
 
103
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
104
-		$crawler = $client->submit( $form );
103
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
104
+		$crawler = $client->submit($form);
105 105
 
106 106
 
107
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->link();
108
-		$crawler = $client->click( $link );
107
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->link();
108
+		$crawler = $client->click($link);
109 109
 
110
-		$this->assertEquals( 2, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
110
+		$this->assertEquals(2, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
111 111
 
112 112
 
113
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->eq( 0 )->link();
114
-		$crawler = $client->click( $link );
113
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->eq(0)->link();
114
+		$crawler = $client->click($link);
115 115
 
116
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
116
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
117 117
 	}
118 118
 
119 119
 
@@ -121,20 +121,20 @@  discard block
 block discarded – undo
121 121
 	{
122 122
 		$client = static::createClient();
123 123
 
124
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
124
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
125 125
 
126
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
127
-		$crawler = $client->click( $link );
126
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
127
+		$crawler = $client->click($link);
128 128
 
129
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
130
-		$crawler = $client->submit( $form );
129
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
130
+		$crawler = $client->submit($form);
131 131
 
132 132
 
133
-		$form = $crawler->filter( '.basket-standard .btn-update' )->form();
133
+		$form = $crawler->filter('.basket-standard .btn-update')->form();
134 134
 		$form['b_prod[0][quantity]'] = 3;
135
-		$crawler = $client->submit( $form );
135
+		$crawler = $client->submit($form);
136 136
 
137
-		$this->assertEquals( 3, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
137
+		$this->assertEquals(3, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
138 138
 	}
139 139
 
140 140
 
@@ -142,26 +142,26 @@  discard block
 block discarded – undo
142 142
 	{
143 143
 		$client = static::createClient();
144 144
 
145
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
145
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
146 146
 
147
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
148
-		$crawler = $client->click( $link );
147
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
148
+		$crawler = $client->click($link);
149 149
 
150
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
151
-		$crawler = $client->submit( $form );
150
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
151
+		$crawler = $client->submit($form);
152 152
 
153 153
 
154
-		$form = $crawler->filter( '.basket-standard-coupon .coupon-new button' )->form();
154
+		$form = $crawler->filter('.basket-standard-coupon .coupon-new button')->form();
155 155
 		$form['b_coupon'] = '90AB';
156
-		$crawler = $client->submit( $form );
156
+		$crawler = $client->submit($form);
157 157
 
158
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product:contains("Geldwerter Nachlass")' )->count() );
158
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product:contains("Geldwerter Nachlass")')->count());
159 159
 
160 160
 
161
-		$link = $crawler->filter( '.basket-standard-coupon .change' )->link();
162
-		$crawler = $client->click( $link );
161
+		$link = $crawler->filter('.basket-standard-coupon .change')->link();
162
+		$crawler = $client->click($link);
163 163
 
164
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product' )->count() );
164
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product')->count());
165 165
 	}
166 166
 
167 167
 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
 	{
170 170
 		$client = static::createClient();
171 171
 
172
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
172
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
173 173
 
174
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
175
-		$crawler = $client->click( $link );
174
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
175
+		$crawler = $client->click($link);
176 176
 
177
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
178
-		$crawler = $client->submit( $form );
177
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
178
+		$crawler = $client->submit($form);
179 179
 
180
-		$this->assertEquals( 1, $crawler->filter( '.basket-related-bought .bought-item' )->count() );
180
+		$this->assertEquals(1, $crawler->filter('.basket-related-bought .bought-item')->count());
181 181
 	}
182 182
 
183 183
 
@@ -185,56 +185,56 @@  discard block
 block discarded – undo
185 185
 	{
186 186
 		$client = static::createClient();
187 187
 
188
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
188
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
189 189
 
190
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
191
-		$crawler = $client->click( $link );
190
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
191
+		$crawler = $client->click($link);
192 192
 
193
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
194
-		$crawler = $client->submit( $form );
193
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
194
+		$crawler = $client->submit($form);
195 195
 
196
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
197
-		$crawler = $client->click( $link );
196
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
197
+		$crawler = $client->click($link);
198 198
 
199
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail .product:contains("Unittest: Bundle")' )->count() );
199
+		$this->assertEquals(1, $crawler->filter('.catalog-detail .product:contains("Unittest: Bundle")')->count());
200 200
 	}
201 201
 
202 202
 
203 203
 	public function testMiniComponent()
204 204
 	{
205
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
206
-			->setMethods( array( 'getOutput' ) )
205
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
206
+			->setMethods(array('getOutput'))
207 207
 			->disableOriginalConstructor()
208 208
 			->getMock();
209 209
 
210
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
210
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
211 211
 
212
-		$this->assertEquals( 'test', $mock->miniComponentAction() );
212
+		$this->assertEquals('test', $mock->miniComponentAction());
213 213
 	}
214 214
 
215 215
 
216 216
 	public function testRelatedComponent()
217 217
 	{
218
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
219
-			->setMethods( array( 'getOutput' ) )
218
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
219
+			->setMethods(array('getOutput'))
220 220
 			->disableOriginalConstructor()
221 221
 			->getMock();
222 222
 
223
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
223
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
224 224
 
225
-		$this->assertEquals( 'test', $mock->relatedComponentAction() );
225
+		$this->assertEquals('test', $mock->relatedComponentAction());
226 226
 	}
227 227
 
228 228
 
229 229
 	public function testStandardComponent()
230 230
 	{
231
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
232
-			->setMethods( array( 'getOutput' ) )
231
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
232
+			->setMethods(array('getOutput'))
233 233
 			->disableOriginalConstructor()
234 234
 			->getMock();
235 235
 
236
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
236
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
237 237
 
238
-		$this->assertEquals( 'test', $mock->standardComponentAction() );
238
+		$this->assertEquals('test', $mock->standardComponentAction());
239 239
 	}
240 240
 }
Please login to merge, or discard this patch.
Controller/BasketController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'basket-index' );
32
-		return $this->render( 'AimeosShopBundle:Basket:index.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('basket-index');
32
+		return $this->render('AimeosShopBundle:Basket:index.html.twig', $params);
33 33
 	}
34 34
 
35 35
 	/**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	public function miniComponentAction()
41 41
 	{
42
-		return $this->getOutput( 'basket/mini' );
42
+		return $this->getOutput('basket/mini');
43 43
 	}
44 44
 
45 45
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function relatedComponentAction()
52 52
 	{
53
-		return $this->getOutput( 'basket/related' );
53
+		return $this->getOutput('basket/related');
54 54
 	}
55 55
 
56 56
 
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function standardComponentAction()
63 63
 	{
64
-		return $this->getOutput( 'basket/standard' );
64
+		return $this->getOutput('basket/standard');
65 65
 	}
66 66
 }
Please login to merge, or discard this patch.
Controller/CheckoutController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function confirmAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-confirm' );
32
-		return $this->render( 'AimeosShopBundle:Checkout:confirm.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('checkout-confirm');
32
+		return $this->render('AimeosShopBundle:Checkout:confirm.html.twig', $params);
33 33
 	}
34 34
 
35 35
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function indexAction()
42 42
 	{
43
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-index' );
44
-		return $this->render( 'AimeosShopBundle:Checkout:index.html.twig', $params );
43
+		$params = $this->get('aimeos_page')->getSections('checkout-index');
44
+		return $this->render('AimeosShopBundle:Checkout:index.html.twig', $params);
45 45
 	}
46 46
 
47 47
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function updateAction()
54 54
 	{
55
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-update' );
56
-		return $this->render( 'AimeosShopBundle:Checkout:update.html.twig', $params );
55
+		$params = $this->get('aimeos_page')->getSections('checkout-update');
56
+		return $this->render('AimeosShopBundle:Checkout:update.html.twig', $params);
57 57
 	}
58 58
 
59 59
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function confirmComponentAction()
66 66
 	{
67
-		return $this->getOutput( 'checkout/confirm' );
67
+		return $this->getOutput('checkout/confirm');
68 68
 	}
69 69
 
70 70
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function standardComponentAction()
77 77
 	{
78
-		return $this->getOutput( 'checkout/standard' );
78
+		return $this->getOutput('checkout/standard');
79 79
 	}
80 80
 
81 81
 
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function updateComponentAction()
88 88
 	{
89
-		return $this->getOutput( 'checkout/update' );
89
+		return $this->getOutput('checkout/update');
90 90
 	}
91 91
 }
Please login to merge, or discard this patch.
Controller/LocaleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function selectComponentAction()
30 30
 	{
31
-		return $this->getOutput( 'locale/select' );
31
+		return $this->getOutput('locale/select');
32 32
 	}
33 33
 }
Please login to merge, or discard this patch.
Controller/CatalogController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function countAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-count' );
32
-		return $this->render( 'AimeosShopBundle:Catalog:count.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('catalog-count');
32
+		return $this->render('AimeosShopBundle:Catalog:count.html.twig', $params);
33 33
 	}
34 34
 
35 35
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function detailAction()
42 42
 	{
43
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-detail' );
44
-		return $this->render( 'AimeosShopBundle:Catalog:detail.html.twig', $params );
43
+		$params = $this->get('aimeos_page')->getSections('catalog-detail');
44
+		return $this->render('AimeosShopBundle:Catalog:detail.html.twig', $params);
45 45
 	}
46 46
 
47 47
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function listAction()
54 54
 	{
55
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-list' );
56
-		return $this->render( 'AimeosShopBundle:Catalog:list.html.twig', $params );
55
+		$params = $this->get('aimeos_page')->getSections('catalog-list');
56
+		return $this->render('AimeosShopBundle:Catalog:list.html.twig', $params);
57 57
 	}
58 58
 
59 59
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function stockAction()
66 66
 	{
67
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-stock' );
68
-		return $this->render( 'AimeosShopBundle:Catalog:stock.html.twig', $params );
67
+		$params = $this->get('aimeos_page')->getSections('catalog-stock');
68
+		return $this->render('AimeosShopBundle:Catalog:stock.html.twig', $params);
69 69
 	}
70 70
 
71 71
 
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function suggestAction()
78 78
 	{
79
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-suggest' );
80
-		return $this->render( 'AimeosShopBundle:Catalog:suggest.html.twig', $params );
79
+		$params = $this->get('aimeos_page')->getSections('catalog-suggest');
80
+		return $this->render('AimeosShopBundle:Catalog:suggest.html.twig', $params);
81 81
 	}
82 82
 
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function countComponentAction()
90 90
 	{
91
-		return $this->getOutput( 'catalog/count' );
91
+		return $this->getOutput('catalog/count');
92 92
 	}
93 93
 
94 94
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function detailComponentAction()
101 101
 	{
102
-		return $this->getOutput( 'catalog/detail' );
102
+		return $this->getOutput('catalog/detail');
103 103
 	}
104 104
 
105 105
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function filterComponentAction()
112 112
 	{
113
-		return $this->getOutput( 'catalog/filter' );
113
+		return $this->getOutput('catalog/filter');
114 114
 	}
115 115
 
116 116
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function listComponentAction()
123 123
 	{
124
-		return $this->getOutput( 'catalog/lists' );
124
+		return $this->getOutput('catalog/lists');
125 125
 	}
126 126
 
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 */
133 133
 	public function sessionComponentAction()
134 134
 	{
135
-		return $this->getOutput( 'catalog/session' );
135
+		return $this->getOutput('catalog/session');
136 136
 	}
137 137
 
138 138
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function stageComponentAction()
145 145
 	{
146
-		return $this->getOutput( 'catalog/stage' );
146
+		return $this->getOutput('catalog/stage');
147 147
 	}
148 148
 
149 149
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function stockComponentAction()
156 156
 	{
157
-		return $this->getOutput( 'catalog/stock' );
157
+		return $this->getOutput('catalog/stock');
158 158
 	}
159 159
 
160 160
 
@@ -165,6 +165,6 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public function suggestComponentAction()
167 167
 	{
168
-		return $this->getOutput( 'catalog/suggest' );
168
+		return $this->getOutput('catalog/suggest');
169 169
 	}
170 170
 }
Please login to merge, or discard this patch.
Controller/AbstractController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,29 +28,29 @@
 block discarded – undo
28 28
 	 * @param string $clientName Html client name
29 29
 	 * @return Response Response object containing the generated output
30 30
 	 */
31
-	protected function getOutput( $clientName )
31
+	protected function getOutput($clientName)
32 32
 	{
33
-		$tmplPaths = $this->container->get( 'aimeos' )->get()->getCustomPaths( 'client/html/templates' );
34
-		$context = $this->container->get( 'aimeos_context' )->get();
33
+		$tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths('client/html/templates');
34
+		$context = $this->container->get('aimeos_context')->get();
35 35
 		$langid = $context->getLocale()->getLanguageId();
36 36
 
37
-		$view = $this->container->get( 'aimeos_view' )->create( $context, $tmplPaths, $langid );
38
-		$context->setView( $view );
37
+		$view = $this->container->get('aimeos_view')->create($context, $tmplPaths, $langid);
38
+		$context->setView($view);
39 39
 
40
-		$client = \Aimeos\Client\Html\Factory::createClient( $context, $tmplPaths, $clientName );
41
-		$client->setView( $view );
40
+		$client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName);
41
+		$client->setView($view);
42 42
 		$client->process();
43 43
 
44
-		$twig = $this->container->get( 'twig' );
44
+		$twig = $this->container->get('twig');
45 45
 		$vars = $twig->getGlobals();
46 46
 
47
-		if( !isset( $vars['aiheader'] ) ) {
47
+		if (!isset($vars['aiheader'])) {
48 48
 			$vars['aiheader'] = array();
49 49
 		}
50 50
 
51 51
 		$vars['aiheader'][$clientName] = (string) $client->getHeader();
52
-		$twig->addGlobal( 'aiheader', $vars['aiheader'] );
52
+		$twig->addGlobal('aiheader', $vars['aiheader']);
53 53
 
54
-		return new Response( (string) $client->getBody() );
54
+		return new Response((string) $client->getBody());
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
Tests/Controller/AdminControllerTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 	{
12 12
 		$client = static::createClient();
13 13
 
14
-		$client->request( 'GET', '/admin' );
14
+		$client->request('GET', '/admin');
15 15
 		$response = $client->getResponse();
16 16
 
17
-		$this->assertEquals( 200, $response->getStatusCode() );
18
-		$this->assertContains( '<form class="login"', $response->getContent() );
17
+		$this->assertEquals(200, $response->getStatusCode());
18
+		$this->assertContains('<form class="login"', $response->getContent());
19 19
 	}
20 20
 
21 21
 
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 		$client = static::createClient(array(), array(
25 25
 			'PHP_AUTH_USER' => 'admin',
26 26
 			'PHP_AUTH_PW'   => 'adminpass',
27
-		) );
27
+		));
28 28
 
29
-		$client->request( 'GET', '/admin' );
29
+		$client->request('GET', '/admin');
30 30
 		$response = $client->getResponse();
31 31
 
32
-		$this->assertEquals( 302, $response->getStatusCode() );
33
-		$this->assertContains( '/default/jqadm/search/dashboard?lang=en', $response->getContent() );
32
+		$this->assertEquals(302, $response->getStatusCode());
33
+		$this->assertContains('/default/jqadm/search/dashboard?lang=en', $response->getContent());
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
Controller/AdminController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function indexAction()
31 31
 	{
32
-		if( $this->isAdmin() )
32
+		if ($this->isAdmin())
33 33
 		{
34
-			$params = array( 'site' => 'default', 'resource' => 'dashboard', 'lang' => 'en' );
35
-			return $this->redirect( $this->generateUrl( 'aimeos_shop_jqadm_search', $params ) );
34
+			$params = array('site' => 'default', 'resource' => 'dashboard', 'lang' => 'en');
35
+			return $this->redirect($this->generateUrl('aimeos_shop_jqadm_search', $params));
36 36
 		}
37 37
 
38
-		$param = array( 'error' => '', 'username' => '' );
38
+		$param = array('error' => '', 'username' => '');
39 39
 
40
-		if( $this->has( 'security.authentication_utils' ) )
40
+		if ($this->has('security.authentication_utils'))
41 41
 		{
42
-			$auth = $this->get( 'security.authentication_utils' );
42
+			$auth = $this->get('security.authentication_utils');
43 43
 
44 44
 			$param['error'] = $auth->getLastAuthenticationError();
45 45
 			$param['username'] = $auth->getLastUsername();
46 46
 		}
47 47
 
48
-		return $this->render( 'AimeosShopBundle:Admin:index.html.twig', $param );
48
+		return $this->render('AimeosShopBundle:Admin:index.html.twig', $param);
49 49
 	}
50 50
 
51 51
 
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	protected function isAdmin()
58 58
 	{
59
-		if( $this->has( 'security.authorization_checker' ) && $this->get( 'security.token_storage' )->getToken()
60
-			&& $this->get( 'security.authorization_checker' )->isGranted( 'ROLE_ADMIN' )
61
-			|| $this->has( 'security.context' ) && $this->get( 'security.context' )->getToken()
62
-			&& $this->get( 'security.context' )->isGranted( 'ROLE_ADMIN' )
59
+		if ($this->has('security.authorization_checker') && $this->get('security.token_storage')->getToken()
60
+			&& $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')
61
+			|| $this->has('security.context') && $this->get('security.context')->getToken()
62
+			&& $this->get('security.context')->isGranted('ROLE_ADMIN')
63 63
 		) {
64 64
 			return true;
65 65
 		}
Please login to merge, or discard this patch.