@@ -5,8 +5,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use Symfony\Component\HttpFoundation\Response; |
| 7 | 7 | use Symfony\Component\Routing\Annotation\Route; |
| 8 | 8 | |
| 9 | -class AccountsController extends Controller |
|
| 10 | -{ |
|
| 9 | +class AccountsController extends Controller { |
|
| 11 | 10 | /** |
| 12 | 11 | * @Route("/accounts", name="ribsadmin_accounts") |
| 13 | 12 | * @return Response |
@@ -8,8 +8,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |