Completed
Branch master (ca1420)
by Guilherme
07:28 queued 32s
created
src/LoginCidadao/CoreBundle/Security/OIDC/UserProvider.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
      * @return UserInterface
113 113
      */
114 114
     public function createUser($username, $password, array $roles = array(),
115
-                               array $scopes = array())
115
+                                array $scopes = array())
116 116
     {
117 117
         $user = parent::createUser();
118 118
 
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Security/User/Manager/UserManager.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * @return string
82 82
      */
83 83
     public function getNextAvailableUsername($username, $maxIterations = 10,
84
-                                             $default = null)
84
+                                                $default = null)
85 85
     {
86 86
         $i = 0;
87 87
         $testName = $username;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
     public function findUserByUsernameOrEmail($username) {
105
-       if (is_numeric($cpf = preg_replace('/[^0-9]/', '', $username)) && strlen($cpf) == 11) {
105
+        if (is_numeric($cpf = preg_replace('/[^0-9]/', '', $username)) && strlen($cpf) == 11) {
106 106
             $person = parent::findUserBy(array('cpf' => $cpf));
107 107
             if ($person !== null) {
108 108
                 return $person;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,13 +88,13 @@
 block discarded – undo
88 88
 
89 89
         do {
90 90
             $user = $this->findUserByUsername($testName);
91
-        } while ($user !== null && $i < $maxIterations && $testName = $username . $i++);
91
+        } while ($user !== null && $i < $maxIterations && $testName = $username.$i++);
92 92
 
93 93
         if (is_null($user)) {
94 94
             return $testName;
95 95
         } else {
96 96
             if (is_null($default)) {
97
-                return "$username@" . time();
97
+                return "$username@".time();
98 98
             } else {
99 99
                 return $default;
100 100
             }
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Security/User/Provider/FOSUBUserProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 
60 60
         $service = $response->getResourceOwner()->getName();
61 61
 
62
-        $setter = 'set' . ucfirst($service);
63
-        $setter_id = $setter . 'Id';
64
-        $setter_token = $setter . 'AccessToken';
65
-        $setter_username = $setter . 'Username';
62
+        $setter = 'set'.ucfirst($service);
63
+        $setter_id = $setter.'Id';
64
+        $setter_token = $setter.'AccessToken';
65
+        $setter_username = $setter.'Username';
66 66
 
67 67
         if (null !== $previousUser = $this->userManager->findUserBy(array("{$service}Id" => $username))) {
68 68
             throw new AlreadyLinkedAccount();
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 
92 92
 
93 93
         $service = $response->getResourceOwner()->getName();
94
-        $setter = 'set' . ucfirst($service);
95
-        $setter_id = $setter . 'Id';
96
-        $setter_token = $setter . 'AccessToken';
97
-        $setter_username = $setter . 'Username';
94
+        $setter = 'set'.ucfirst($service);
95
+        $setter_id = $setter.'Id';
96
+        $setter_token = $setter.'AccessToken';
97
+        $setter_username = $setter.'Username';
98 98
 
99 99
         $newUser = false;
100 100
         $user = $this->userManager->findUserBy(array("{$service}Id" => $username));
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $user = parent::loadUserByOAuthUserResponse($response);
170 170
 
171 171
         $serviceName = $response->getResourceOwner()->getName();
172
-        $setter = 'set' . ucfirst($serviceName) . 'AccessToken';
172
+        $setter = 'set'.ucfirst($serviceName).'AccessToken';
173 173
 
174 174
         $user->$setter($response->getAccessToken());
175 175
 
Please login to merge, or discard this patch.
src/LoginCidadao/InfiniteScrollBundle/Controller/FragmentController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function fragmentAction($name)
15 15
     {
16 16
         return $this->render('LoginCidadaoInfiniteScrollBundle:Default:index.html.twig',
17
-                             array('name' => $name));
17
+                                array('name' => $name));
18 18
     }
19 19
 
20 20
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
 
30 30
         foreach ($iterator as $notifications) {
31 31
             foreach ($notifications as $notification) {
32
-                echo $notification->getId() . PHP_EOL;
32
+                echo $notification->getId().PHP_EOL;
33 33
             }
34
-            echo '-----' . PHP_EOL;
34
+            echo '-----'.PHP_EOL;
35 35
         }
36 36
         die();
37 37
     }
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Controller/NotificationController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
     }
141 141
 
142 142
     private function getNotificationGrid($offset = 0, $perIteration = 10,
143
-                                         ClientInterface $client = null)
143
+                                            ClientInterface $client = null)
144 144
     {
145 145
         $handler = $this->getAuthenticatedNotificationHandler();
146 146
         if ($client instanceof ClientInterface) {
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Entity/Broadcast.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,9 +157,9 @@
 block discarded – undo
157 157
     // }
158 158
 
159 159
     public function setHtmlTemplate(ArrayCollection $placeholders, $title, $shortText) {
160
-      $this->htmlTemplate = NotificationHandler::renderHtmlByCategory($this->getCategory(), $placeholders, $title, $shortText);
161
-      $this->mailTemplate = NotificationHandler::renderHtmlByCategory($this->getCategory(), $placeholders, $title, $shortText);
162
-      return $this;
160
+        $this->htmlTemplate = NotificationHandler::renderHtmlByCategory($this->getCategory(), $placeholders, $title, $shortText);
161
+        $this->mailTemplate = NotificationHandler::renderHtmlByCategory($this->getCategory(), $placeholders, $title, $shortText);
162
+        return $this;
163 163
     }
164 164
     
165 165
     public function setMailTemplate($var) {
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Doctrine\ORM\Mapping as ORM;
6 6
 use Doctrine\Common\Collections\ArrayCollection;
7
-use LoginCidadao\OAuthBundle\Entity\Client;
8 7
 use LoginCidadao\CoreBundle\Entity\Person;
9
-use Symfony\Component\Validator\Constraints as Assert;
10
-use JMS\Serializer\Annotation as JMS;
11 8
 use LoginCidadao\NotificationBundle\Handler\NotificationHandler;
12 9
 
13 10
 /**
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Entity/CategoryRepository.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
 
13 13
     public function findUnconfigured(PersonInterface $person,
14
-                                     ClientInterface $client = null)
14
+                                        ClientInterface $client = null)
15 15
     {
16 16
         $qb = $this->getEntityManager()->createQueryBuilder()
17 17
             ->select('c')
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
             ->innerJoin('LoginCidadaoCoreBundle:Authorization', 'a',
20 20
                         'WITH', 'a.client = c.client AND a.person = :person')
21 21
             ->leftJoin('LoginCidadaoNotificationBundle:PersonNotificationOption',
22
-                       'o', 'WITH', 'o.category = c AND a.person = o.person')
22
+                        'o', 'WITH', 'o.category = c AND a.person = o.person')
23 23
             ->where('o is null')
24 24
             ->setParameter('person', $person);
25 25
 
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Entity/FailedCallbackRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
             ->getRepository('LoginCidadaoNotificationBundle:FailedCallback')
20 20
             ->createQueryBuilder('f')
21 21
             ->join('LoginCidadaoNotificationBundle:Notification', 'n',
22
-                   'WITH', 'f.notification = n')
22
+                    'WITH', 'f.notification = n')
23 23
             ->where('n.sender = :client')
24 24
             ->setParameter('client', $client);
25 25
         return $qb->getQuery()->getResult();
Please login to merge, or discard this patch.
NotificationBundle/Entity/PersonNotificationOptionRepository.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
         $qb = $this->getEntityManager()->createQueryBuilder()
20 20
             ->select('s')
21 21
             ->from('LoginCidadaoNotificationBundle:PersonNotificationOption',
22
-                   's')
22
+                    's')
23 23
             ->join('LoginCidadaoNotificationBundle:Category', 'c',
24
-                   'WITH', 's.category = c')
24
+                    'WITH', 's.category = c')
25 25
             ->innerJoin('LoginCidadaoOAuthBundle:Client', 'cli', 'WITH',
26 26
                         'c.client = cli')
27 27
             ->innerJoin('LoginCidadaoCoreBundle:Authorization', 'a',
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
     }
32 32
 
33 33
     public function findByClient(PersonInterface $person,
34
-                                 ClientInterface $client)
34
+                                    ClientInterface $client)
35 35
     {
36 36
         return $this->findByPerson($person, null, $client);
37 37
     }
38 38
 
39 39
     public function findByPerson(PersonInterface $person,
40
-                                 CategoryInterface $category = null,
41
-                                 ClientInterface $client = null)
40
+                                    CategoryInterface $category = null,
41
+                                    ClientInterface $client = null)
42 42
     {
43 43
         $qb = $this->getBaseQuery()
44 44
             ->where('s.person = :person')
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         if (null !== $category) {
50 50
             $qb->andWhere('s.category = :category')->setParameter('category',
51
-                                                                  $category);
51
+                                                                    $category);
52 52
         }
53 53
         if (null !== $client) {
54 54
             $qb->andWhere('c.client = :client')->setParameter('client', $client);
Please login to merge, or discard this patch.