mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Entity\Embeddable;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Embeddable()
|
||||
* @ORM\Embeddable
|
||||
*/
|
||||
class CommentEmbeddable
|
||||
{
|
||||
@@ -17,18 +24,19 @@ class CommentEmbeddable
|
||||
private $comment;
|
||||
|
||||
/**
|
||||
* Embeddable does not support associations
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $userId;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @var DateTime
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* Embeddable does not support associations.
|
||||
*
|
||||
* @var int
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $userId;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -37,6 +45,22 @@ class CommentEmbeddable
|
||||
return $this->comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DateTime
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return interger $userId
|
||||
*/
|
||||
public function getUserId()
|
||||
{
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
public function isEmpty()
|
||||
{
|
||||
return empty($this->getComment());
|
||||
@@ -51,34 +75,18 @@ class CommentEmbeddable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return interger $userId
|
||||
* @param DateTime $date
|
||||
*/
|
||||
public function getUserId()
|
||||
public function setDate(?DateTime $date)
|
||||
{
|
||||
return $this->userId;
|
||||
$this->date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $userId
|
||||
* @param int $userId
|
||||
*/
|
||||
public function setUserId($userId)
|
||||
{
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $date
|
||||
*/
|
||||
public function setDate(?\DateTime $date)
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user