Skip to content

Commit

Permalink
OXDEV-8215 Set title, description and version not nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
RahatHameed committed Jul 30, 2024
1 parent 754ed08 commit 38c1cd8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Module/DataType/ModuleDataType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ final class ModuleDataType implements ModuleDataTypeInterface
{
public function __construct(
private readonly string $id,
private readonly ?string $version,
private readonly ?string $title,
private readonly ?string $description,
private readonly string $version,
private readonly string $title,
private readonly string $description,
private readonly ?string $thumbnail,
private readonly ?string $author,
private readonly ?string $url,
Expand All @@ -35,19 +35,19 @@ public function getId(): string
}

#[Field]
public function getTitle(): ?string
public function getTitle(): string
{
return $this->title;
}

#[Field]
public function getVersion(): ?string
public function getVersion(): string
{
return $this->version;
}

#[Field]
public function getDescription(): ?string
public function getDescription(): string
{
return $this->description;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Module/DataType/ModuleDataTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interface ModuleDataTypeInterface
{
public function getId(): string;

public function getTitle(): ?string;
public function getTitle(): string;

public function getVersion(): ?string;
public function getVersion(): string;

public function getDescription(): ?string;
public function getDescription(): string;

public function getThumbnail(): ?string;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Module/DataType/ModuleDataTypeFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public function testCreateFromCoreModule()
$this->assertSame($expectedAuthor, $moduleDataType->getAuthor());
$this->assertSame($expectedUrl, $moduleDataType->getUrl());
$this->assertSame($expectedEmail, $moduleDataType->getEmail());
$this->assertTrue($moduleDataType->isActive());
$this->assertIsBool($moduleDataType->isActive());
}
}

0 comments on commit 38c1cd8

Please sign in to comment.