before recipes:update

This commit is contained in:
2022-05-11 14:48:04 +02:00
parent 1b4ca82754
commit c84ec14cb5
46 changed files with 1363 additions and 1235 deletions

View File

@@ -10,27 +10,27 @@ use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProjectsRepository::class)]
#[ApiResource]
class Projects
class Projects implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id;
private ?int $id = null;
#[ORM\Column(type: 'string', length: 255)]
private ?string $name;
private ?string $name = null;
#[ORM\Column(type: 'string', length: 255)]
private ?string $description;
private ?string $description = null;
#[ORM\Column(type: 'string', length: 255)]
private ?string $url;
private ?string $url = null;
#[ORM\Column(type: 'datetime_immutable')]
private ?\DateTimeImmutable $createdAt;
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $teaserImage;
private ?string $teaserImage = null;
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'projects')]
private $developer;
@@ -43,9 +43,9 @@ class Projects
/**
* @return string|null
*/
public function __toString()
public function __toString(): string
{
return $this->name;
return (string) $this->name;
}
public function getId(): ?int