Passed
Push — master ( b5f2aa...83de64 )
by Anthony
03:40 queued 10s
created
EventListener/GuidAwareListener.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 	 */
13 13
 	private $container;
14 14
 
15
-    /**
16
-     * GuidAwareListener constructor.
17
-     * @param ContainerInterface $container
18
-     */
19
-    public function __construct(ContainerInterface $container)
15
+				/**
16
+				 * GuidAwareListener constructor.
17
+				 * @param ContainerInterface $container
18
+				 */
19
+				public function __construct(ContainerInterface $container)
20 20
 	{
21 21
 		$this->container = $container;
22 22
 	}
Please login to merge, or discard this patch.
Service/ModuleService.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	}
23 23
 	
24 24
 	/**
25
-     * method that return all infos needed in access right management page
25
+	 * method that return all infos needed in access right management page
26 26
 	 * @return array
27 27
 	 */
28 28
 	public function getAllInfosModules()
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 	
46 46
 	/**
47
-     * function that return all modules rights
47
+	 * function that return all modules rights
48 48
 	 * @return object
49 49
 	 */
50 50
 	public function getModuleRights()
Please login to merge, or discard this patch.
Service/Jwt.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 class Jwt
8 8
 {
9 9
 	/**
10
-     * encode an array in jwt
10
+	 * encode an array in jwt
11 11
 	 * @param array $values
12 12
 	 * @param string $token
13 13
 	 * @return string
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	}
19 19
 	
20 20
 	/**
21
-     * encode a jwt in array
21
+	 * encode a jwt in array
22 22
 	 * @param string $encoded_json
23 23
 	 * @param string $token
24 24
 	 * @return bool|object
Please login to merge, or discard this patch.
Controller/AccountsController.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 		]);
34 34
 	}
35 35
 
36
-    /**
37
-     * @Route("/accounts/create/", name="ribsadmin_accounts_create")
38
-     * @Route("/accounts/edit/{guid}", name="ribsadmin_accounts_edit")
39
-     * @param Request $request
40
-     * @param string|null $guid
41
-     * @return Response
42
-     */
36
+				/**
37
+				 * @Route("/accounts/create/", name="ribsadmin_accounts_create")
38
+				 * @Route("/accounts/edit/{guid}", name="ribsadmin_accounts_edit")
39
+				 * @param Request $request
40
+				 * @param string|null $guid
41
+				 * @return Response
42
+				 */
43 43
 	public function editUserAction(Request $request, string $guid = null): Response
44 44
 	{
45 45
 		$em = $this->getDoctrine()->getManager();
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 		if ($guid === null) {
48 48
 			$account = new Account();
49 49
 			$old_password = null;
50
-            $user = null;
50
+												$user = null;
51 51
 		} else {
52 52
 			$user = $em->getRepository(User::class)->findOneBy(["guid" => $guid]);
53 53
 			$account = $em->getRepository(Account::class)->findOneBy(["user" => $user->getId()]);
54
-            $old_password = $account->getPassword();
54
+												$old_password = $account->getPassword();
55 55
 		}
56 56
 		
57 57
 		$form = $this->createForm("PiouPiou\RibsAdminBundle\Form\Account", $account);
@@ -71,15 +71,15 @@  discard block
 block discarded – undo
71 71
 			}
72 72
 			
73 73
 			if (!$account_exist) {
74
-			    if ($guid === null) {
75
-                    $temp_password = $this->get("security.password_encoder")->encodePassword($data, $form->get("password")->getData());
76
-                    $data->setPassword($temp_password);
77
-                } else if ($form->get("password")->getData()) {
78
-                    $temp_password = $this->get("security.password_encoder")->encodePassword($data, $form->get("password")->getData());
79
-                    $data->setPassword($temp_password);
80
-                } else {
81
-			        $data->setPassword($old_password);
82
-                }
74
+							if ($guid === null) {
75
+																				$temp_password = $this->get("security.password_encoder")->encodePassword($data, $form->get("password")->getData());
76
+																				$data->setPassword($temp_password);
77
+																} else if ($form->get("password")->getData()) {
78
+																				$temp_password = $this->get("security.password_encoder")->encodePassword($data, $form->get("password")->getData());
79
+																				$data->setPassword($temp_password);
80
+																} else {
81
+											$data->setPassword($old_password);
82
+																}
83 83
 
84 84
 				$em->persist($data);
85 85
 				$em->flush();
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 		
102 102
 		return $this->render("@RibsAdmin/accounts/edit.html.twig", [
103 103
 			"form" => $form->createView(),
104
-            "form_errors" => $form->getErrors(),
105
-            "user" => $user
104
+												"form_errors" => $form->getErrors(),
105
+												"user" => $user
106 106
 		]);
107 107
 	}
108 108
 	//-------------------------------------------- END DISPLAY VIEWS -----------------------------------------------------------//
Please login to merge, or discard this patch.
Controller/PageController.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 
9 9
 class PageController extends AbstractController
10 10
 {
11
-    /**
12
-     * method to show index page of content management
13
-     * @Route("/contents", name="ribsadmin_contents")
14
-     * @return Response
15
-     */
11
+				/**
12
+				 * method to show index page of content management
13
+				 * @Route("/contents", name="ribsadmin_contents")
14
+				 * @return Response
15
+				 */
16 16
 	public function indexAction(): Response
17 17
 	{
18 18
 		$navigation = $this->getDoctrine()->getManager()->getRepository("RibsAdminBundle:Navigation")->findAllNavigationPage();
Please login to merge, or discard this patch.
Controller/RenderPageController.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 
10 10
 class RenderPageController extends AbstractController
11 11
 {
12
-    /**
13
-     * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"})
14
-     * @param string $url
15
-     * @return Response
16
-     */
12
+				/**
13
+				 * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"})
14
+				 * @param string $url
15
+				 * @return Response
16
+				 */
17 17
 	public function renderPageAction(string $url): Response
18 18
 	{
19 19
 		$em = $this->getDoctrine()->getManager();
Please login to merge, or discard this patch.
Controller/NavigationBuilderController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	private  $nav = [];
14 14
 	
15 15
 	/**
16
-     * function that display the left navigation mapped by user rights
16
+	 * function that display the left navigation mapped by user rights
17 17
 	 * @return Response
18 18
 	 */
19 19
 	public function getLeftNavigation(Globals $globals, AccessRights $access_rights): Response
Please login to merge, or discard this patch.
Controller/AccessRightsController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 		]);
29 29
 	}
30 30
 
31
-    /**
32
-     * @Route("/access-rights-management/create/", name="ribsadmin_access_rights_create")
33
-     * @Route("/access-rights-management/edit/{guid}", name="ribsadmin_access_rights_edit")
34
-     * @param Request $request
35
-     * @param Globals $globals
36
-     * @param ModuleService $module
37
-     * @param string|null $guid
38
-     * @return Response
39
-     */
31
+				/**
32
+				 * @Route("/access-rights-management/create/", name="ribsadmin_access_rights_create")
33
+				 * @Route("/access-rights-management/edit/{guid}", name="ribsadmin_access_rights_edit")
34
+				 * @param Request $request
35
+				 * @param Globals $globals
36
+				 * @param ModuleService $module
37
+				 * @param string|null $guid
38
+				 * @return Response
39
+				 */
40 40
 	public function editAction(Request $request, Globals $globals, ModuleService $module, string $guid = null): Response
41 41
 	{
42 42
 		$em = $this->getDoctrine()->getManager();
Please login to merge, or discard this patch.
Controller/LoginController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
 
12 12
 class LoginController extends AbstractController
13 13
 {
14
-    /**
15
-     * @Route("/login/", name="ribsadmin_login")
16
-     * @param CsrfTokenManagerInterface $token
17
-     * @param AuthenticationUtils $auth_utils
18
-     * @return Response
19
-     */
14
+				/**
15
+				 * @Route("/login/", name="ribsadmin_login")
16
+				 * @param CsrfTokenManagerInterface $token
17
+				 * @param AuthenticationUtils $auth_utils
18
+				 * @return Response
19
+				 */
20 20
 	public function loginAction(AuthenticationUtils $auth_utils): Response
21 21
 	{
22
-        $csrf_token = $this->has('security.csrf.token_manager')
23
-            ? $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue()
24
-            : null;
22
+								$csrf_token = $this->has('security.csrf.token_manager')
23
+												? $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue()
24
+												: null;
25 25
 		
26 26
 		if ($auth_utils->getLastAuthenticationError()) {
27 27
 			$this->addFlash("error-flash", "Your login or password are incorrect");
Please login to merge, or discard this patch.