Skip to content

Commit

Permalink
fix(core): Upload asset $status accessed before initialization (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei authored Dec 5, 2022
1 parent 44851dd commit f861604
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions EMS/core-bundle/src/Entity/UploadedAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UploadedAsset implements EntityInterface
/**
* @ORM\Column(name="status", type="string", length=64, nullable=true)
*/
private string $status;
private ?string $status = null;

/**
* @ORM\Column(name="sha1", type="string", length=128)
Expand Down Expand Up @@ -96,7 +96,7 @@ public function __construct()
}

/**
* @return array{sha1:string, type:string, available:bool, name:string, size:int, status:string, uploaded:int, user:string}
* @return array{sha1:string, type:string, available:bool, name:string, size:int, status: ?string, uploaded:int, user:string}
*/
public function getResponse(): array
{
Expand All @@ -122,26 +122,14 @@ public function getId()
return $this->id;
}

/**
* Set status.
*
* @param string $status
*
* @return UploadedAsset
*/
public function setStatus($status)
public function setStatus(?string $status): self
{
$this->status = $status;

return $this;
}

/**
* Get status.
*
* @return string
*/
public function getStatus()
public function getStatus(): ?string
{
return $this->status;
}
Expand Down

0 comments on commit f861604

Please sign in to comment.