for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Alpha\TwigBundle\Entity;
class Template
{
/**
* @var int
*/
protected $id;
* @var string
protected $name;
protected $source;
* @var \DateTimeImmutable
protected $lastModified;
public function getId(): int
return $this->id;
}
public function setName(string $name): self
$this->name = $name;
return $this;
public function getName(): ?string
return $this->name;
public function setSource(string $source): self
$this->source = $source;
public function getSource(): ?string
return $this->source;
public function setLastModified(\DateTimeImmutable $lastModified): self
$this->lastModified = $lastModified;
public function getLastModified(): ?\DateTimeImmutable
return $this->lastModified;
public function setLastModifiedToCurrentMoment(): void
$this->lastModified = new \DateTimeImmutable();
public function __toString(): string
return $this->getName() ?: '';