Skip to content

Commit

Permalink
ODZIdent muže být null, uváděn je pouze u typu "O", tj. u odpovědních…
Browse files Browse the repository at this point in the history
… PDZ + oprava parsování, kdy pole PDZRecord bylo jinak vždy prázdné (#19)

Co-authored-by: horak <[email protected]>
  • Loading branch information
dhqcz and horak authored Sep 7, 2023
1 parent ff4eff3 commit cd60b43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/DTO/PDZRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class PDZRecord
#[Serializer\Type('string')]
#[Serializer\SerializedName('p:ODZIdent')]
#[Serializer\XmlElement(cdata: false)]
#[Assert\NotBlank(allowNull: false)]
protected string $ident;
#[Assert\NotBlank(allowNull: true)]
protected ?string $ident;

public function getType(): string
{
Expand Down Expand Up @@ -103,12 +103,12 @@ public function setCount(?int $count): PDZRecord
return $this;
}

public function getIdent(): string
public function getIdent(): ?string
{
return $this->ident;
}

public function setIdent(string $ident): PDZRecord
public function setIdent(?string $ident): PDZRecord
{
$this->ident = $ident;
return $this;
Expand Down
5 changes: 3 additions & 2 deletions src/DTO/Response/PDZInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class PDZInfo extends IResponse
* @var PDZRecord[]
*/
#[Serializer\Type('array<TomasKulhanek\CzechDataBox\DTO\PDZRecord>')]
#[Serializer\XmlList(entry: 'dbPDZRecord', inline: false)]
#[Serializer\SerializedName('p:dbPDZRecords')]
#[Serializer\XmlList(entry: 'dbPDZRecord', inline: false, namespace: 'http://isds.czechpoint.cz/v20')]
#[Serializer\SerializedName('dbPDZRecords')]
#[Serializer\XmlElement(cdata: false, namespace: 'http://isds.czechpoint.cz/v20')]
#[Assert\All([
new Assert\Type(type: PDZRecord::class)
])]
Expand Down

0 comments on commit cd60b43

Please sign in to comment.