Completed
Branch master (ca1420)
by Guilherme
07:28 queued 32s
created
src/LoginCidadao/OAuthBundle/Entity/Organization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
         if ($this->validationSecret) {
225 225
             return;
226 226
         }
227
-        $random    = base64_encode(random_bytes(35));
227
+        $random = base64_encode(random_bytes(35));
228 228
         $this->setValidationSecret($random);
229 229
     }
230 230
 
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Controller/SuggestionController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @author Guilherme Donato
4
- */
3
+     * @author Guilherme Donato
4
+     */
5 5
 
6 6
 namespace LoginCidadao\CoreBundle\Controller;
7 7
 
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Controller/Dev/ClientController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function gridDeveloperFilterAction(Request $request)
83 83
     {
84
-        $grid  = new GridHelper();
84
+        $grid = new GridHelper();
85 85
         $grid->setId('developer-filter-grid');
86 86
         $grid->setPerPage(5);
87 87
         $grid->setMaxResult(5);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function gridDeveloperAction(Request $request)
111 111
     {
112
-        $grid  = new GridHelper();
112
+        $grid = new GridHelper();
113 113
         $grid->setId('developer-grid');
114 114
         $grid->setPerPage(5);
115 115
         $grid->setMaxResult(5);
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Controller/Dev/NotificationController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $category->setMailSenderAddress($this->getUser()->getEmail());
30 30
         $category->setEmailable(true);
31 31
         $category->setMarkdownTemplate("%title%\r\n--\r\n\r\n> %shorttext%\r\n\r\n");
32
-        $form     = $this->createForm('LoginCidadao\CoreBundle\Form\Type\CategoryFormType',
32
+        $form = $this->createForm('LoginCidadao\CoreBundle\Form\Type\CategoryFormType',
33 33
             $category);
34 34
 
35 35
         $form->handleRequest($request);
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
         $form        = $this->createForm('LoginCidadao\CoreBundle\Form\Type\PlaceholderFormType');
130 130
         $placeholder = null;
131 131
         $em          = $this->getDoctrine()->getManager();
132
-        if (($id          = $request->get('id')) || (($data        = $request->get($form->getName()))
133
-            && ($id          = $data['id']))) {
132
+        if (($id = $request->get('id')) || (($data = $request->get($form->getName()))
133
+            && ($id = $data['id']))) {
134 134
             $placeholder = $em->getRepository('LoginCidadaoNotificationBundle:Placeholder')
135 135
                 ->createQueryBuilder('u')
136 136
                 ->join('LoginCidadaoNotificationBundle:Category', 'cat', 'with',
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
                 ->orderBy('u.id', 'desc')
145 145
                 ->getQuery()
146 146
                 ->getSingleResult();
147
-        } elseif (($categoryId = $request->get('category_id')) || (($data       = $request->get($form->getName()))
147
+        } elseif (($categoryId = $request->get('category_id')) || (($data = $request->get($form->getName()))
148 148
             && ($categoryId = $data['category']))) {
149
-            $category    = $em->getRepository('LoginCidadaoNotificationBundle:Category')
149
+            $category = $em->getRepository('LoginCidadaoNotificationBundle:Category')
150 150
                 ->createQueryBuilder('u')
151 151
                 ->join('LoginCidadaoOAuthBundle:Client', 'c', 'with',
152 152
                     'u.client = c')
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Form/Type/AjaxChoiceType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      * @param array $options            
38 38
      */
39 39
     public function buildView(FormView $view, FormInterface $form,
40
-                              array $options)
40
+                                array $options)
41 41
     {
42 42
         if (array_key_exists('ajax_choice_attr', $options)) {
43 43
             $nForm                                    = $form->getParent()->getName();
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Form/Type/CategoryFormType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         $person = $this->getUser();
17 17
 
18 18
         $builder->addEventListener(FormEvents::PRE_SET_DATA,
19
-            function (FormEvent $event) use($person) {
19
+            function(FormEvent $event) use($person) {
20 20
             $cat  = $event->getData();
21 21
             $form = $event->getForm();
22 22
             if ($cat->getId()) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     'label' => 'Service',
64 64
                     'class' => 'LoginCidadaoOAuthBundle:Client',
65 65
                     'choice_label' => 'name',
66
-                    'query_builder' => function (EntityRepository $er) use($person) {
66
+                    'query_builder' => function(EntityRepository $er) use($person) {
67 67
                         return $er->createQueryBuilder('c')
68 68
                                 ->where(':person MEMBER OF c.owners')
69 69
                                 ->setParameter('person', $person)
Please login to merge, or discard this patch.
batch/stuff.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,27 +12,27 @@  discard block
 block discarded – undo
12 12
 
13 13
         $this->createDir($directory);
14 14
 
15
-        $copySource = 'zip://' . $this->filename . '#';
16
-        for ($i = 0; $i < $this->numFiles; $i ++) {
15
+        $copySource = 'zip://'.$this->filename.'#';
16
+        for ($i = 0; $i < $this->numFiles; $i++) {
17 17
             $entry = $this->getNameIndex($i);
18 18
             $filename = basename($entry);
19 19
 
20 20
             if ($this->matchFileToFilter($filename, $filters)) {
21 21
                 $base = dirname($entry);
22
-                $newPath = $directory . DIRECTORY_SEPARATOR . $base . DIRECTORY_SEPARATOR;
22
+                $newPath = $directory.DIRECTORY_SEPARATOR.$base.DIRECTORY_SEPARATOR;
23 23
                 $this->createDir($newPath);
24 24
 
25 25
                 // extract file
26
-                copy($copySource . $entry, $newPath . $filename);
26
+                copy($copySource.$entry, $newPath.$filename);
27 27
             }
28 28
         }
29 29
     }
30 30
 
31 31
     protected function createDir($path)
32 32
     {
33
-        if (! is_dir($path)) {
34
-            if (! mkdir($path, self::CHMOD, true)) {
35
-                throw new Exception('unable to create path ' . $path);
33
+        if (!is_dir($path)) {
34
+            if (!mkdir($path, self::CHMOD, true)) {
35
+                throw new Exception('unable to create path '.$path);
36 36
             }
37 37
         }
38 38
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         foreach ($filters as $i => $filter) {
49 49
 
50
-            if (! ctype_alnum($filter[0]) && preg_match($filter, $filename)) {
50
+            if (!ctype_alnum($filter[0]) && preg_match($filter, $filename)) {
51 51
                 return true;
52 52
             }
53 53
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     $ch = curl_init();
72 72
     // curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
73 73
     $f = fopen($file, 'wb');
74
-    if (! $f) {
74
+    if (!$f) {
75 75
         return false;
76 76
     }
77 77
     curl_setopt($ch, CURLOPT_FILE, $f);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     }
85 85
     $result = curl_exec($ch);
86 86
     if (!$result) {
87
-        echo curl_error ($ch );
87
+        echo curl_error($ch);
88 88
     }
89 89
     curl_close($ch);
90 90
     fclose($f);
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
         foreach ($in as $key => $value) {
120 120
             $out[utf8_encode_recursivo($key)] = utf8_encode_recursivo($value);
121 121
         }
122
-    } elseif(is_string($in)) {
123
-        if(!mb_check_encoding($in, 'UTF-8')
124
-            OR !($in === mb_convert_encoding(mb_convert_encoding($in, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) {
122
+    } elseif (is_string($in)) {
123
+        if (!mb_check_encoding($in, 'UTF-8')
124
+            OR !($in === mb_convert_encoding(mb_convert_encoding($in, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32'))) {
125 125
                 $in = mb_convert_encoding($in, 'UTF-8');
126 126
             }
127 127
             return $in;
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Form/Type/CitySelectorComboType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
     }
212 212
 
213 213
     public function finishView(FormView $view, FormInterface $form,
214
-                                 array $options)
214
+                                    array $options)
215 215
     {
216 216
         if ($view->children['country']->vars['choice_translation_domain'] === false) {
217 217
             return;
Please login to merge, or discard this patch.