[#NUMERO_TICKET] TITRE TICKET #2

Merged
malio merged 302 commits from develop into main 2026-03-18 13:16:19 +00:00
2 changed files with 79 additions and 0 deletions
Showing only changes of commit 6ae014fe8a - Show all commits

View File

@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\GiteaConfigurationRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GiteaConfigurationRepository::class)]
class GiteaConfiguration
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $url = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $encryptedToken = null;
public function getId(): ?int
{
return $this->id;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(?string $url): static
{
$this->url = $url;
return $this;
}
public function getEncryptedToken(): ?string
{
return $this->encryptedToken;
}
public function setEncryptedToken(?string $encryptedToken): static
{
$this->encryptedToken = $encryptedToken;
return $this;
}
public function hasToken(): bool
{
return null !== $this->encryptedToken;
}
}

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\GiteaConfiguration;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
class GiteaConfigurationRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, GiteaConfiguration::class);
}
public function findSingleton(): ?GiteaConfiguration
{
return $this->findOneBy([]);
}
}