Passed
Push — master ( 582587...3b42e9 )
by Anthony
04:10 queued 11s
created
Tests/Controller/DefaultControllerTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 
7 7
 class DefaultControllerTest extends WebTestCase
8 8
 {
9
-    public function testIndex()
10
-    {
11
-        $client = static::createClient();
9
+				public function testIndex()
10
+				{
11
+								$client = static::createClient();
12 12
 
13
-        $crawler = $client->request('GET', '/');
13
+								$crawler = $client->request('GET', '/');
14 14
 
15
-        $this->assertContains('Hello World', $client->getResponse()->getContent());
16
-    }
15
+								$this->assertContains('Hello World', $client->getResponse()->getContent());
16
+				}
17 17
 }
Please login to merge, or discard this 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.
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.
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 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@
 block discarded – undo
14 14
  */
15 15
 class RibsAdminExtension extends Extension
16 16
 {
17
-    /**
18
-     * {@inheritdoc}
19
-     */
20
-    public function load(array $configs, ContainerBuilder $container)
21
-    {
22
-        $configuration = new Configuration();
23
-        $this->processConfiguration($configuration, $configs);
17
+				/**
18
+				 * {@inheritdoc}
19
+				 */
20
+				public function load(array $configs, ContainerBuilder $container)
21
+				{
22
+								$configuration = new Configuration();
23
+								$this->processConfiguration($configuration, $configs);
24 24
 
25
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
26
-        $loader->load('services.yml');
27
-    }
25
+								$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
26
+								$loader->load('services.yml');
27
+				}
28 28
 }
Please login to merge, or discard this 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.
DependencyInjection/Configuration.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,18 +12,18 @@
 block discarded – undo
12 12
  */
13 13
 class Configuration implements ConfigurationInterface
14 14
 {
15
-    /**
16
-     * {@inheritdoc}
17
-     */
18
-    public function getConfigTreeBuilder()
19
-    {
20
-        $treeBuilder = new TreeBuilder();
21
-        $treeBuilder->root('ribs_admin');
15
+				/**
16
+				 * {@inheritdoc}
17
+				 */
18
+				public function getConfigTreeBuilder()
19
+				{
20
+								$treeBuilder = new TreeBuilder();
21
+								$treeBuilder->root('ribs_admin');
22 22
 		
23
-        // Here you should define the parameters that are allowed to
24
-        // configure your bundle. See the documentation linked above for
25
-        // more information on that topic.
23
+								// Here you should define the parameters that are allowed to
24
+								// configure your bundle. See the documentation linked above for
25
+								// more information on that topic.
26 26
 
27
-        return $treeBuilder;
28
-    }
27
+								return $treeBuilder;
28
+				}
29 29
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,13 +10,11 @@
 block discarded – undo
10 10
  *
11 11
  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
12 12
  */
13
-class Configuration implements ConfigurationInterface
14
-{
13
+class Configuration implements ConfigurationInterface {
15 14
     /**
16 15
      * {@inheritdoc}
17 16
      */
18
-    public function getConfigTreeBuilder()
19
-    {
17
+    public function getConfigTreeBuilder() {
20 18
         $treeBuilder = new TreeBuilder();
21 19
         $treeBuilder->root('ribs_admin');
22 20
 		
Please login to merge, or discard this patch.
Service/Globals.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Ribs\RibsAdminBundle\Service;
4 4
 
5
-class Globals
6
-{
5
+class Globals {
7 6
 	/**
8 7
 	 * @return string
9 8
 	 */
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,15 +5,13 @@
 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("/contents", name="ribsadmin_contents")
13 12
 	 * @Route("/navigation", name="ribsadmin_navigation")
14 13
 	 */
15
-	public function indexAction()
16
-	{
14
+	public function indexAction() {
17 15
 		return $this->render('RibsAdminBundle:Default:index.html.twig');
18 16
 	}
19 17
 }
Please login to merge, or discard this patch.
Controller/AccountsController.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
 use Symfony\Component\HttpFoundation\Response;
8 8
 use Symfony\Component\Routing\Annotation\Route;
9 9
 
10
-class AccountsController extends Controller
11
-{
10
+class AccountsController extends Controller {
12 11
 	//-------------------------------------------- DISPLAY VIEWS ---------------------------------------------------------------//
13 12
 	/**
14 13
 	 * @Route("/accounts/", name="ribsadmin_accounts")
@@ -44,7 +43,8 @@  discard block
 block discarded – undo
44 43
 			if ($activate === true) {
45 44
 				$user->setArchived(false);
46 45
 				$word = "activated";
47
-			} else {
46
+			}
47
+			else {
48 48
 				$user->setArchived(true);
49 49
 				$word = "disabled";
50 50
 			}
Please login to merge, or discard this patch.
Form/AccessRight.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
 				'label_attr' => [
20 20
 					'class' => 'label'
21 21
 				],
22
-                'attr' => [],
23
-                'required' => true
24
-            ])
25
-            ->add('submit', SubmitType::class, [
22
+																'attr' => [],
23
+																'required' => true
24
+												])
25
+												->add('submit', SubmitType::class, [
26 26
 		'label' => 'Validate',
27 27
 		'attr' => []
28 28
 	]);
29
-    }
29
+				}
30 30
 	
31 31
 	public function configureOptions(OptionsResolver $resolver)
32 32
 	{
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,10 +9,8 @@  discard block
 block discarded – undo
9 9
 use Symfony\Component\Form\FormBuilderInterface;
10 10
 use Symfony\Component\OptionsResolver\OptionsResolver;
11 11
 
12
-class AccessRight extends AbstractType
13
-{
14
-	public function buildForm(FormBuilderInterface $builder, array $options)
15
-	{
12
+class AccessRight extends AbstractType {
13
+	public function buildForm(FormBuilderInterface $builder, array $options) {
16 14
 		$builder
17 15
 			->add('name', TextType::class, [
18 16
 				'label' => 'Name of the list',
@@ -28,8 +26,7 @@  discard block
 block discarded – undo
28 26
 	]);
29 27
     }
30 28
 	
31
-	public function configureOptions(OptionsResolver $resolver)
32
-	{
29
+	public function configureOptions(OptionsResolver $resolver) {
33 30
 		$resolver->setDefaults([
34 31
 			'data_class' => \Ribs\RibsAdminBundle\Entity\AccessRight::class,
35 32
 		]);
Please login to merge, or discard this patch.