Skip to content

Commit

Permalink
Ignore phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémy Leherpeur committed Feb 29, 2024
1 parent 5a5025a commit a668781
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Factory/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function getPropertyNames(array $properties): array
);
}

public function jsonSerialize(): array
public function jsonSerialize(): array // @phpstan-ignore-line
{
return [
'name' => $this->name,
Expand All @@ -61,7 +61,7 @@ public function jsonSerialize(): array
];
}

public static function fromArray(array $data): self
public static function fromArray(array $data): self // @phpstan-ignore-line
{
return new self(
$data['name'],
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/ZddMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function getFingerprint(): string
return $fingerprint;
}

public function jsonSerialize(): array
public function jsonSerialize(): array // @phpstan-ignore-line
{
return [
'name' => $this->name,
Expand All @@ -47,7 +47,7 @@ public function jsonSerialize(): array
];
}

public static function fromArray(array $data): self
public static function fromArray(array $data): self // @phpstan-ignore-line
{
return new self(
$data['name'],
Expand Down
5 changes: 4 additions & 1 deletion src/Filesystem/ZddMessageFilesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public function read(string $messageName): ZddMessage
}

/** @var Property[] $properties */
$properties = array_map(fn (array $p) => Property::fromArray($p), json_decode($propertiesJson, true));
$properties = array_map(
static fn (array $p) => Property::fromArray($p), // @phpstan-ignore-line
json_decode($propertiesJson, true) // @phpstan-ignore-line
);

return new ZddMessage($messageName, $messageName, $serializedMessage, $properties); // TODO: Check 2nd parameter value
}
Expand Down

0 comments on commit a668781

Please sign in to comment.