diff --git a/src/CoreBundle/EventListener/CourseListener.php b/src/CoreBundle/EventListener/CourseListener.php index e818e91e0f..f3978c1dbc 100644 --- a/src/CoreBundle/EventListener/CourseListener.php +++ b/src/CoreBundle/EventListener/CourseListener.php @@ -328,7 +328,7 @@ class CourseListener //$request->setLocale($request->getPreferredLanguage()); } - private function generateCourseUrl(?Course $course, int $sessionId, int $groupId, string $origin): string + private function generateCourseUrl(?Course $course, int $sessionId, int $groupId, ?string $origin): string { if (null !== $course) { $cidReqURL = '&cid='.$course->getId(); diff --git a/src/CoreBundle/Form/Type/ResourceRightType.php b/src/CoreBundle/Form/Type/ResourceRightType.php index 08c156090b..25840ef206 100644 --- a/src/CoreBundle/Form/Type/ResourceRightType.php +++ b/src/CoreBundle/Form/Type/ResourceRightType.php @@ -6,6 +6,7 @@ declare(strict_types=1); namespace Chamilo\CoreBundle\Form\Type; +use Chamilo\CoreBundle\Entity\ResourceRight; use Chamilo\CoreBundle\Entity\ToolResourceRight; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/CoreBundle/Resources/config/tools.yml b/src/CoreBundle/Resources/config/tools.yml index 95d8f430d8..d7277ed110 100644 --- a/src/CoreBundle/Resources/config/tools.yml +++ b/src/CoreBundle/Resources/config/tools.yml @@ -15,7 +15,7 @@ services: - 'global' - '' - '' - - '' + - ~ - urls: repository: Chamilo\CoreBundle\Repository\Node\AccessUrlRepository @@ -32,7 +32,7 @@ services: - 'asset' - '' - '' - - '' + - ~ - illustrations: repository: Chamilo\CoreBundle\Repository\Node\IllustrationRepository @@ -135,7 +135,7 @@ services: - 'course_tool' - 'admin' - '/resources/course_tool/links' - - '' + - ~ - links: repository: Chamilo\CourseBundle\Repository\CToolRepository @@ -362,7 +362,7 @@ services: - 'shortcut' - '' - '' - - '' + - ~ - shortcuts: repository: Chamilo\CourseBundle\Repository\CShortcutRepository diff --git a/src/CoreBundle/Tool/AbstractTool.php b/src/CoreBundle/Tool/AbstractTool.php index 5e821e7e7a..088894cee9 100644 --- a/src/CoreBundle/Tool/AbstractTool.php +++ b/src/CoreBundle/Tool/AbstractTool.php @@ -28,8 +28,13 @@ abstract class AbstractTool implements ToolInterface */ protected string $scope; - public function __construct(string $name, string $category, string $link, SchemaInterface $settings = null, array $resourceTypes = []) - { + public function __construct( + string $name, + string $category, + string $link, + ?SchemaInterface $settings = null, + ?array $resourceTypes = [] + ) { $this->name = $name; $this->category = $category; $this->link = $link;