for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Backend\Modules\Profiles\Domain\Profile;
use Symfony\Component\Validator\Constraints as Assert;
class ProfileDataTransferObject
{
/**
* @var Profile
*/
protected $profileEntity;
* @var int|null
public $id;
* @var string
*
* @Assert\NotBlank(message="err.FieldIsRequired")
public $email;
public $password;
* @var Status
public $status;
public $displayName;
public $url;
public function __construct(Profile $profile = null)
if (!($profile instanceof Profile)) {
return;
}
$this->profileEntity = $profile;
$this->id = $profile->getId();
$this->email = $profile->getEmail();
$this->password = $profile->getPassword();
$this->status = $profile->getStatus();
$this->displayName = $profile->getDisplayName();
$this->url = $profile->getUrl();
public function getProfileEntity(): Profile
return $this->profileEntity;