Minor - format code

pull/2528/head
jmontoyaa 8 years ago
parent 5bebc19362
commit 0a9840ce67
  1. 1
      .php_cs.dist
  2. 2
      config/packages/liip_theme.yaml
  3. 6
      config/packages/sonata_block.yaml
  4. 6
      config/packages/sonata_timeline.yaml
  5. 2
      main/exercise/fill_blanks.class.php
  6. 3
      main/inc/lib/api.lib.php
  7. 4
      main/inc/lib/display.lib.php
  8. 2
      src/CoreBundle/EventListener/LegacyListener.php
  9. 3
      src/CoreBundle/EventListener/LegacyLoginListener.php
  10. 4
      src/ThemeBundle/Controller/NavbarController.php
  11. 1
      src/UserBundle/Entity/User.php

@ -82,6 +82,7 @@ $finder = PhpCsFixer\Finder::create()
->exclude('web') ->exclude('web')
->notPath('main/admin/db.php') ->notPath('main/admin/db.php')
->notPath('public/check.php')
->notPath('main/admin/ldap_synchro.php') ->notPath('main/admin/ldap_synchro.php')
->notPath('main/chat/emoji_strategy.php') ->notPath('main/chat/emoji_strategy.php')
->in(__DIR__) ->in(__DIR__)

@ -3,4 +3,4 @@ liip_theme:
active_theme: 'default' active_theme: 'default'
path_patterns: path_patterns:
bundle_resource: bundle_resource:
- '%kernel.root_dir%/../templates/themes/%%current_theme%%/%%bundle_name%%/%%template%%' - '%kernel.root_dir%/../templates/themes/%%current_theme%%/%%bundle_name%%/%%template%%'

@ -9,9 +9,9 @@ sonata_block:
blocks: blocks:
# Chamilo blocks # Chamilo blocks
# chamilo_core.block.breadcrumb: ~ chamilo_core.block.breadcrumb: ~
# chamilo_core.block.course: ~ chamilo_core.block.course: ~
# chamilo_core.block.skill: ~ chamilo_core.block.skill: ~
sonata.admin.block.stats: sonata.admin.block.stats:
contexts: [admin] contexts: [admin]
sonata.admin.block.admin_list: sonata.admin.block.admin_list:

@ -1,7 +1,7 @@
sonata_timeline: sonata_timeline:
manager_type: orm manager_type: orm
class: class:
timeline: '%spy_timeline.class.timeline%' timeline: '%spy_timeline.class.timeline%'
action: '%spy_timeline.class.action%' action: '%spy_timeline.class.action%'
component: '%spy_timeline.class.component%' component: '%spy_timeline.class.component%'
action_component: '%spy_timeline.class.action_component%' action_component: '%spy_timeline.class.action_component%'

@ -845,7 +845,7 @@ class FillBlanks extends Question
* -2 : didn't answer * -2 : didn't answer
* -1 : student answer is wrong * -1 : student answer is wrong
* 0 : student answer is correct * 0 : student answer is correct
* >0 : for fill the blank question with choice menu, is the index of the student answer (right answer index is 0) * >0 : choice menu, is the index of the student answer (right answer index is 0)
* *
* @param int $testId * @param int $testId
* @param int $questionId * @param int $questionId

@ -3683,6 +3683,7 @@ function api_is_anonymous($user_id = null, $db_check = false)
return true; return true;
} }
} }
return !Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED_FULLY'); return !Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED_FULLY');
} }
@ -3711,7 +3712,7 @@ function api_not_allowed(
// src/ThemeBundle/Resources/views/Exception/error404.html.twig // src/ThemeBundle/Resources/views/Exception/error404.html.twig
$exception = new Exception($message); $exception = new Exception($message);
$request = Container::getRequest(); $request = Container::getRequest();
$exception = \Symfony\Component\Debug\Exception\FlattenException::create($exception, $responseCode); $exception = \Symfony\Component\Debug\Exception\FlattenException::create($exception, $responseCode);
$controller = new \Chamilo\ThemeBundle\Controller\ExceptionController(Container::getTwig(), $debug); $controller = new \Chamilo\ThemeBundle\Controller\ExceptionController(Container::getTwig(), $debug);
$response = $controller->showAction($request, $exception); $response = $controller->showAction($request, $exception);
$response->send(); $response->send();

@ -2,10 +2,8 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\ExtraField; use Chamilo\CoreBundle\Entity\ExtraField;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\CoreBundle\Framework\Container; use Chamilo\CoreBundle\Framework\Container;
use Chamilo\UserBundle\Entity\User; use ChamiloSession as Session;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
/** /**

@ -124,7 +124,7 @@ class LegacyListener
$languageList[languageToCountryIsoCode($isoCode)] = $language; $languageList[languageToCountryIsoCode($isoCode)] = $language;
} }
$twig->addGlobal('current_locale_iso',languageToCountryIsoCode($request->getLocale())); $twig->addGlobal('current_locale_iso', languageToCountryIsoCode($request->getLocale()));
$twig->addGlobal('available_locales', $languages); $twig->addGlobal('available_locales', $languages);
$twig->addGlobal('show_toolbar', \Template::isToolBarDisplayedForUser() ? 1 : 0); $twig->addGlobal('show_toolbar', \Template::isToolBarDisplayedForUser() ? 1 : 0);

@ -16,7 +16,8 @@ use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
/** /**
* Class LegacyLoginListener. * Class LegacyLoginListener.
* File not needed the real listener is LegacyListener * File not needed the real listener is LegacyListener.
*
* @deprecated * @deprecated
* *
* @package Chamilo\CoreBundle\EventListener * @package Chamilo\CoreBundle\EventListener

@ -9,7 +9,6 @@ use Chamilo\ThemeBundle\Event\ShowUserEvent;
use Chamilo\ThemeBundle\Event\TaskListEvent; use Chamilo\ThemeBundle\Event\TaskListEvent;
use Chamilo\ThemeBundle\Event\ThemeEvents; use Chamilo\ThemeBundle\Event\ThemeEvents;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
/** /**
@ -21,6 +20,7 @@ class NavbarController extends Controller
{ {
/** /**
* @deprecated * @deprecated
*
* @param int $max * @param int $max
* *
* @return Response * @return Response
@ -44,6 +44,7 @@ class NavbarController extends Controller
/** /**
* @deprecated * @deprecated
*
* @param int $max * @param int $max
* *
* @return Response * @return Response
@ -67,6 +68,7 @@ class NavbarController extends Controller
/** /**
* @deprecated * @deprecated
*
* @param int $max * @param int $max
* *
* @return Response * @return Response

@ -1867,5 +1867,4 @@ class User extends BaseUser implements ThemeUser, EquatableInterface //implement
return true; return true;
} }
} }

Loading…
Cancel
Save