Passed
Push — master ( bf11d1...f2923d )
by Anthony
03:06
created
Service/Globals.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 	 */
12 12
 	private $container;
13 13
 
14
-    /**
15
-     * Globals constructor.
16
-     * @param ContainerInterface $container
17
-     */
18
-    public function __construct(ContainerInterface $container)
14
+				/**
15
+				 * Globals constructor.
16
+				 * @param ContainerInterface $container
17
+				 */
18
+				public function __construct(ContainerInterface $container)
19 19
 	{
20 20
 		$this->container = $container;
21 21
 	}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
 		$dev_mode = $this->container->getParameter("ribs_admin")["dev_mode"];
52 52
 		
53 53
 		if ($dev_mode === true) {
54
-			$package = "lib/".$this->getPackageDevName($package);
54
+			$package = "lib/" . $this->getPackageDevName($package);
55 55
 		}
56 56
 		
57
-		return implode("/", $path)."/../../" . $package;
57
+		return implode("/", $path) . "/../../" . $package;
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.
Command/ImportModuleCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $output->writeln("Start composer require " . $pacakge_name);
51 51
 
52 52
         $process = new Process("composer require " . $pacakge_name);
53
-        $process->run(function ($type, $buffer) {
53
+        $process->run(function($type, $buffer) {
54 54
             echo $buffer;
55 55
         });
56 56
 
Please login to merge, or discard this patch.
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -13,64 +13,64 @@
 block discarded – undo
13 13
 
14 14
 class ImportModuleCommand extends Command
15 15
 {
16
-    private $em;
16
+				private $em;
17 17
 
18
-    /**
19
-     * ImportModuleCommand constructor.
20
-     * @param EntityManagerInterface $em
21
-     * @param string|null $name
22
-     */
23
-    public function __construct(EntityManagerInterface $em, string $name = null)
24
-    {
25
-        parent::__construct($name);
26
-        $this->em = $em;
27
-    }
18
+				/**
19
+				 * ImportModuleCommand constructor.
20
+				 * @param EntityManagerInterface $em
21
+				 * @param string|null $name
22
+				 */
23
+				public function __construct(EntityManagerInterface $em, string $name = null)
24
+				{
25
+								parent::__construct($name);
26
+								$this->em = $em;
27
+				}
28 28
 
29
-    protected function configure()
30
-    {
31
-        $this
32
-            ->setName('ribsadmin:import-module')
33
-            ->setDescription('Import a module in ribs admin')
34
-            ->addArgument(
35
-                'package-name',
36
-                InputArgument::REQUIRED,
37
-                'Name of composer package to import'
38
-            )
39
-            ->addArgument(
40
-                'module-name',
41
-                InputArgument::REQUIRED,
42
-                'Name of package to display in app'
43
-            )
44
-        ;
45
-    }
29
+				protected function configure()
30
+				{
31
+								$this
32
+												->setName('ribsadmin:import-module')
33
+												->setDescription('Import a module in ribs admin')
34
+												->addArgument(
35
+																'package-name',
36
+																InputArgument::REQUIRED,
37
+																'Name of composer package to import'
38
+												)
39
+												->addArgument(
40
+																'module-name',
41
+																InputArgument::REQUIRED,
42
+																'Name of package to display in app'
43
+												)
44
+								;
45
+				}
46 46
 
47
-    protected function execute(InputInterface $input, OutputInterface $output)
48
-    {
49
-        $pacakge_name = $input->getArgument('package-name');
50
-        $output->writeln("Start composer require " . $pacakge_name);
47
+				protected function execute(InputInterface $input, OutputInterface $output)
48
+				{
49
+								$pacakge_name = $input->getArgument('package-name');
50
+								$output->writeln("Start composer require " . $pacakge_name);
51 51
 
52
-        $process = new Process("composer require " . $pacakge_name);
53
-        $process->run(function ($type, $buffer) {
54
-            echo $buffer;
55
-        });
52
+								$process = new Process("composer require " . $pacakge_name);
53
+								$process->run(function ($type, $buffer) {
54
+												echo $buffer;
55
+								});
56 56
 
57
-        if (!$process->isSuccessful()) {
58
-            throw new ProcessFailedException($process);
59
-        }
57
+								if (!$process->isSuccessful()) {
58
+												throw new ProcessFailedException($process);
59
+								}
60 60
 
61
-        $output->writeln("End composer require " . $pacakge_name);
62
-        $output->writeln("Start insertion of module in database " . $pacakge_name);
61
+								$output->writeln("End composer require " . $pacakge_name);
62
+								$output->writeln("Start insertion of module in database " . $pacakge_name);
63 63
 
64
-        $module = new Module();
65
-        $module->setPackageName($pacakge_name);
66
-        $module->setTitle($input->getArgument('module-name'));
67
-        $module->setActive(false);
68
-        $module->setDisplayed(true);
69
-        $this->em->persist($module);
70
-        $this->em->flush();
64
+								$module = new Module();
65
+								$module->setPackageName($pacakge_name);
66
+								$module->setTitle($input->getArgument('module-name'));
67
+								$module->setActive(false);
68
+								$module->setDisplayed(true);
69
+								$this->em->persist($module);
70
+								$this->em->flush();
71 71
 
72
-        $output->writeln("Installation of " . $pacakge_name . " is finished. You have now to configure this module in your administration interface");
72
+								$output->writeln("Installation of " . $pacakge_name . " is finished. You have now to configure this module in your administration interface");
73 73
 
74
-        return 0;
75
-    }
74
+								return 0;
75
+				}
76 76
 }
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/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.