Fix correct type hints

pull/3844/head
Julio Montoya 4 years ago
parent a1ffdc9452
commit 31e8a6b4f5
  1. 8
      src/CoreBundle/Entity/Asset.php
  2. 10
      src/CoreBundle/Entity/ResourceFile.php
  3. 1
      src/CoreBundle/Framework/Container.php

@ -5,6 +5,7 @@
namespace Chamilo\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
@ -115,6 +116,13 @@ class Asset
*/
protected ?string $description;
/**
* @var \DateTime|\DateTimeImmutable
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime")
*/
protected $updatedAt;
public function __construct()
{
$this->metadata = [];

@ -11,6 +11,7 @@ use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
use Chamilo\CoreBundle\Controller\CreateResourceFileAction;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
@ -163,11 +164,18 @@ class ResourceFile
*/
protected ?string $description;
/**
* @var \DateTime|\DateTimeImmutable
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime")
*/
protected $updatedAt;
public function __construct()
{
$this->size = 0;
$this->metadata = [];
$this->dimensions = [];
$this->size = 0;
}
public function __toString(): string

@ -57,7 +57,6 @@ use Chamilo\CourseBundle\Repository\CWikiRepository;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Form\FormFactory;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Routing\Router;

Loading…
Cancel
Save