Completed
Pull Request — master (#148)
by
unknown
14:34
created
src/UserBundle/Security/ApiAuthenticator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         
83 83
         $apiToken = hash_hmac(
84 84
             'sha256',
85
-            'timestamp=' . $credentials[self::TIMESTAMP],
85
+            'timestamp='.$credentials[self::TIMESTAMP],
86 86
             $user->getApiKey()
87 87
         );
88 88
         
Please login to merge, or discard this patch.
src/UserBundle/Tests/Controller/ApiControllerTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
21 21
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
22 22
         $this->client->enableProfiler();
23
-        $this->client->request('POST', '/api/users/' . $email);
23
+        $this->client->request('POST', '/api/users/'.$email);
24 24
         
25 25
         $this->assertJsonResponse($this->client->getResponse());
26 26
         
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function testFindUser()
66 66
     {
67 67
         $this->logIn('ROLE_SUPER_ADMIN');
68
-        $this->client->request('GET', '/api/users/' . UserFixtures::$users['user-1']);
68
+        $this->client->request('GET', '/api/users/'.UserFixtures::$users['user-1']);
69 69
         
70 70
         $this->assertJsonResponse($this->client->getResponse());
71 71
         $this->assertJsonStringEqualsJsonString(
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function testFindUserInsufficentPerms()
81 81
     {
82 82
         $this->logIn('ROLE_ADMIN');
83
-        $this->client->request('GET', '/api/users/' . UserFixtures::$users['user-1']);
83
+        $this->client->request('GET', '/api/users/'.UserFixtures::$users['user-1']);
84 84
         
85 85
         $this->assertForbidden($this->client->getResponse());
86 86
     }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
153 153
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
154
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-2']->getId() . '/lock');
154
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-2']->getId().'/lock');
155 155
         
156 156
         $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId());
157 157
         $this->assertTrue($user->isLocked());
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     public function testToggleLockUserInsufficentPerms()
167 167
     {
168 168
         $this->logIn('ROLE_ADMIN');
169
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/lock');
169
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/lock');
170 170
         
171 171
         $this->assertForbidden($this->client->getResponse());
172 172
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
177 177
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
178
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/lock');
178
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/lock');
179 179
         
180 180
         $this->assertForbidden($this->client->getResponse());
181 181
     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
186 186
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
187
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-2']->getId() . '/role/ROLE_ADMIN');
187
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-2']->getId().'/role/ROLE_ADMIN');
188 188
         
189 189
         $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId());
190 190
         $this->assertTrue($user->hasRole('ROLE_ADMIN'));
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     public function testSetUserRoleInsufficentPerms()
200 200
     {
201 201
         $this->logIn('ROLE_ADMIN');
202
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/role/ROLE_USER');
202
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/role/ROLE_USER');
203 203
         
204 204
         $this->assertForbidden($this->client->getResponse());
205 205
     }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     {
209 209
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
210 210
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
211
-        $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/role/ROLE_USER');
211
+        $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/role/ROLE_USER');
212 212
         
213 213
         $this->assertForbidden($this->client->getResponse());
214 214
     }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     {
218 218
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
219 219
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
220
-        $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-2']->getId());
220
+        $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-2']->getId());
221 221
         
222 222
         $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId());
223 223
         $this->assertNull($user);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     public function testDeleteUserInsufficentPerms()
229 229
     {
230 230
         $this->logIn('ROLE_ADMIN');
231
-        $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-1']->getId());
231
+        $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-1']->getId());
232 232
         
233 233
         $this->assertForbidden($this->client->getResponse());
234 234
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     {
238 238
         $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi');
239 239
         $this->client = $this->makeClient(); //When using loginAs, we must re-create the client
240
-        $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-1']->getId());
240
+        $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-1']->getId());
241 241
         
242 242
         $this->assertForbidden($this->client->getResponse());
243 243
     }
Please login to merge, or discard this patch.
src/UserBundle/Tests/Controller/AppControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $firewall = 'overwatch';
47 47
         
48 48
         $token = new UsernamePasswordToken('testUser', null, $firewall, [$role]);
49
-        $session->set('_security_' . $firewall, serialize($token));
49
+        $session->set('_security_'.$firewall, serialize($token));
50 50
         $session->save();
51 51
         $cookie = new Cookie($session->getName(), $session->getId());
52 52
         $this->client->getCookieJar()->set($cookie);
Please login to merge, or discard this patch.
src/UserBundle/Tests/Security/ApiAuthenticatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
         $timestamp = time();
178 178
         $apiToken = hash_hmac(
179 179
             'sha256',
180
-            'timestamp=' . $timestamp,
180
+            'timestamp='.$timestamp,
181 181
             $this->user->getApiKey()
182 182
         );
183 183
         
Please login to merge, or discard this patch.
src/UserBundle/Tests/Base/WebDriverTestCase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
     {
86 86
         if ($this->webDriver !== null) {
87 87
             if (in_array($this->getStatus(), [\PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR])) {
88
-                echo PHP_EOL . PHP_EOL . PHP_EOL;
89
-                echo 'data:image/png;base64,' . base64_encode($this->webDriver->takeScreenshot());
90
-                echo PHP_EOL . PHP_EOL . PHP_EOL;
88
+                echo PHP_EOL.PHP_EOL.PHP_EOL;
89
+                echo 'data:image/png;base64,'.base64_encode($this->webDriver->takeScreenshot());
90
+                echo PHP_EOL.PHP_EOL.PHP_EOL;
91 91
             }
92 92
         }
93 93
         
Please login to merge, or discard this patch.
src/ServiceBundle/Reporter/EmailReporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     private function sendEmail(TestResult $result, array $users)
40 40
     {
41 41
         $message = \Swift_Message::newInstance()
42
-            ->setSubject($result->getTest()->getName() . ' ' . $result->getStatus())
42
+            ->setSubject($result->getTest()->getName().' '.$result->getStatus())
43 43
             ->setFrom($this->config['report_from'])
44 44
             ->setTo($users)
45 45
             ->setBody(
Please login to merge, or discard this patch.
src/ServiceBundle/DependencyInjection/OverwatchServiceExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
         $configuration = $this->processConfiguration(new Configuration(), $configs);
23 23
         
24 24
         foreach ($configuration as $service => $config) {
25
-            $container->setParameter('overwatch_service.' . $service, $config);
25
+            $container->setParameter('overwatch_service.'.$service, $config);
26 26
         }
27 27
         
28
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
28
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
29 29
         $loader->load('services.yml');
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/ServiceBundle/Tests/Reporter/EmailReporterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         
41 41
         $message = $this->mailerSpy->getInvocations()[0]->parameters[0];
42 42
         $this->assertEquals(
43
-            $result->getTest()->getName() . ' ' . $result->getStatus(),
43
+            $result->getTest()->getName().' '.$result->getStatus(),
44 44
             $message->getSubject()
45 45
         );
46 46
         
Please login to merge, or discard this patch.
src/ServiceBundle/Tests/Reporter/SmsReporterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         
53 53
         $message = $this->messageSpy->getInvocations()[0]->parameters[2];
54 54
         $this->assertEquals(
55
-            $result->getTest()->getName() . ' ' . $result->getStatus() . ': Me gusta success kid upvoting Obama first world problems.' . PHP_EOL,
55
+            $result->getTest()->getName().' '.$result->getStatus().': Me gusta success kid upvoting Obama first world problems.'.PHP_EOL,
56 56
             $message
57 57
         );
58 58
         
Please login to merge, or discard this patch.