Skip to content

Commit

Permalink
Merge tag v2.4.0 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Dec 6, 2024
1 parent 5856f37 commit 894c819
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 33 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-master": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
24 changes: 12 additions & 12 deletions src/Core/AbstractEntities/AbstractField.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function getName(): string
/**
* @return $this
*/
public function setName(?string $name)
public function setName(?string $name): AbstractField
{
$this->name = StringHandler::variablize($name ?? '');

Expand Down Expand Up @@ -411,9 +411,9 @@ public function getLabel(): string
}

/**
* @return self
* @return $this
*/
public function setLabel(?string $label)
public function setLabel(?string $label): AbstractField
{
$this->label = $label ?? '';

Expand All @@ -426,9 +426,9 @@ public function getPlaceholder(): ?string
}

/**
* @return AbstractField
* @return $this
*/
public function setPlaceholder(?string $placeholder)
public function setPlaceholder(?string $placeholder): AbstractField
{
$this->placeholder = $placeholder;

Expand All @@ -443,7 +443,7 @@ public function getDescription(): ?string
/**
* @return $this
*/
public function setDescription(?string $description)
public function setDescription(?string $description): AbstractField
{
$this->description = $description;

Expand All @@ -458,7 +458,7 @@ public function getDefaultValues(): ?string
/**
* @return $this
*/
public function setDefaultValues(?string $defaultValues)
public function setDefaultValues(?string $defaultValues): AbstractField
{
$this->defaultValues = $defaultValues;

Expand All @@ -482,7 +482,7 @@ public function getType(): int
/**
* @return $this
*/
public function setType(int $type)
public function setType(int $type): AbstractField
{
$this->type = $type;

Expand Down Expand Up @@ -527,9 +527,9 @@ public function getGroupName(): ?string
*
* @param string|null $groupName the group name
*
* @return static
* @return $this
*/
public function setGroupName(?string $groupName)
public function setGroupName(?string $groupName): AbstractField
{
if (null === $groupName) {
$this->groupName = null;
Expand All @@ -553,9 +553,9 @@ public function isExpanded(): bool
}

/**
* @return AbstractField
* @return $this
*/
public function setExpanded(bool $expanded)
public function setExpanded(bool $expanded): AbstractField
{
$this->expanded = $expanded;

Expand Down
16 changes: 8 additions & 8 deletions src/Core/AbstractEntities/AbstractHuman.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getEmail(): ?string
/**
* @return $this
*/
public function setEmail(?string $email)
public function setEmail(?string $email): AbstractHuman
{
if (false !== filter_var($email ?? '', FILTER_VALIDATE_EMAIL)) {
$this->email = $email;
Expand All @@ -115,7 +115,7 @@ public function getFirstName(): ?string
/**
* @return $this
*/
public function setFirstName(?string $firstName)
public function setFirstName(?string $firstName): AbstractHuman
{
$this->firstName = $firstName;

Expand All @@ -130,7 +130,7 @@ public function getLastName(): ?string
/**
* @return $this
*/
public function setLastName(?string $lastName)
public function setLastName(?string $lastName): AbstractHuman
{
$this->lastName = $lastName;

Expand All @@ -145,7 +145,7 @@ public function getCompany(): ?string
/**
* @return $this
*/
public function setCompany(?string $company)
public function setCompany(?string $company): AbstractHuman
{
$this->company = $company;

Expand All @@ -160,7 +160,7 @@ public function getJob(): ?string
/**
* @return $this
*/
public function setJob(?string $job)
public function setJob(?string $job): AbstractHuman
{
$this->job = $job;

Expand All @@ -175,7 +175,7 @@ public function getBirthday(): ?\DateTime
/**
* @return $this
*/
public function setBirthday(?\DateTime $birthday = null)
public function setBirthday(?\DateTime $birthday = null): AbstractHuman
{
$this->birthday = $birthday;

Expand All @@ -188,9 +188,9 @@ public function getPhone(): ?string
}

/**
* @return self
* @return $this
*/
public function setPhone(?string $phone)
public function setPhone(?string $phone): AbstractHuman
{
$this->phone = $phone;

Expand Down
3 changes: 3 additions & 0 deletions src/Core/AbstractEntities/LeafTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public function getChildren(): Collection
return $this->children;
}

/**
* @return $this
*/
public function setChildren(Collection $children): static
{
$this->children = $children;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/AbstractEntities/PositionedInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function getPosition(): float;
* Set position as a float to enable increment and decrement by O.5
* to insert an entity between two others.
*
* @return PositionedInterface
* @return $this
*/
public function setPosition(float $newPosition);
public function setPosition(float $newPosition): PositionedInterface;
}
8 changes: 1 addition & 7 deletions src/Core/AbstractEntities/PositionedTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ public function getPosition(): float
return $this->position;
}

/**
* Set position as a float to enable increment and decrement by O.5
* to insert a node between two others.
*
* @return $this
*/
public function setPosition(float $newPosition)
public function setPosition(float $newPosition): PositionedInterface
{
if ($newPosition > -1) {
$this->position = $newPosition;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Events/LeafEntityLifeCycleSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use RZ\Roadiz\Core\Handlers\HandlerFactoryInterface;

#[AsDoctrineListener(event: Events::prePersist)]
final class LeafEntityLifeCycleSubscriber
final readonly class LeafEntityLifeCycleSubscriber
{
public function __construct(private readonly HandlerFactoryInterface $handlerFactory)
public function __construct(private HandlerFactoryInterface $handlerFactory)
{
}

Expand Down

0 comments on commit 894c819

Please sign in to comment.