Minor - format code

pull/3124/head
Julio Montoya 5 years ago
parent cd3aff9fdb
commit 0721528534
  1. 22
      .github/workflows/php.yml
  2. 1
      .php_cs.dist
  3. 2
      config/packages/doctrine.yaml
  4. 2
      config/packages/framework.yaml
  5. 6
      config/packages/twig.yaml
  6. 6
      public/main/blog/download.php
  7. 1
      public/plugin/before_login/plugin.php
  8. 1
      public/plugin/buycourses/src/buy_course_plugin.class.php
  9. 1
      public/plugin/card_game/plugin.php
  10. 1
      public/plugin/customcertificate/config.php
  11. 1
      public/plugin/customcertificate/src/CustomCertificatePlugin.php
  12. 1
      public/plugin/customfooter/plugin.php
  13. 1
      public/plugin/dashboard/block_course/block_course.class.php
  14. 1
      public/plugin/dashboard/block_daily/block_daily.class.php
  15. 1
      public/plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php
  16. 1
      public/plugin/dashboard/block_global_info/block_global_info.class.php
  17. 1
      public/plugin/dashboard/block_session/block_session.class.php
  18. 1
      public/plugin/dashboard/block_student/block_student.class.php
  19. 1
      public/plugin/dashboard/block_student_graph/block_student_graph.class.php
  20. 1
      public/plugin/dashboard/block_teacher/block_teacher.class.php
  21. 1
      public/plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php
  22. 1
      public/plugin/ext_auth_chamilo_logout_button_behaviour/plugin.php
  23. 1
      public/plugin/hello_world/plugin.php
  24. 1
      public/plugin/notebookteacher/config.php
  25. 1
      public/plugin/notebookteacher/src/NotebookTeacherPlugin.php
  26. 1
      public/plugin/sepe/src/sepe_plugin.class.php
  27. 1
      public/plugin/show_regions/plugin.php
  28. 1
      public/plugin/test2pdf/config.php
  29. 1
      public/plugin/test2pdf/src/test2pdf_plugin.class.php
  30. 1
      public/plugin/vchamilo/plugin.php
  31. 1
      public/plugin/vchamilo/views/manage.testcnx.php
  32. 1
      src/CoreBundle/Controller/Admin/AdminController.php
  33. 7
      src/CoreBundle/Form/DataTransformer/ResourceToIdentifierTransformer.php
  34. 1
      src/CoreBundle/Repository/ExtraFieldRelTagRepository.php
  35. 1
      src/CoreBundle/Repository/ExtraFieldValuesRepository.php
  36. 1
      src/CoreBundle/Repository/SessionRepository.php
  37. 1
      src/CoreBundle/Repository/TrackECourseAccessRepository.php
  38. 31
      src/LtiBundle/Entity/ExternalTool.php

@ -25,20 +25,20 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v1
- name: Setup PHP Action
uses: shivammathur/setup-php@1.6.1
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, mysql, gd, soap, intl, zip, bcmath
- name: Setup PHP Action
uses: shivammathur/setup-php@1.6.1
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, mysql, gd, soap, intl, zip, bcmath
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Composer analyse
run: composer analyse
- name: Composer analyse
run: composer analyse
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

@ -16,6 +16,7 @@ $rules = [
'multiline_comment_opening_closing' => true,
'phpdoc_to_comment' => false,
'phpdoc_annotation_without_dot' => false,
'increment_style' => ['style' => 'post'],
'no_useless_else' => false,
'single_quote' => false,
'no_useless_return' => true,

@ -50,4 +50,4 @@ doctrine:
dql:
string_functions:
MONTH: DoctrineExtensions\Query\Mysql\Month
YEAR: DoctrineExtensions\Query\Mysql\Year
YEAR: DoctrineExtensions\Query\Mysql\Year

@ -14,4 +14,4 @@ framework:
name: chamilo2
fragments: ~
http_method_override: true
annotations: true
annotations: true

@ -9,8 +9,8 @@ twig:
- '@SonataFormatter/Form/formatter.html.twig'
- '@SonataCore/Form/datepicker.html.twig'
- '@SonataCore/Form/color.html.twig'
exception_controller: Chamilo\CoreBundle\Controller\ExceptionController::showAction
#
# exception_controller: Chamilo\CoreBundle\Controller\ExceptionController::showAction
globals:
show_toolbar: true
@ -37,4 +37,4 @@ twig:
plugin_content_bottom:
plugin_main_bottom:
flash_messages:
shuffle_answers:
shuffle_answers:

@ -5,8 +5,6 @@
* Html files are parsed to fix a few problems with URLs,
* but this code will hopefully be replaced soon by an Apache URL
* rewrite mechanism.
*
* @package chamilo.blogs
*/
session_cache_limiter('public');
@ -36,7 +34,7 @@ $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/b
//if the rewrite rule asks for a directory, we redirect to the course view
if (is_dir($full_file_name)) {
//remove last slash if present
while ($doc_url[$dul = strlen($doc_url) - 1] == '/') {
while ('/' == $doc_url[$dul = strlen($doc_url) - 1]) {
$doc_url = substr($doc_url, 0, $dul);
}
//create the path
@ -70,7 +68,7 @@ if (Database::num_rows($result) > 0) {
$row['filename']
);
if ($result === false) {
if (false === $result) {
api_not_allowed(true);
}
}

@ -4,7 +4,6 @@
* These settings will be used in the administration interface for plugins
* (Chamilo configuration settings->Plugins).
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -10,7 +10,6 @@ use Doctrine\ORM\Query\Expr\Join;
/**
* Plugin class for the BuyCourses plugin.
*
*
* @author Jose Angel Ruiz <jaruiz@nosolored.com>
* @author Imanol Losada <imanol.losada@beeznest.com>
* @author Alex Aragón <alex.aragon@beeznest.com>

@ -6,7 +6,6 @@
* These settings will be used in the administration interface for plugins
* (Chamilo configuration settings->Plugins).
*
*
* @author Damien Renou <renou.damien@gmail.com>
*/
/* Plugin config */

@ -5,7 +5,6 @@
/**
* Config the plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
*/
require_once __DIR__.'/../../main/inc/global.inc.php';

@ -5,7 +5,6 @@
/**
* Plugin class for the CustomCertificate plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
*/
class CustomCertificatePlugin extends Plugin

@ -3,7 +3,6 @@
* This plugin allows you to configure a footer note to plug some additional features. In a way, it works a bit like
* any block plugin to be added in a region.
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -3,7 +3,6 @@
* This file is part of course block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
*/
/**

@ -3,7 +3,6 @@
* This file is part of course block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Marco Sousa original code
* @author Julio Montoya class named was changed of name, and some minor changes
*/

@ -17,7 +17,6 @@ use CpChart\Image as pImage;
* it should be required inside dashboard controller for showing it
* into dashboard interface from platform
*
*
* @author Christian Fasanando
*/
class BlockEvaluationGraph extends Block

@ -7,7 +7,6 @@
* it should be required inside the dashboard controller for
* showing it into the dashboard interface.
*
*
* @author Yannick Warnier
*/

@ -3,7 +3,6 @@
* This file is part of session block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
*/

@ -3,7 +3,6 @@
* This file is part of student block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
*/

@ -6,7 +6,6 @@
* This file is part of student graph block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -6,7 +6,6 @@
* This file is part of teacher block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
*/

@ -8,7 +8,6 @@ use CpChart\Image as pImage;
* This file is part of teacher graph block plugin for dashboard,
* it should be required inside dashboard controller for showing it into dashboard interface from plattform.
*
*
* @author Christian Fasanando
*/

@ -3,7 +3,6 @@
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
/**

@ -4,7 +4,6 @@
* You can use it as a master for other platform plugins (course plugins are slightly different).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
/**

@ -4,7 +4,6 @@
/**
* Config the plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
*/
require_once __DIR__.'/../../main/inc/global.inc.php';

@ -5,7 +5,6 @@
/**
* Plugin class for the NotebookTeacher plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
* @author Julio Montoya
*/

@ -5,7 +5,6 @@
/**
* Plugin class for the SEPE plugin.
*
*
* @author Jose Angel Ruiz <jaruiz@nosolored.com>
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -3,7 +3,6 @@
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
/**

@ -4,7 +4,6 @@
/**
* Config the plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
*/
require_once __DIR__.'/../../main/inc/global.inc.php';

@ -2,7 +2,6 @@
/**
* Plugin class for the Test2Pdf plugin.
*
*
* @author Jose Angel Ruiz <desarrollo@nosolored.com>
*/
class Test2pdfPlugin extends Plugin

@ -5,7 +5,6 @@
* These settings will be used in the administration interface for plugins
* (Chamilo configuration settings->Plugins).
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
global $_configuration;

@ -5,7 +5,6 @@
/**
* Tests database connection.
*
*
* @author Moheissen Fabien (fabien.moheissen@gmail.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
*/

@ -14,7 +14,6 @@ use Symfony\Component\Routing\Annotation\Route;
/**
* Class Administrator.
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
class AdminController extends BaseController

@ -44,12 +44,7 @@ final class ResourceToIdentifierTransformer implements DataTransformerInterface
$resource = $this->repository->findOneBy([$this->identifier => $value]);
if (null === $resource) {
throw new TransformationFailedException(sprintf(
'Object "%s" with identifier "%s"="%s" does not exist.',
$this->repository->getClassName(),
$this->identifier,
$value
));
throw new TransformationFailedException(sprintf('Object "%s" with identifier "%s"="%s" does not exist.', $this->repository->getClassName(), $this->identifier, $value));
}
return $resource;

@ -13,7 +13,6 @@ use Doctrine\ORM\Query\Expr\Join;
/**
* ExtraFieldRelTagRepository.
*
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*/
class ExtraFieldRelTagRepository extends ServiceEntityRepository

@ -12,7 +12,6 @@ use Doctrine\ORM\Query\Expr\Join;
/**
* ExtraFieldValuesRepository class.
*
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*/
class ExtraFieldValuesRepository extends ServiceEntityRepository

@ -11,7 +11,6 @@ use Doctrine\Common\Persistence\ManagerRegistry;
/**
* SessionRepository.
*
*
* @author Julio Montoya <gugli100@gmail.com>
*/
class SessionRepository extends ServiceEntityRepository

@ -12,7 +12,6 @@ use Doctrine\Common\Persistence\ManagerRegistry;
/**
* TrackECourseAccessRepository.
*
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*/
class TrackECourseAccessRepository extends ServiceEntityRepository

@ -12,7 +12,6 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Class ExternalTool.
*
*
* @ORM\Table(name="lti_external_tool")
* @ORM\Entity()
*/
@ -481,6 +480,21 @@ class ExternalTool
return $this;
}
public function getChildren(): ArrayCollection
{
return $this->children;
}
/**
* @return ExternalTool
*/
public function setChildren(ArrayCollection $children): self
{
$this->children = $children;
return $this;
}
/**
* Map the key from custom param.
*
@ -506,19 +520,4 @@ class ExternalTool
return $newKey;
}
public function getChildren(): ArrayCollection
{
return $this->children;
}
/**
* @return ExternalTool
*/
public function setChildren(ArrayCollection $children): self
{
$this->children = $children;
return $this;
}
}

Loading…
Cancel
Save