Skip to content

Commit

Permalink
Merge pull request #414 from breakone/bugfix-id-type
Browse files Browse the repository at this point in the history
Bugfix id type
  • Loading branch information
dpfaffenbauer authored Jul 17, 2024
2 parents 0b6dfe1 + 8b5011e commit 3d561d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/DataDefinitionsBundle/Messenger/ImportRowMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@

class ImportRowMessage
{
private int $definitionId;
private int|string $definitionId;
private array $data;
private array $params;

public function __construct(int $definitionId, array $data, array $params)
public function __construct(int|string $definitionId, array $data, array $params)
{
$this->definitionId = $definitionId;
$this->data = $data;
$this->params = $params;
}

public function getDefinitionId(): int
public function getDefinitionId(): int|string
{
return $this->definitionId;
}
Expand Down
4 changes: 2 additions & 2 deletions src/DataDefinitionsBundle/Model/ExportDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ class ExportDefinition extends AbstractDataDefinition implements ExportDefinitio
*/
public $fetchUnpublished = false;

public static function getById(int $name)
public static function getById(int|string $name)
{
return static::getByName($name);
}

public static function getByName($id)
{
$definitionEntry = new ExportDefinition();
$definitionEntry->setId((int)$id);
$definitionEntry->setId($id);
/**
* @var \Instride\Bundle\DataDefinitionsBundle\Model\ExportDefinition\Dao|\Instride\Bundle\DataDefinitionsBundle\Model\ImportDefinition\Dao
*/
Expand Down

0 comments on commit 3d561d3

Please sign in to comment.