Minor - flint fixes

pull/3016/head
Julio Montoya 6 years ago
parent ecc25c5397
commit 82056cfb63
  1. 1
      main/document/document.php
  2. 1
      main/inc/lib/course.lib.php
  3. 6
      plugin/advanced_subscription/src/HookAdvancedSubscription.php
  4. 1
      src/CoreBundle/Entity/Listener/CourseListener.php
  5. 5
      src/CoreBundle/Repository/ResourceRepository.php

@ -28,7 +28,6 @@ use ChamiloSession as Session;
* 2) Define the directory to display
* 3) Read files and directories from the directory defined in part 2
* 4) Display all of that on an HTML page
*
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -24,7 +24,6 @@ use ChamiloSession as Session;
* but not available in standard Chamilo).
*
* There are probably some places left with the wrong code.
*
*/
class CourseManager
{

@ -15,17 +15,13 @@ use Chamilo\CoreBundle\Hook\Interfaces\HookWSRegistrationObserverInterface;
*
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
*/
require_once __DIR__.'/../config.php';
/**
* Class HookAdvancedSubscription extends the HookObserver to implements
* specific behaviour when the AdvancedSubscription plugin is enabled.
*/
class HookAdvancedSubscription extends HookObserver implements
HookAdminBlockObserverInterface,
HookWSRegistrationObserverInterface,
HookNotificationContentObserverInterface
class HookAdvancedSubscription extends HookObserver implements HookAdminBlockObserverInterface, HookWSRegistrationObserverInterface, HookNotificationContentObserverInterface
{
public static $plugin;

@ -14,6 +14,7 @@ use Doctrine\ORM\Event\LifecycleEventArgs;
/**
* Class CourseListener.
* Course entity listener, when a course is created/edited and when the tool chain is loaded.
*
* @todo check hosting course limits
*/
class CourseListener

@ -113,8 +113,7 @@ class ResourceRepository extends EntityRepository
AbstractResource $resource,
User $creator,
AbstractResource $parent = null
): ResourceNode
{
): ResourceNode {
$em = $this->getEntityManager();
$resourceNode = new ResourceNode();
@ -442,6 +441,6 @@ class ResourceRepository extends EntityRepository
*/
public function create()
{
return new $this->className;
return new $this->className();
}
}

Loading…
Cancel
Save