Passed
Push — master ( 53bc6b...65941d )
by Anthony
01:50
created
Entity/Page.php 1 patch
Braces   +21 added lines, -42 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
  * @ORM\Table(name="page", indexes={@ORM\Index(name="fk_page_page1_idx", columns={"parent"})})
11 11
  * @ORM\Entity
12 12
  */
13
-class Page
14
-{
13
+class Page {
15 14
     /**
16 15
      * @var integer
17 16
      *
@@ -90,160 +89,140 @@  discard block
 block discarded – undo
90 89
     /**
91 90
      * @return int
92 91
      */
93
-    public function getId()
94
-    {
92
+    public function getId() {
95 93
         return $this->id;
96 94
     }
97 95
 
98 96
     /**
99 97
      * @param int $id
100 98
      */
101
-    public function setId($id)
102
-    {
99
+    public function setId($id) {
103 100
         $this->id = $id;
104 101
     }
105 102
 
106 103
     /**
107 104
      * @return string
108 105
      */
109
-    public function getGuid()
110
-    {
106
+    public function getGuid() {
111 107
         return $this->guid;
112 108
     }
113 109
 
114 110
     /**
115 111
      * @param string $guid
116 112
      */
117
-    public function setGuid($guid)
118
-    {
113
+    public function setGuid($guid) {
119 114
         $this->guid = $guid;
120 115
     }
121 116
 
122 117
     /**
123 118
      * @return string
124 119
      */
125
-    public function getTitleTag()
126
-    {
120
+    public function getTitleTag() {
127 121
         return $this->titleTag;
128 122
     }
129 123
 
130 124
     /**
131 125
      * @param string $titleTag
132 126
      */
133
-    public function setTitleTag($titleTag)
134
-    {
127
+    public function setTitleTag($titleTag) {
135 128
         $this->titleTag = $titleTag;
136 129
     }
137 130
 
138 131
     /**
139 132
      * @return string
140 133
      */
141
-    public function getDescriptionTag()
142
-    {
134
+    public function getDescriptionTag() {
143 135
         return $this->descriptionTag;
144 136
     }
145 137
 
146 138
     /**
147 139
      * @param string $descriptionTag
148 140
      */
149
-    public function setDescriptionTag($descriptionTag)
150
-    {
141
+    public function setDescriptionTag($descriptionTag) {
151 142
         $this->descriptionTag = $descriptionTag;
152 143
     }
153 144
 
154 145
     /**
155 146
      * @return string
156 147
      */
157
-    public function getTitle()
158
-    {
148
+    public function getTitle() {
159 149
         return $this->title;
160 150
     }
161 151
 
162 152
     /**
163 153
      * @param string $title
164 154
      */
165
-    public function setTitle($title)
166
-    {
155
+    public function setTitle($title) {
167 156
         $this->title = $title;
168 157
     }
169 158
 
170 159
     /**
171 160
      * @return string
172 161
      */
173
-    public function getContent()
174
-    {
162
+    public function getContent() {
175 163
         return $this->content;
176 164
     }
177 165
 
178 166
     /**
179 167
      * @param string $content
180 168
      */
181
-    public function setContent($content)
182
-    {
169
+    public function setContent($content) {
183 170
         $this->content = $content;
184 171
     }
185 172
 
186 173
     /**
187 174
      * @return int
188 175
      */
189
-    public function getActive()
190
-    {
176
+    public function getActive() {
191 177
         return $this->active;
192 178
     }
193 179
 
194 180
     /**
195 181
      * @param int $active
196 182
      */
197
-    public function setActive($active)
198
-    {
183
+    public function setActive($active) {
199 184
         $this->active = $active;
200 185
     }
201 186
 
202 187
     /**
203 188
      * @return int
204 189
      */
205
-    public function getOrder()
206
-    {
190
+    public function getOrder() {
207 191
         return $this->order;
208 192
     }
209 193
 
210 194
     /**
211 195
      * @param int $order
212 196
      */
213
-    public function setOrder($order)
214
-    {
197
+    public function setOrder($order) {
215 198
         $this->order = $order;
216 199
     }
217 200
 
218 201
     /**
219 202
      * @return int
220 203
      */
221
-    public function getDisplayed()
222
-    {
204
+    public function getDisplayed() {
223 205
         return $this->displayed;
224 206
     }
225 207
 
226 208
     /**
227 209
      * @param int $displayed
228 210
      */
229
-    public function setDisplayed($displayed)
230
-    {
211
+    public function setDisplayed($displayed) {
231 212
         $this->displayed = $displayed;
232 213
     }
233 214
 
234 215
     /**
235 216
      * @return \Page
236 217
      */
237
-    public function getParent()
238
-    {
218
+    public function getParent() {
239 219
         return $this->parent;
240 220
     }
241 221
 
242 222
     /**
243 223
      * @param \Page $parent
244 224
      */
245
-    public function setParent($parent)
246
-    {
225
+    public function setParent($parent) {
247 226
         $this->parent = $parent;
248 227
     }
249 228
 
Please login to merge, or discard this patch.
Entity/UserLogs.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
  * @ORM\Table(name="user_logs", indexes={@ORM\Index(name="fk_user_infos_user_idx", columns={"user_id"})})
11 11
  * @ORM\Entity
12 12
  */
13
-class UserLogs
14
-{
13
+class UserLogs {
15 14
     /**
16 15
      * @var integer
17 16
      *
@@ -36,32 +35,28 @@  discard block
 block discarded – undo
36 35
     /**
37 36
      * @return int
38 37
      */
39
-    public function getId()
40
-    {
38
+    public function getId() {
41 39
         return $this->id;
42 40
     }
43 41
 
44 42
     /**
45 43
      * @param int $id
46 44
      */
47
-    public function setId($id)
48
-    {
45
+    public function setId($id) {
49 46
         $this->id = $id;
50 47
     }
51 48
 
52 49
     /**
53 50
      * @return \User
54 51
      */
55
-    public function getUser()
56
-    {
52
+    public function getUser() {
57 53
         return $this->user;
58 54
     }
59 55
 
60 56
     /**
61 57
      * @param \User $user
62 58
      */
63
-    public function setUser($user)
64
-    {
59
+    public function setUser($user) {
65 60
         $this->user = $user;
66 61
     }
67 62
 
Please login to merge, or discard this patch.
Tests/Controller/DefaultControllerTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Symfony\Bundle\RibsAdminBundle\Test\WebTestCase;
6 6
 
7
-class DefaultControllerTest extends WebTestCase
8
-{
9
-    public function testIndex()
10
-    {
7
+class DefaultControllerTest extends WebTestCase {
8
+    public function testIndex() {
11 9
         $client = static::createClient();
12 10
 
13 11
         $crawler = $client->request('GET', '/');
Please login to merge, or discard this patch.
RibsAdminBundle.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Symfony\Component\HttpKernel\Bundle\Bundle;
6 6
 
7
-class RibsAdminBundle extends Bundle
8
-{
9
-	public function getParent()
10
-	{
7
+class RibsAdminBundle extends Bundle {
8
+	public function getParent() {
11 9
 		return 'FOSUserBundle';
12 10
 	}
13 11
 }
Please login to merge, or discard this patch.
Controller/LoginController.php 1 patch
Braces   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,15 +9,13 @@  discard block
 block discarded – undo
9 9
 use Symfony\Component\Security\Core\Exception\AuthenticationException;
10 10
 use Symfony\Component\Security\Core\Security;
11 11
 
12
-class LoginController extends FOSController
13
-{
12
+class LoginController extends FOSController {
14 13
 	/**
15 14
 	 * @param Request $request
16 15
 	 *
17 16
 	 * @return Response
18 17
 	 */
19
-	public function loginAction(Request $request)
20
-	{
18
+	public function loginAction(Request $request) {
21 19
 		/** @var $session \Symfony\Component\HttpFoundation\Session\Session */
22 20
 		$session = $request->getSession();
23 21
 		
@@ -27,10 +25,12 @@  discard block
 block discarded – undo
27 25
 		// get the error if any (works with forward and redirect -- see below)
28 26
 		if ($request->attributes->has($authErrorKey)) {
29 27
 			$error = $request->attributes->get($authErrorKey);
30
-		} else if (null !== $session && $session->has($authErrorKey)) {
28
+		}
29
+		else if (null !== $session && $session->has($authErrorKey)) {
31 30
 			$error = $session->get($authErrorKey);
32 31
 			$session->remove($authErrorKey);
33
-		} else {
32
+		}
33
+		else {
34 34
 			$error = null;
35 35
 		}
36 36
 		
@@ -74,13 +74,11 @@  discard block
 block discarded – undo
74 74
 		return $this->render("@RibsAdmin/login/login.html.twig", $data);
75 75
 	}
76 76
 	
77
-	public function checkAction()
78
-	{
77
+	public function checkAction() {
79 78
 		throw new \RuntimeException('You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.');
80 79
 	}
81 80
 	
82
-	public function logoutAction()
83
-	{
81
+	public function logoutAction() {
84 82
 		throw new \RuntimeException('You must activate the logout in your security firewall configuration.');
85 83
 	}
86 84
 }
Please login to merge, or discard this patch.
Controller/NavigationBuilderController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6 6
 use Symfony\Component\HttpFoundation\Response;
7 7
 
8
-class NavigationBuilderController extends Controller
9
-{
8
+class NavigationBuilderController extends Controller {
10 9
 	/**
11 10
 	 * @return Response function that display the left navigation mapped by user rights
12 11
 	 */
Please login to merge, or discard this patch.
Controller/DefaultController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6 6
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
7 7
 
8
-class DefaultController extends Controller
9
-{
8
+class DefaultController extends Controller {
10 9
 	/**
11 10
 	 * @Route("/index", name="ribsadmin_index")
12 11
 	 * @Route("/access-rights-management", name="ribsadmin_access_rights")
@@ -14,8 +13,7 @@  discard block
 block discarded – undo
14 13
 	 * @Route("/navigation", name="ribsadmin_navigation")
15 14
 	 *
16 15
 	 */
17
-	public function indexAction()
18
-	{
16
+	public function indexAction() {
19 17
 		return $this->render('RibsAdminBundle:Default:index.html.twig');
20 18
 	}
21 19
 }
Please login to merge, or discard this patch.
Service/AccessRights.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
 use Symfony\Component\Routing\RouterInterface;
9 9
 use Symfony\Component\Security\Core\Exception\AccessDeniedException;
10 10
 
11
-class AccessRights
12
-{
11
+class AccessRights {
13 12
 	private $em;
14 13
 	private $router;
15 14
 	private $session;
@@ -22,16 +21,14 @@  discard block
 block discarded – undo
22 21
 	 * @param Session $session
23 22
 	 * @param RequestStack $request
24 23
 	 */
25
-	public function __construct(ContainerInterface $em, RouterInterface $router, Session $session, RequestStack $request)
26
-	{
24
+	public function __construct(ContainerInterface $em, RouterInterface $router, Session $session, RequestStack $request) {
27 25
 		$this->em = $em;
28 26
 		$this->router = $router;
29 27
 		$this->session = $session;
30 28
 		$this->request = $request;
31 29
 	}
32 30
 	
33
-	public function onKernelController()
34
-	{
31
+	public function onKernelController() {
35 32
 		$route = $this->request->getCurrentRequest()->get("_route");
36 33
 		$admin_page = explode("_", $route)[0];
37 34
 		
@@ -72,8 +69,7 @@  discard block
 block discarded – undo
72 69
 	 * @return bool|mixed
73 70
 	 * fonction that search if the right contain an url or more
74 71
 	 */
75
-	private function in_array_recursive($needle, $haystack)
76
-	{
72
+	private function in_array_recursive($needle, $haystack) {
77 73
 		$rights = [];
78 74
 		$it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($haystack));
79 75
 		
Please login to merge, or discard this patch.
DependencyInjection/RibsAdminExtension.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,11 @@
 block discarded – undo
12 12
  *
13 13
  * @link http://symfony.com/doc/current/cookbook/bundles/extension.html
14 14
  */
15
-class RibsAdminExtension extends Extension
16
-{
15
+class RibsAdminExtension extends Extension {
17 16
     /**
18 17
      * {@inheritdoc}
19 18
      */
20
-    public function load(array $configs, ContainerBuilder $container)
21
-    {
19
+    public function load(array $configs, ContainerBuilder $container) {
22 20
         $configuration = new Configuration();
23 21
         $this->processConfiguration($configuration, $configs);
24 22
 
Please login to merge, or discard this patch.