Passed
Push — master ( da089c...e371b0 )
by Aimeos
06:21
created
Tests/Fixtures/app/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/../../../vendor/autoload.php';
3
+require_once __DIR__ . '/../../../vendor/autoload.php';
Please login to merge, or discard this patch.
Service/View.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@  discard block
 block discarded – undo
89 89
 			&& in_array( 'ROLE_SUPER_ADMIN', (array) $token->getUser()->getRoles() ) )
90 90
 		{
91 91
 			$helper = new \Aimeos\MW\View\Helper\Access\All( $view );
92
-		}
93
-		else
92
+		} else
94 93
 		{
95 94
 			$fcn = function() use ( $container, $context ) {
96 95
 				return $container->get( 'aimeos.support' )->getGroups( $context );
@@ -244,8 +243,7 @@  discard block
 block discarded – undo
244 243
 		{
245 244
 			$i18n = $this->container->get( 'aimeos.i18n' )->get( array( $locale ) );
246 245
 			$translation = $i18n[$locale];
247
-		}
248
-		else
246
+		} else
249 247
 		{
250 248
 			$translation = new \Aimeos\MW\Translation\None( 'en' );
251 249
 		}
Please login to merge, or discard this patch.
Tests/Controller/CatalogControllerTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() );
70 70
 
71 71
 		$nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' );
72
-		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id');
72
+		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id' );
73 73
 
74 74
 		$form = $crawler->filter( '.catalog-filter .btn-primary' )->form();
75 75
 		$values = $form->getPhpValues();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 
43 43
  	public function testFilterTree()
44
-	{
44
+ 	{
45 45
 		$client = static::createClient();
46 46
 		$crawler = $client->request( 'GET', '/unittest/de/EUR/shop/' );
47 47
 
Please login to merge, or discard this patch.
Tests/Controller/JsonadmControllerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
 	public function testOptionsAction()
11 11
 	{
12
-		$client = static::createClient(array(), array(
12
+		$client = static::createClient( array(), array(
13 13
 			'PHP_AUTH_USER' => 'admin',
14 14
 			'PHP_AUTH_PW'   => 'adminpass',
15 15
 		) );
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 	public function testActionsSingle()
42 42
 	{
43
-		$client = static::createClient(array(), array(
43
+		$client = static::createClient( array(), array(
44 44
 			'PHP_AUTH_USER' => 'admin',
45 45
 			'PHP_AUTH_PW'   => 'adminpass',
46 46
 		) );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function testActionsBulk()
106 106
 	{
107
-		$client = static::createClient(array(), array(
107
+		$client = static::createClient( array(), array(
108 108
 			'PHP_AUTH_USER' => 'admin',
109 109
 			'PHP_AUTH_PW'   => 'adminpass',
110 110
 		) );
Please login to merge, or discard this patch.
Tests/Controller/JqadmControllerTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
 	public function testFileCss()
11 11
 	{
12
-		$client = static::createClient(array(), array(
12
+		$client = static::createClient( array(), array(
13 13
 			'PHP_AUTH_USER' => 'admin',
14 14
 			'PHP_AUTH_PW'   => 'adminpass',
15 15
 		) );
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 	public function testFileJs()
25 25
 	{
26
-		$client = static::createClient(array(), array(
26
+		$client = static::createClient( array(), array(
27 27
 			'PHP_AUTH_USER' => 'admin',
28 28
 			'PHP_AUTH_PW'   => 'adminpass',
29 29
 		) );
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 	public function testCopyAction()
39 39
 	{
40
-		$client = static::createClient(array(), array(
40
+		$client = static::createClient( array(), array(
41 41
 			'PHP_AUTH_USER' => 'admin',
42 42
 			'PHP_AUTH_PW'   => 'adminpass',
43 43
 		) );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 	public function testCreateAction()
54 54
 	{
55
-		$client = static::createClient(array(), array(
55
+		$client = static::createClient( array(), array(
56 56
 			'PHP_AUTH_USER' => 'admin',
57 57
 			'PHP_AUTH_PW'   => 'adminpass',
58 58
 		) );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 	public function testDeleteAction()
69 69
 	{
70
-		$client = static::createClient(array(), array(
70
+		$client = static::createClient( array(), array(
71 71
 			'PHP_AUTH_USER' => 'admin',
72 72
 			'PHP_AUTH_PW'   => 'adminpass',
73 73
 		) );
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 	public function testExportAction()
84 84
 	{
85
-		$client = static::createClient(array(), array(
85
+		$client = static::createClient( array(), array(
86 86
 			'PHP_AUTH_USER' => 'admin',
87 87
 			'PHP_AUTH_PW'   => 'adminpass',
88 88
 		) );
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 	public function testGetAction()
99 99
 	{
100
-		$client = static::createClient(array(), array(
100
+		$client = static::createClient( array(), array(
101 101
 			'PHP_AUTH_USER' => 'admin',
102 102
 			'PHP_AUTH_PW'   => 'adminpass',
103 103
 		) );
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 	public function testSaveAction()
114 114
 	{
115
-		$client = static::createClient(array(), array(
115
+		$client = static::createClient( array(), array(
116 116
 			'PHP_AUTH_USER' => 'admin',
117 117
 			'PHP_AUTH_PW'   => 'adminpass',
118 118
 		) );
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 	public function testSearchAction()
129 129
 	{
130
-		$client = static::createClient(array(), array(
130
+		$client = static::createClient( array(), array(
131 131
 			'PHP_AUTH_USER' => 'admin',
132 132
 			'PHP_AUTH_PW'   => 'adminpass',
133 133
 		) );
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 	public function testSearchActionSite()
144 144
 	{
145
-		$client = static::createClient(array(), array(
145
+		$client = static::createClient( array(), array(
146 146
 			'PHP_AUTH_USER' => 'admin',
147 147
 			'PHP_AUTH_PW'   => 'adminpass',
148 148
 		) );
Please login to merge, or discard this patch.
Tests/Controller/CheckoutControllerTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function testStandardNavbar()
18 18
 	{
19
-		$client = static::createClient(array(), array(
19
+		$client = static::createClient( array(), array(
20 20
 			'PHP_AUTH_USER' => 'UTC001',
21 21
 			'PHP_AUTH_PW'   => 'unittest',
22 22
 		) );
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 	public function testStandardNextBack()
86 86
 	{
87
-		$client = static::createClient(array(), array(
87
+		$client = static::createClient( array(), array(
88 88
 			'PHP_AUTH_USER' => 'UTC001',
89 89
 			'PHP_AUTH_PW'   => 'unittest',
90 90
 		) );
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
 	public function testStandardAddressPayment()
135 135
 	{
136
-		$client = static::createClient(array(), array(
136
+		$client = static::createClient( array(), array(
137 137
 			'PHP_AUTH_USER' => 'UTC001',
138 138
 			'PHP_AUTH_PW'   => 'unittest',
139 139
 		) );
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 	public function testStandardAddressDelivery()
154 154
 	{
155
-		$client = static::createClient(array(), array(
155
+		$client = static::createClient( array(), array(
156 156
 			'PHP_AUTH_USER' => 'UTC001',
157 157
 			'PHP_AUTH_PW'   => 'unittest',
158 158
 		) );
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 	public function testStandardDelivery()
173 173
 	{
174
-		$client = static::createClient(array(), array(
174
+		$client = static::createClient( array(), array(
175 175
 			'PHP_AUTH_USER' => 'UTC001',
176 176
 			'PHP_AUTH_PW'   => 'unittest',
177 177
 		) );
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 	public function testStandardPayment()
192 192
 	{
193
-		$client = static::createClient(array(), array(
193
+		$client = static::createClient( array(), array(
194 194
 			'PHP_AUTH_USER' => 'UTC001',
195 195
 			'PHP_AUTH_PW'   => 'unittest',
196 196
 		) );
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 	public function testStandardBasket()
211 211
 	{
212
-		$client = static::createClient(array(), array(
212
+		$client = static::createClient( array(), array(
213 213
 			'PHP_AUTH_USER' => 'UTC001',
214 214
 			'PHP_AUTH_PW'   => 'unittest',
215 215
 		) );
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 	public function testStandardOrder()
230 230
 	{
231
-		$client = static::createClient(array(), array(
231
+		$client = static::createClient( array(), array(
232 232
 			'PHP_AUTH_USER' => 'UTC001',
233 233
 			'PHP_AUTH_PW'   => 'unittest',
234 234
 		) );
Please login to merge, or discard this patch.
Tests/Controller/BasketControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
30 30
 		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
31
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
31
+		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr( 'value' ) );
32 32
 	}
33 33
 
34 34
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
49 49
 		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
50
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
50
+		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr( 'value' ) );
51 51
 	}
52 52
 
53 53
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$crawler = $client->submit( $form );
65 65
 
66 66
 		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
67
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
67
+		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr( 'value' ) );
68 68
 
69 69
 
70 70
 		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$crawler = $client->submit( $form );
75 75
 
76 76
 		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
77
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
77
+		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr( 'value' ) );
78 78
 	}
79 79
 
80 80
 
Please login to merge, or discard this patch.
Tests/Controller/JsonapiControllerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
 	public function testGetCustomerActionAuthorized()
336 336
 	{
337
-		$client = static::createClient(array(), array(
337
+		$client = static::createClient( array(), array(
338 338
 			'PHP_AUTH_USER' => 'UTC001',
339 339
 			'PHP_AUTH_PW'   => 'unittest',
340 340
 		) );
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
 	public function testGetCustomerAddressActionAuthorized()
355 355
 	{
356
-		$client = static::createClient(array(), array(
356
+		$client = static::createClient( array(), array(
357 357
 			'PHP_AUTH_USER' => 'UTC001',
358 358
 			'PHP_AUTH_PW'   => 'unittest',
359 359
 		) );
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
 	public function testGetOrderActionAuthorized()
379 379
 	{
380
-		$client = static::createClient(array(), array(
380
+		$client = static::createClient( array(), array(
381 381
 			'PHP_AUTH_USER' => 'UTC001',
382 382
 			'PHP_AUTH_PW'   => 'unittest',
383 383
 		) );
Please login to merge, or discard this patch.
Service/Context.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 			$this->addMessageQueueManager( $context );
59 59
 			$this->addLogger( $context );
60 60
 			$this->addCache( $context );
61
-			$this->addMailer( $context);
62
-			$this->addProcess( $context);
61
+			$this->addMailer( $context );
62
+			$this->addProcess( $context );
63 63
 
64 64
 			self::$context = $context;
65 65
 		}
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
 
70 70
 		if( $locale === true )
71 71
 		{
72
-			$localeItem = $this->container->get('aimeos.locale')->get( $context );
73
-			$context->setI18n( $this->container->get('aimeos.i18n')->get( array( $localeItem->getLanguageId() ) ) );
72
+			$localeItem = $this->container->get( 'aimeos.locale' )->get( $context );
73
+			$context->setI18n( $this->container->get( 'aimeos.i18n' )->get( array( $localeItem->getLanguageId() ) ) );
74 74
 			$context->setLocale( $localeItem );
75 75
 		}
76 76
 
77 77
 		$this->addSession( $context );
78
-		$this->addUserGroups( $context);
78
+		$this->addUserGroups( $context );
79 79
 
80 80
 		return $context;
81 81
 	}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	protected function addMailer( \Aimeos\MShop\Context\Item\Iface $context )
148 148
 	{
149 149
 		$container = $this->container;
150
-		$mail = new \Aimeos\MW\Mail\Swift( function() use ( $container) { return $container->get( 'mailer' ); } );
150
+		$mail = new \Aimeos\MW\Mail\Swift( function() use ( $container ) { return $container->get( 'mailer' ); } );
151 151
 
152 152
 		return $context->setMail( $mail );
153 153
 	}
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
 		if( is_object( $token ) && is_object( $token->getUser() ) && method_exists( $token->getUser(), 'getId' ) )
215 215
 		{
216
-			$username =  $token->getUser()->getUsername();
216
+			$username = $token->getUser()->getUsername();
217 217
 			$userid = $token->getUser()->getId();
218 218
 			$context->setUserId( $userid );
219 219
 			$context->setGroupIds( function() use ( $context, $userid )
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 		}
225 225
 
226 226
 		if( $username === '' && $this->container->has( 'request_stack' )
227
-			&& ( $request = $this->container->get('request_stack')->getMasterRequest() ) !== null
227
+			&& ( $request = $this->container->get( 'request_stack' )->getMasterRequest() ) !== null
228 228
 		) {
229 229
 			$username = $request->getClientIp();
230 230
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,8 +216,7 @@
 block discarded – undo
216 216
 			$username =  $token->getUser()->getUsername();
217 217
 			$userid = $token->getUser()->getId();
218 218
 			$context->setUserId( $userid );
219
-			$context->setGroupIds( function() use ( $context, $userid )
220
-			{
219
+			$context->setGroupIds( function() use ( $context, $userid ) {
221 220
 				$manager = \Aimeos\MShop::create( $context, 'customer' );
222 221
 				return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
223 222
 			} );
Please login to merge, or discard this patch.