diff --git a/src/CoreBundle/DataFixtures/SequenceFixtures.php b/src/CoreBundle/DataFixtures/SequenceFixtures.php index 018f15886f..fcfcb769ef 100644 --- a/src/CoreBundle/DataFixtures/SequenceFixtures.php +++ b/src/CoreBundle/DataFixtures/SequenceFixtures.php @@ -161,7 +161,7 @@ class SequenceFixtures extends Fixture $sequenceRuleMethod = (new SequenceRuleMethod()) ->setRule($sequenceRule) ->setMethod($sequenceMethod) - ->setMethodOrder((string) ($key + 1)) + ->setMethodOrder($key + 1) ; $manager->persist($sequenceRuleMethod); } diff --git a/src/CoreBundle/Entity/Block.php b/src/CoreBundle/Entity/Block.php index 8479e0a14e..a33fe89e54 100644 --- a/src/CoreBundle/Entity/Block.php +++ b/src/CoreBundle/Entity/Block.php @@ -38,9 +38,9 @@ class Block #[ORM\Column(name: 'active', type: 'boolean', nullable: false)] protected bool $active; - #[ORM\OneToOne(inversedBy: 'block', targetEntity: User::class)] + #[ORM\OneToOne(targetEntity: User::class)] #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] - protected User $user; + private ?User $user = null; /** * Get id. @@ -109,16 +109,4 @@ class Block return $this; } - - public function getUser(): User - { - return $this->user; - } - - public function setUser(User $user): self - { - $this->user = $user; - - return $this; - } } diff --git a/src/CoreBundle/Entity/PortfolioRelTag.php b/src/CoreBundle/Entity/PortfolioRelTag.php index c83adee304..ccc17f2f44 100644 --- a/src/CoreBundle/Entity/PortfolioRelTag.php +++ b/src/CoreBundle/Entity/PortfolioRelTag.php @@ -17,17 +17,14 @@ class PortfolioRelTag #[ORM\Column(type: 'integer')] private int $id; - #[ORM\Column(type: 'integer')] #[ORM\ManyToOne(targetEntity: Tag::class)] #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id', nullable: false)] private Tag $tag; - #[ORM\Column(type: 'integer')] #[ORM\ManyToOne(targetEntity: Course::class)] #[ORM\JoinColumn(name: 'c_id', referencedColumnName: 'id', nullable: false)] private Course $course; - #[ORM\Column(type: 'integer', nullable: true)] #[ORM\ManyToOne(targetEntity: Session::class)] #[ORM\JoinColumn(name: 'session_id', referencedColumnName: 'id', nullable: true)] private ?Session $session; diff --git a/src/CoreBundle/Entity/SequenceRuleMethod.php b/src/CoreBundle/Entity/SequenceRuleMethod.php index 150b22b3e3..1832f39c11 100644 --- a/src/CoreBundle/Entity/SequenceRuleMethod.php +++ b/src/CoreBundle/Entity/SequenceRuleMethod.php @@ -18,7 +18,7 @@ class SequenceRuleMethod protected ?int $id = null; #[ORM\Column(name: 'method_order', type: 'integer')] - protected string $methodOrder; + protected int $methodOrder; #[ORM\ManyToOne(targetEntity: SequenceRule::class)] #[ORM\JoinColumn(name: 'sequence_rule_id', referencedColumnName: 'id')] @@ -28,25 +28,17 @@ class SequenceRuleMethod #[ORM\JoinColumn(name: 'sequence_method_id', referencedColumnName: 'id')] protected ?SequenceMethod $method = null; - /** - * Get id. - * - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } - /** - * @return string - */ - public function getMethodOrder() + public function getMethodOrder(): int { return $this->methodOrder; } - public function setMethodOrder(string $methodOrder): self + public function setMethodOrder(int $methodOrder): static { $this->methodOrder = $methodOrder; @@ -58,7 +50,7 @@ class SequenceRuleMethod return $this->rule; } - public function setRule(SequenceRule $rule): self + public function setRule(SequenceRule $rule): static { $this->rule = $rule; @@ -70,7 +62,7 @@ class SequenceRuleMethod return $this->method; } - public function setMethod(SequenceMethod $method): self + public function setMethod(SequenceMethod $method): static { $this->method = $method; diff --git a/src/CoreBundle/Entity/TicketProject.php b/src/CoreBundle/Entity/TicketProject.php index 10ee9d2fb0..abd041d6a0 100644 --- a/src/CoreBundle/Entity/TicketProject.php +++ b/src/CoreBundle/Entity/TicketProject.php @@ -31,7 +31,7 @@ class TicketProject protected ?string $email = null; #[ORM\Column(name: 'other_area', type: 'integer', nullable: true)] - protected ?string $otherArea = null; + protected ?int $otherArea = null; #[ORM\Column(name: 'sys_insert_user_id', type: 'integer')] protected int $insertUserId; @@ -39,10 +39,10 @@ class TicketProject #[ORM\Column(name: 'sys_insert_datetime', type: 'datetime')] protected DateTime $insertDateTime; - #[ORM\Column(name: 'sys_lastedit_user_id', type: 'integer', nullable: true, unique: false)] + #[ORM\Column(name: 'sys_lastedit_user_id', type: 'integer', unique: false, nullable: true)] protected ?int $lastEditUserId = null; - #[ORM\Column(name: 'sys_lastedit_datetime', type: 'datetime', nullable: true, unique: false)] + #[ORM\Column(name: 'sys_lastedit_datetime', type: 'datetime', unique: false, nullable: true)] protected ?DateTime $lastEditDateTime = null; public function __construct() @@ -50,18 +50,12 @@ class TicketProject $this->insertDateTime = new DateTime(); } - /** - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } - /** - * @return string - */ - public function getTitle() + public function getTitle(): string { return $this->title; } @@ -73,10 +67,7 @@ class TicketProject return $this; } - /** - * @return string - */ - public function getDescription() + public function getDescription(): ?string { return $this->description; } @@ -88,10 +79,7 @@ class TicketProject return $this; } - /** - * @return string - */ - public function getEmail() + public function getEmail(): ?string { return $this->email; } @@ -103,25 +91,19 @@ class TicketProject return $this; } - /** - * @return string - */ - public function getOtherArea() + public function getOtherArea(): int { - return $this->otherArea; + return (int) $this->otherArea; } - public function setOtherArea(string $otherArea): self + public function setOtherArea(?int $otherArea): static { $this->otherArea = $otherArea; return $this; } - /** - * @return int - */ - public function getInsertUserId() + public function getInsertUserId(): int { return $this->insertUserId; } @@ -133,10 +115,7 @@ class TicketProject return $this; } - /** - * @return DateTime - */ - public function getInsertDateTime() + public function getInsertDateTime(): DateTime { return $this->insertDateTime; } @@ -148,10 +127,7 @@ class TicketProject return $this; } - /** - * @return int - */ - public function getLastEditUserId() + public function getLastEditUserId(): ?int { return $this->lastEditUserId; } @@ -163,10 +139,7 @@ class TicketProject return $this; } - /** - * @return DateTime - */ - public function getLastEditDateTime() + public function getLastEditDateTime(): ?DateTime { return $this->lastEditDateTime; }