| @@ 74-89 (lines=16) @@ | ||
| 71 | */ |
|
| 72 | private $links; |
|
| 73 | ||
| 74 | public function __construct( |
|
| 75 | string $name, |
|
| 76 | User $creator, |
|
| 77 | \DateTime $date, |
|
| 78 | string $description, |
|
| 79 | HashGenerator $hashGenerator = null |
|
| 80 | ) |
|
| 81 | { |
|
| 82 | $this->name = $name; |
|
| 83 | $this->creator = $creator; |
|
| 84 | $this->date = $date; |
|
| 85 | $this->description = $description; |
|
| 86 | $this->id = $hashGenerator ? $hashGenerator::generate() : HashGenerator::generate(); |
|
| 87 | $this->images = new ArrayCollection(); |
|
| 88 | $this->links = new ArrayCollection(); |
|
| 89 | } |
|
| 90 | ||
| 91 | public function getDate(): string |
|
| 92 | { |
|
| @@ 63-78 (lines=16) @@ | ||
| 60 | */ |
|
| 61 | protected $creator; |
|
| 62 | ||
| 63 | public function __construct( |
|
| 64 | string $name, |
|
| 65 | User $creator, |
|
| 66 | string $description = null, |
|
| 67 | HashGenerator $hashGenerator = null |
|
| 68 | ) |
|
| 69 | { |
|
| 70 | /** @var HashGenerator $hashGenerator */ |
|
| 71 | $hashGenerator = $hashGenerator ?: new HashGenerator(); |
|
| 72 | $this->id = $hashGenerator->generate(); |
|
| 73 | $this->registrationDate = new \DateTime(); |
|
| 74 | $this->name = $name; |
|
| 75 | $this->description = $description; |
|
| 76 | $this->members = new ArrayCollection(); |
|
| 77 | $this->creator = $creator; |
|
| 78 | } |
|
| 79 | ||
| 80 | public function getId(): string |
|
| 81 | { |
|