Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
kawax committed Dec 19, 2024
1 parent c084ce0 commit d910c7e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/Support/DNS.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ final class DNS
{
protected static ?string $fake = null;

/**
* @return array<array<array-key, string>>
*/
public static function record(string $hostname, int $type = DNS_TXT): array
{
if (! is_null(self::$fake)) {
Expand Down
6 changes: 6 additions & 0 deletions src/Support/DidDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
{
protected Collection $didDoc;

/**
* @param null|array<array-key, mixed>|Collection $didDoc
*/
public function __construct(array|Collection|null $didDoc = null)
{
$this->didDoc = Collection::wrap($didDoc)
Expand All @@ -28,6 +31,9 @@ public function __construct(array|Collection|null $didDoc = null)
]);
}

/**
* @param null|array<array-key, mixed>|Collection $didDoc
*/
public static function make(array|Collection|null $didDoc = null): self
{
return new self($didDoc);
Expand Down
6 changes: 6 additions & 0 deletions src/Support/ProtectedResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{
protected Collection $meta;

/**
* @param null|array<array-key, mixed>|Collection $meta
*/
public function __construct(array|Collection|null $meta = null)
{
$this->meta = Collection::wrap($meta)
Expand All @@ -26,6 +29,9 @@ public function __construct(array|Collection|null $meta = null)
]);
}

/**
* @param null|array<array-key, mixed>|Collection $meta
*/
public static function make(array|Collection|null $meta = null): self
{
return new self($meta);
Expand Down
12 changes: 7 additions & 5 deletions src/Types/SelfLabels.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
#[NSID('com.atproto.label.defs#selfLabels')]
final class SelfLabels extends AbstractUnion implements Arrayable
{
protected array $labels;

public function __construct(array $labels)
/**
* @param array<string> $labels
*/
public function __construct(protected array $labels)
{
$this->type = 'com.atproto.label.defs#selfLabels';

$this->labels = $labels;
}

/**
* @param array<string> $labels
*/
public static function make(array $labels): self
{
return new self($labels);
Expand Down

0 comments on commit d910c7e

Please sign in to comment.