Completed
Push — master ( 1a6272...815b0a )
by Andreas
20s
created
src/Avl/UserBundle/Twig/Extension/UserProfileImageExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@
 block discarded – undo
63 63
         $cacheManager = $this->container->get('liip_imagine.cache.manager');
64 64
 
65 65
         $image =
66
-            is_file($this->user->getUploadRootDir() . '/' . $profilePicturePath)
67
-                ? $this->user->getUploadDir() . '/' . $profilePicturePath
68
-                : $this->user->getUploadDir() . '/default-avatar.png';
66
+            is_file($this->user->getUploadRootDir().'/'.$profilePicturePath)
67
+                ? $this->user->getUploadDir().'/'.$profilePicturePath
68
+                : $this->user->getUploadDir().'/default-avatar.png';
69 69
 
70 70
         if (null !== $height || null !== $height) {
71 71
             $runtimeConfig = array("thumbnail" => array("size" => array($with, $height)));
Please login to merge, or discard this patch.
src/Avl/UserBundle/Form/Type/OAuthType.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     public function setDefaultOptions(OptionsResolverInterface $resolver)
72 72
     {
73 73
         $resolver->setDefaults(array(
74
-           'data_class' => 'Avl\UserBundle\Entity\OAuth'
74
+            'data_class' => 'Avl\UserBundle\Entity\OAuth'
75 75
         ));
76 76
     }
77 77
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             ->add('accounts', 'choice', array(
50 50
                 'property_path' => 'accounts',
51 51
                 'choices' => $this->choices,
52
-                'mapped' => true    ,
52
+                'mapped' => true,
53 53
                 'expanded' => true,
54 54
                 'multiple' => true,
55 55
                 'label' => 'label.facebook.accounts',
Please login to merge, or discard this patch.
src/Avl/UserBundle/Entity/UserTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     {
220 220
         return null == $this->getProfilePicturePath()
221 221
             ? null
222
-            : $this->getUploadRootDir() . '/' . $this->getProfilePicturePath();
222
+            : $this->getUploadRootDir().'/'.$this->getProfilePicturePath();
223 223
     }
224 224
 
225 225
     /**
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     {
232 232
         // the absolute directory path where uploaded
233 233
         // documents should be saved
234
-        return __DIR__ . self::UPLOAD_ROOT_DIR . self::UPLOAD_DIR;
234
+        return __DIR__.self::UPLOAD_ROOT_DIR.self::UPLOAD_DIR;
235 235
     }
236 236
 
237 237
     /**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function getWebProfilePicturePath()
243 243
     {
244
-        return self::UPLOAD_DIR . '/' . $this->getProfilePicturePath();
244
+        return self::UPLOAD_DIR.'/'.$this->getProfilePicturePath();
245 245
     }
246 246
 
247 247
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             // a file was uploaded, generate a unique filename
263 263
             $filename = $this->generateRandomFilename();
264 264
             $this->setProfilePicturePath(
265
-                $filename . '.' . $this->getProfilePictureFile()->guessExtension()
265
+                $filename.'.'.$this->getProfilePictureFile()->guessExtension()
266 266
             );
267 267
         }
268 268
     }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             $random = $generator->nextBytes(16);
288 288
             $randomString = bin2hex($random);
289 289
             $count++;
290
-        } while (file_exists($this->getUploadRootDir() . '/' . $randomString . '.' . $this->getProfilePictureFile()->guessExtension()) && $count < 50);
290
+        } while (file_exists($this->getUploadRootDir().'/'.$randomString.'.'.$this->getProfilePictureFile()->guessExtension()) && $count < 50);
291 291
 
292 292
         return $randomString;
293 293
     }
@@ -318,12 +318,12 @@  discard block
 block discarded – undo
318 318
         // check if we have an old image
319 319
         if (true
320 320
             && isset($this->oldProfilePicturePath)
321
-            && file_exists($this->getUploadRootDir() . '/' . $this->oldProfilePicturePath)
321
+            && file_exists($this->getUploadRootDir().'/'.$this->oldProfilePicturePath)
322 322
         ) {
323 323
             // delete the old image
324
-            if (is_file($this->getUploadRootDir() . '/' . $this->oldProfilePicturePath)) {
324
+            if (is_file($this->getUploadRootDir().'/'.$this->oldProfilePicturePath)) {
325 325
 
326
-                unlink($this->getUploadRootDir() . '/' . $this->oldProfilePicturePath);
326
+                unlink($this->getUploadRootDir().'/'.$this->oldProfilePicturePath);
327 327
                 // clear the temp image path
328 328
                 $this->oldProfilePicturePath = null;
329 329
             }
Please login to merge, or discard this patch.
src/Avl/UserBundle/Controller/EnquiryController.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
     private function getEnquiryParameter($parameter)
84 84
     {
85
-        return $this->container->getParameter('enquiry.email.address.' . $parameter);
85
+        return $this->container->getParameter('enquiry.email.address.'.$parameter);
86 86
     }
87 87
 
88 88
     /**
Please login to merge, or discard this patch.
src/Avl/UserBundle/Controller/DashboardController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             return $this->getCachedFeed();
70 70
 
71 71
         } catch (ContextErrorException $e) {
72
-            $this->get('logger')->error($e->getCode() . ' : ' . $e->getMessage());
72
+            $this->get('logger')->error($e->getCode().' : '.$e->getMessage());
73 73
         } finally {
74 74
             return $this->loadCachedFeed();
75 75
         }
Please login to merge, or discard this patch.
src/Avl/UserBundle/Controller/FacebookProfileController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
         echo "Posted with id: " . $response->getProperty('id');
207 207
         dump($response);
208 208
         exit;
209
-        **/
209
+         **/
210 210
     }
211 211
 
212 212
     /**
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $entities = $this->getEm()->getRepository(self::OAUTH_REPOSITORY)->findOneByUser($this->getUser());
55 55
         if ($entities) {
56 56
             $tokenList = $entities->getUnserializeInfo();
57
-            foreach($entities->getAccounts() as $account) {
57
+            foreach ($entities->getAccounts() as $account) {
58 58
                 $names[$tokenList[$account]['name'].'_'.$account] = array(
59 59
                     'id' => $account,
60 60
                     'name' => $tokenList[$account]['name']
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
         try {
91 91
             $session = $helper->getSessionFromRedirect();
92
-        } catch(FacebookRequestException $exception) {
92
+        } catch (FacebookRequestException $exception) {
93 93
             return $this->redirectOnError($exception->getMessage());
94
-        } catch(\Exception $exception) {
94
+        } catch (\Exception $exception) {
95 95
             return $this->redirectOnError($exception->getMessage());
96 96
         }
97 97
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
             // Get accounts if exists
121 121
             if (null !== $accounts->getProperty('data')) {
122
-                foreach($accounts->getProperty('data')->asArray() as $account) {
122
+                foreach ($accounts->getProperty('data')->asArray() as $account) {
123 123
                     $choices[$account->id] = $account->name;
124 124
                     $infos[$account->id] = array(
125 125
                         'token' => $account->access_token,
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $tokenList = $entity->getUnserializeInfo();
170 170
 
171 171
         try {
172
-            foreach($entity->getAccounts() as $account) {
172
+            foreach ($entity->getAccounts() as $account) {
173 173
 
174 174
                 $session = new FacebookSession($tokenList[$account]['token']);
175 175
                 $response = (new FacebookRequest(
@@ -180,15 +180,15 @@  discard block
 block discarded – undo
180 180
                         'description' => 'Have a little fun with the daily Dilbert...This is an automatic posting!'
181 181
                     )
182 182
                 ))->execute()->getGraphObject();
183
-                dump("Posted with id: " . $response->getProperty('id'));
183
+                dump("Posted with id: ".$response->getProperty('id'));
184 184
                 $user_profile = (new FacebookRequest(
185 185
                     $session, 'GET', '/'.$account
186 186
                 ))->execute()->getGraphObject(GraphUser::className());
187 187
                 dump($user_profile);
188 188
             }
189
-        } catch(FacebookRequestException $exception) {
189
+        } catch (FacebookRequestException $exception) {
190 190
             return $this->redirectOnError($exception->getMessage());
191
-        } catch(\Exception $exception) {
191
+        } catch (\Exception $exception) {
192 192
             return $this->redirectOnError($exception->getMessage());
193 193
         }
194 194
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         if ($form->isValid()) {
237 237
             // Get only the token which the user has selected
238 238
             if (sizeof($form["accounts"]->getData()) > 0) {
239
-                foreach($form["accounts"]->getData() as $id) {
239
+                foreach ($form["accounts"]->getData() as $id) {
240 240
                     $infoData[$id] = array(
241 241
                         'token' => $infos[$id]['token'],
242 242
                         'name' => $infos[$id]['name']
Please login to merge, or discard this patch.