Completed
Branch master (ca1420)
by Guilherme
07:28 queued 32s
created
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.
src/LoginCidadao/NotificationBundle/Entity/NotificationRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 {
13 13
 
14 14
     public function findNextNotifications(Person $person, $items = 8,
15
-                                          $lastId = 0,
16
-                                          ClientInterface $client = null)
15
+                                            $lastId = 0,
16
+                                            ClientInterface $client = null)
17 17
     {
18 18
         $qb = $this->getEntityManager()->createQueryBuilder()
19 19
             ->select('n')
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         return $this->getEntityManager()->createQueryBuilder('n')
76 76
                 ->select('COUNT(n.id) total')
77 77
                 ->from('LoginCidadaoNotificationBundle:Notification',
78
-                       'n')
78
+                        'n')
79 79
                 ->where('n.person = :person')
80 80
                 ->andWhere('n.readDate IS NULL')
81 81
                 ->setParameter('person', $person)
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.
src/LoginCidadao/NotificationBundle/Entity/PlaceholderRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
 {
12 12
 
13 13
     public function findOwnedPlaceholdersByCategoryId(PersonInterface $person,
14
-                                                      $categoryId)
14
+                                                        $categoryId)
15 15
     {
16 16
         return $this->getEntityManager()
17 17
                 ->getRepository('LoginCidadaoNotificationBundle:Placeholder')
18 18
                 ->createQueryBuilder('p')
19 19
                 ->join('LoginCidadaoNotificationBundle:Category', 'cat',
20
-                       'WITH', 'p.category = cat')
20
+                        'WITH', 'p.category = cat')
21 21
                 ->join('LoginCidadaoOAuthBundle:Client', 'c', 'WITH',
22
-                       'cat.client = c')
22
+                        'cat.client = c')
23 23
                 ->where(':person MEMBER OF c.owners')
24 24
                 ->andWhere('cat.id = :categoryId')
25 25
                 ->setParameter('person', $person)
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Form/BroadcastSettingsType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
         $builder
31 31
             ->add('placeholders', 'collection',
32
-                   array(
32
+                    array(
33 33
                     'type' => new BroadcastPlaceholderType()
34 34
             ))
35 35
             ->add('title', 'text', array("required"=> true))
Please login to merge, or discard this patch.
NotificationBundle/Handler/AuthenticatedNotificationHandler.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     }
46 46
 
47 47
     public function getAllFromClient(ClientInterface $client, $limit = 5,
48
-                                     $offset = 0, $orderby = null)
48
+                                        $offset = 0, $orderby = null)
49 49
     {
50 50
         return $this->handler->getAllFromPersonByClient($this->person, $client,
51 51
                                                         $limit, $offset,
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     public function getGroupedSettings(ClientInterface $client = null,
81
-                                       CategoryInterface $category = null)
81
+                                        CategoryInterface $category = null)
82 82
     {
83 83
         return $this->handler->getGroupedSettings($this->person, $client,
84
-                                                  $category);
84
+                                                    $category);
85 85
     }
86 86
 
87 87
     public function countUnread()
Please login to merge, or discard this patch.
NotificationBundle/Handler/AuthenticatedNotificationHandlerInterface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @return array
55 55
      */
56 56
     public function getAllFromClient(ClientInterface $client, $limit = 5,
57
-                                     $offset = 0, $orderby = null);
57
+                                        $offset = 0, $orderby = null);
58 58
 
59 59
     /**
60 60
      * Retrieves a person's settings.
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @return NotificationSettings PersonNotificationOptions grouped by Client
88 88
      */
89 89
     public function getGroupedSettings(ClientInterface $client = null,
90
-                                       CategoryInterface $category = null);
90
+                                        CategoryInterface $category = null);
91 91
 
92 92
     /**
93 93
      * Return a person's number of unread notifications.
Please login to merge, or discard this patch.
src/LoginCidadao/NotificationBundle/Handler/NotificationHandler.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
     }
67 67
 
68 68
     public function getAllFromPerson(PersonInterface $person, $limit = 5,
69
-                                     $offset = 0, $orderby = null)
69
+                                        $offset = 0, $orderby = null)
70 70
     {
71 71
         return $this->repository->findBy(array('person' => $person), $orderby,
72 72
                 $limit, $offset);
73 73
     }
74 74
 
75 75
     public function getAllFromPersonByClient(PersonInterface $person,
76
-                                             ClientInterface $client,
77
-                                             $limit = 5, $offset = 0,
78
-                                             $orderby = null)
76
+                                                ClientInterface $client,
77
+                                                $limit = 5, $offset = 0,
78
+                                                $orderby = null)
79 79
     {
80 80
         return $this->repository->findBy(array('person' => $person, 'sender' => $client),
81 81
                 $orderby, $limit, $offset);
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
      * @throws \LoginCidadao\CoreBundle\Exception\Notification\InvalidFormException
115 115
      */
116 116
     private function processForm(NotificationInterface $notification,
117
-                                 array $parameters, $method = "PUT",
118
-                                 PersonInterface $person = null)
117
+                                    array $parameters, $method = "PUT",
118
+                                    PersonInterface $person = null)
119 119
     {
120 120
         $form = $this->formFactory->create($this->notificationType,
121 121
             $notification, compact('method'));
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     }
195 195
 
196 196
     public function initializeSettings(PersonInterface $person,
197
-                                       ClientInterface $client = null)
197
+                                        ClientInterface $client = null)
198 198
     {
199 199
         $om               = $this->om;
200 200
         $categoriesRepo   = $om->getRepository('LoginCidadaoNotificationBundle:Category');
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
     }
267 267
 
268 268
     public function getGroupedSettings(PersonInterface $person,
269
-                                       ClientInterface $client = null,
270
-                                       CategoryInterface $category = null)
269
+                                        ClientInterface $client = null,
270
+                                        CategoryInterface $category = null)
271 271
     {
272 272
         $settings = new NotificationSettings();
273 273
 
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
     }
291 291
 
292 292
     public function getAllFromPersonIdOffset(PersonInterface $person,
293
-                                             $limit = 5, $offset = 0,
294
-                                             ClientInterface $client = null)
293
+                                                $limit = 5, $offset = 0,
294
+                                                ClientInterface $client = null)
295 295
     {
296 296
         return $this->repository->findNextNotifications($person, $limit,
297 297
                 $offset, $client);
@@ -348,9 +348,9 @@  discard block
 block discarded – undo
348 348
     }
349 349
 
350 350
     public static function renderEmailByCategory($category,
351
-                                                 $replacePlaceholders = null,
352
-                                                 $replaceTitle = null,
353
-                                                 $replaceShortText = null)
351
+                                                    $replacePlaceholders = null,
352
+                                                    $replaceTitle = null,
353
+                                                    $replaceShortText = null)
354 354
     {
355 355
         return self::_renderHtml($category->getMailTemplate(),
356 356
                 $replacePlaceholders, $replaceTitle, $replaceShortText);
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
     }
374 374
 
375 375
     protected function registerFailedCallback(NotificationInterface $notification,
376
-                                              ObjectManager $om, $ch,
377
-                                              $curlResponse)
376
+                                                ObjectManager $om, $ch,
377
+                                                $curlResponse)
378 378
     {
379 379
         $info = curl_getinfo($ch);
380 380
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     }
394 394
 
395 395
     private function sendCallback(NotificationInterface $notification,
396
-                                  ObjectManager $om)
396
+                                    ObjectManager $om)
397 397
     {
398 398
         if ($notification->getCallbackUrl()) {
399 399
             $secret            = $notification->getCategory()->getClient()->getSecret();
Please login to merge, or discard this patch.