Passed
Push — master ( 3b5c50...eb7b7e )
by Anthony
02:44
created
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 2 patches
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.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		]);
43 43
 		
44 44
 		foreach ($modules as $module) {
45
-			$navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath
46
-				($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true);
45
+			$navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true);
47 46
 			
48 47
 			foreach ($navigation["items"] as $item) {
49 48
 				if ($this->get("ribs_admin.acess_rights")->testRight($item["right"]) && (!isset($item["position"]) || $item["position"] === "left")) {
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.
RibsAdminBundle.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 class RibsAdminBundle extends Bundle
9 9
 {
10
-    public function getContainerExtension()
11
-    {
12
-        return new RibsAdminExtension();
13
-    }
10
+				public function getContainerExtension()
11
+				{
12
+								return new RibsAdminExtension();
13
+				}
14 14
 }
Please login to merge, or discard this patch.
DependencyInjection/RibsAdminExtension.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
 
11 11
 class RibsAdminExtension extends Extension
12 12
 {
13
-    public function load(array $configs, ContainerBuilder $container)
14
-    {
15
-        $loader = new YamlFileLoader(
16
-            $container,
17
-            new FileLocator(__DIR__.'/../Resources/config')
18
-        );
19
-        $loader->load('services.yml');
20
-    }
13
+				public function load(array $configs, ContainerBuilder $container)
14
+				{
15
+								$loader = new YamlFileLoader(
16
+												$container,
17
+												new FileLocator(__DIR__.'/../Resources/config')
18
+								);
19
+								$loader->load('services.yml');
20
+				}
21 21
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $loader = new YamlFileLoader(
16 16
             $container,
17
-            new FileLocator(__DIR__.'/../Resources/config')
17
+            new FileLocator(__DIR__ . '/../Resources/config')
18 18
         );
19 19
         $loader->load('services.yml');
20 20
     }
Please login to merge, or discard this patch.
Form/Module.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -26,22 +26,22 @@  discard block
 block discarded – undo
26 26
 				"label" => "Package name",
27 27
 				"required" => true
28 28
 			])
29
-            ->add("titleTag", TextType::class, [
30
-                "label" => "Title tag",
31
-                "required" => true
32
-            ])
33
-            ->add("descriptionTag", TextareaType::class, [
34
-                "label" => "Description tag",
35
-                "required" => true,
36
-            ])
37
-            ->add("url", TextType::class, [
38
-                "label" => "Url",
39
-                "required" => true
40
-            ])
41
-            ->add("urlAdmin", TextType::class, [
42
-                "label" => "Admin url",
43
-                "required" => true
44
-            ])
29
+												->add("titleTag", TextType::class, [
30
+																"label" => "Title tag",
31
+																"required" => true
32
+												])
33
+												->add("descriptionTag", TextareaType::class, [
34
+																"label" => "Description tag",
35
+																"required" => true,
36
+												])
37
+												->add("url", TextType::class, [
38
+																"label" => "Url",
39
+																"required" => true
40
+												])
41
+												->add("urlAdmin", TextType::class, [
42
+																"label" => "Admin url",
43
+																"required" => true
44
+												])
45 45
 			->add("active", CheckboxType::class, [
46 46
 				"label" => "Enable module",
47 47
 				"attr" => [
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
 				],
50 50
 				"required" => false
51 51
 			])
52
-            ->add("displayed", CheckboxType::class, [
53
-                "label" => "Display module in navigation",
54
-                "attr" => [
55
-                    "class" => "ribs-checkbox switched cxs-2 no-pl"
56
-                ],
57
-                "required" => false
58
-            ])
59
-            ->add('submit', SubmitType::class, [
60
-                'label' => 'Validate',
61
-                'attr' => []
62
-            ]);
52
+												->add("displayed", CheckboxType::class, [
53
+																"label" => "Display module in navigation",
54
+																"attr" => [
55
+																				"class" => "ribs-checkbox switched cxs-2 no-pl"
56
+																],
57
+																"required" => false
58
+												])
59
+												->add('submit', SubmitType::class, [
60
+																'label' => 'Validate',
61
+																'attr' => []
62
+												]);
63 63
 	}
64 64
 	
65 65
 	public function configureOptions(OptionsResolver $resolver)
Please login to merge, or discard this patch.
Command/CreateAdminCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         $account->setPassword($temp_password);
81 81
         $account->setUser($user);
82 82
         $account->setEmail($email);
83
-        $account->setUsername(substr($firstname, 0, 1).".".$lastname);
83
+        $account->setUsername(substr($firstname, 0, 1) . "." . $lastname);
84 84
         $this->em->persist($account);
85 85
 
86 86
         $this->em->flush();
Please login to merge, or discard this patch.
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -13,80 +13,80 @@
 block discarded – undo
13 13
 
14 14
 class CreateAdminCommand extends Command
15 15
 {
16
-    /** @var EntityManagerInterface */
17
-    private $em;
16
+				/** @var EntityManagerInterface */
17
+				private $em;
18 18
 
19
-    /** @var UserPasswordEncoderInterface */
20
-    private $passwordEncoder;
19
+				/** @var UserPasswordEncoderInterface */
20
+				private $passwordEncoder;
21 21
 
22
-    /**
23
-     * CreateAdminCommand constructor.
24
-     * @param EntityManagerInterface $em
25
-     * @param UserPasswordEncoderInterface $passwordEncoder
26
-     * @param string|null $name
27
-     */
28
-    public function __construct(EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, string $name = null)
29
-    {
30
-        parent::__construct($name);
31
-        $this->em = $em;
32
-        $this->passwordEncoder = $passwordEncoder;
33
-    }
22
+				/**
23
+				 * CreateAdminCommand constructor.
24
+				 * @param EntityManagerInterface $em
25
+				 * @param UserPasswordEncoderInterface $passwordEncoder
26
+				 * @param string|null $name
27
+				 */
28
+				public function __construct(EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, string $name = null)
29
+				{
30
+								parent::__construct($name);
31
+								$this->em = $em;
32
+								$this->passwordEncoder = $passwordEncoder;
33
+				}
34 34
 
35
-    protected function configure()
36
-    {
37
-        $this
38
-            ->setName('ribsadmin:create-admin')
39
-            ->setDescription('Create an admin in ribs admin')
40
-            ->addArgument(
41
-                'firstname',
42
-                InputArgument::REQUIRED,
43
-                'Firstname of admin to create'
44
-            )
45
-            ->addArgument(
46
-                'lastname',
47
-                InputArgument::REQUIRED,
48
-                'Lastname of admin to create'
49
-            )
50
-            ->addArgument(
51
-                'email',
52
-                InputArgument::REQUIRED,
53
-                'email of admin to create'
54
-            )
55
-            ->addArgument(
56
-                'password',
57
-                InputArgument::REQUIRED,
58
-                'password of admin to create'
59
-            )
60
-        ;
61
-    }
35
+				protected function configure()
36
+				{
37
+								$this
38
+												->setName('ribsadmin:create-admin')
39
+												->setDescription('Create an admin in ribs admin')
40
+												->addArgument(
41
+																'firstname',
42
+																InputArgument::REQUIRED,
43
+																'Firstname of admin to create'
44
+												)
45
+												->addArgument(
46
+																'lastname',
47
+																InputArgument::REQUIRED,
48
+																'Lastname of admin to create'
49
+												)
50
+												->addArgument(
51
+																'email',
52
+																InputArgument::REQUIRED,
53
+																'email of admin to create'
54
+												)
55
+												->addArgument(
56
+																'password',
57
+																InputArgument::REQUIRED,
58
+																'password of admin to create'
59
+												)
60
+								;
61
+				}
62 62
 
63
-    protected function execute(InputInterface $input, OutputInterface $output)
64
-    {
65
-        $firstname = $input->getArgument('firstname');
66
-        $lastname = $input->getArgument('lastname');
67
-        $email = $input->getArgument('email');
68
-        $password = $input->getArgument('password');
63
+				protected function execute(InputInterface $input, OutputInterface $output)
64
+				{
65
+								$firstname = $input->getArgument('firstname');
66
+								$lastname = $input->getArgument('lastname');
67
+								$email = $input->getArgument('email');
68
+								$password = $input->getArgument('password');
69 69
 
70
-        $output->writeln("Create admin " . $firstname . " " . $lastname);
70
+								$output->writeln("Create admin " . $firstname . " " . $lastname);
71 71
 
72
-        $user = new User();
73
-        $user->setFirstname($firstname);
74
-        $user->setLastname($lastname);
75
-        $user->setAccessRights("*");
76
-        $this->em->persist($user);
72
+								$user = new User();
73
+								$user->setFirstname($firstname);
74
+								$user->setLastname($lastname);
75
+								$user->setAccessRights("*");
76
+								$this->em->persist($user);
77 77
 
78
-        $account = new Account();
79
-        $temp_password = $this->passwordEncoder->encodePassword($account, $password);
80
-        $account->setPassword($temp_password);
81
-        $account->setUser($user);
82
-        $account->setEmail($email);
83
-        $account->setUsername(substr($firstname, 0, 1).".".$lastname);
84
-        $this->em->persist($account);
78
+								$account = new Account();
79
+								$temp_password = $this->passwordEncoder->encodePassword($account, $password);
80
+								$account->setPassword($temp_password);
81
+								$account->setUser($user);
82
+								$account->setEmail($email);
83
+								$account->setUsername(substr($firstname, 0, 1).".".$lastname);
84
+								$this->em->persist($account);
85 85
 
86
-        $this->em->flush();
86
+								$this->em->flush();
87 87
 
88
-        $output->writeln("End Create admin " . $firstname . " " . $lastname);
88
+								$output->writeln("End Create admin " . $firstname . " " . $lastname);
89 89
 
90
-        return 0;
91
-    }
90
+								return 0;
91
+				}
92 92
 }
Please login to merge, or discard this patch.