DX: fix phstan & cs

This commit is contained in:
2023-03-05 17:43:44 +01:00
parent 4dbb195b45
commit 8695099819
25 changed files with 119 additions and 349 deletions

View File

@@ -43,36 +43,20 @@ class Country
private ?int $id = null;
/**
* @var string
* @var array<string, string>
*
* @ORM\Column(type="json")
* @groups({"read", "docgen:read"})
* @Context({"is-translatable": true}, groups={"docgen:read"})
*/
private $name;
private array $name = [];
/**
* @return string
*/
public function __toString()
{
return $this->getName();
}
/**
* @return the string
*/
public function getCountryCode()
public function getCountryCode(): string
{
return $this->countryCode;
}
/**
* Get id.
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -81,29 +65,22 @@ class Country
* Get name.
*
*/
public function getName()
public function getName(): array
{
return $this->name;
}
/**
* @param string $countryCode
*/
public function setCountryCode($countryCode)
public function setCountryCode(?string $countryCode): self
{
$this->countryCode = $countryCode;
$this->countryCode = (string) $countryCode;
return $this;
}
/**
* Set name.
*
* @param string $name
*
* @return Country
* @param array<string, string> $name
*/
public function setName($name)
public function setName(array $name): self
{
$this->name = $name;