Implement level 6 PHPStan fixes

This commit is contained in:
2024-08-27 23:30:05 -04:00
parent 4d764cbb3f
commit 15ff5d3cb6
37 changed files with 239 additions and 168 deletions

View File

@@ -13,7 +13,7 @@ use Square\Pjson\JsonDataSerializable;
/**
* A serializable ID wrapper class
*/
class PjsonId implements JsonDataSerializable
final class PjsonId implements JsonDataSerializable
{
public function __construct(protected string $value) { }
@@ -22,6 +22,11 @@ class PjsonId implements JsonDataSerializable
return $this->value;
}
/**
* @param mixed $jd JSON data
* @param string[]|string $path The path within the data to be retrieved
* @return self
*/
public static function fromJsonData($jd, array|string $path = []): static
{
return new static($jd);