Skip to content

Commit

Permalink
Repaired mistakes, typos, added datetime, testing signed commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sukovec committed Feb 11, 2018
1 parent 153435c commit 82c9bd1
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 46 deletions.
22 changes: 5 additions & 17 deletions src/Entity/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,26 @@ class Event
*/
protected $eventType;


/**
* ItemType constructor
*
*/
public function __construct() {

}

public function getId(): UuidInterface {
return $this->id;
}

/**
* @return string
*/
public function getTitle(): string {
return $this->title;
}

/**
* @param string $title
*/
public function setTitle(string $title): void {
$this->title = $title;
}

/**
* @return EventType
*/
public function getEventType(): EventType {
return $this->eventType;
}

/**
* @param EventType $eventType
*/
public function setEventType(EventType $eventType): void {
$this->eventType = $eventType;
}
Expand Down
26 changes: 8 additions & 18 deletions src/Entity/EventType.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
Expand All @@ -25,41 +25,31 @@ class EventType

/**
* @var string|null
* @ORM\Column(type="string", nullable=true)
* @ORM\Column(type="text", nullable=true)
*/
protected $comment;

/**
* @param string $name
* */
public function __construct(string $name) {
public function __construct(string $name, ?string $comment = null) {
$this->name = $name;
$this->comment = $comment;
}

public function getId(): int {
return $this->id;
}

/**
* @return string
*/
public function getName(): string {
return $this->name;
}

/**
* @param string $name
*/
public function setName(string $name): void {
$this->name = $name;
}

/**
* @return null|string
*/
public function getComment(): ?string {
return $this->comment;
}

/**
* @param null|string $comment
*/
public function setComment(?string $comment): void {
$this->comment = $comment;
}
Expand Down
56 changes: 45 additions & 11 deletions src/Entity/SubEvent.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
Expand Down Expand Up @@ -35,26 +35,60 @@ class SubEvent
*/
protected $description;



/**
* ItemType constructor
/**
* @var \DateTime
*
* @ORM\Column(type="datetimetz")
*/
public function __construct() {
}
protected $startDate;

/**
* @return string
* @var \DateTime
*
* @ORM\Column(type="datetimetz")
*/
protected $endDate;

public function __construct(string $title, string $description, \DateTime $startDate, \DateTime $endDate) {
$this->title = $title;
$this->description = $description;
$this->startDate = $startDate;
$this->endDate = $endDate;
}

public function getId(): UuidInterface {
return $this->id;
}

public function getTitle(): string {
return $this->title;
}

/**
* @param string $title
*/
public function setTitle(string $title): void {
$this->title = $title;
}

public function getDescription(): string {
return $this->description;
}

public function setDescription(string $description): void {
$this->description = $description;
}

public function getStartDate(): \DateTime {
return $this->startDate;
}

public function setStartDate(\DateTime $startDate): void {
$this->startDate = $startDate;
}

public function getEndDate(): \DateTime {
return $this->endDate;
}

public function setEndDate(\DateTime $endDate): void {
$this->endDate = $endDate;
}
}

0 comments on commit 82c9bd1

Please sign in to comment.