for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by PhpStorm.
* User: siim
* Date: 21.01.19
* Time: 8:42
*/
namespace Sf4\Api\Entity\Traits;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\UuidInterface;
use Sf4\Api\Utils\Traits\CreateNewTokenTrait;
trait EntityIdTrait
{
use CreateNewTokenTrait;
* The unique auto incremented primary key.
*
* @var int|null
* @ORM\Id
* @ORM\Column(type="integer", options={"unsigned": true})
* @ORM\GeneratedValue
private $id;
* The internal primary identity key.
* @var UuidInterface
* @ORM\Column(type="uuid", unique=true)
private $uuid;
public function getId(): ?int
return $this->id;
}
public function getUuid(): UuidInterface
return $this->uuid;
public function createUuid(): void
$this->uuid = $this->createNewToken();
$this->createNewToken()
string
Ramsey\Uuid\UuidInterface
$uuid
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..