Skip to content

Commit

Permalink
Add more missing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Nov 24, 2024
1 parent 5c382d2 commit 52ce09c
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 42 deletions.
19 changes: 9 additions & 10 deletions src/Models/Document/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

class Edit extends \BNETDocs\Models\ActiveUser
{
public $acl_allowed;
public $brief;
public $category;
public bool $acl_allowed = false;
public ?string $brief = null;
public ?string $category = null;
public ?array $comments = null;
public $content;
public $document;
public $document_id;
public $markdown;
public $published;
public $title;
public $user;
public ?string $content = null;
public ?\BNETDocs\Libraries\Document $document = null;
public ?int $document_id = null;
public ?bool $markdown = null;
public ?bool $published = null;
public ?string $title = null;
}
6 changes: 3 additions & 3 deletions src/Models/Document/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Index extends \BNETDocs\Models\ActiveUser
{
public $documents;
public $order;
public $sum_documents;
public array|false $documents = false;
public string $order = '';
public int $sum_documents = 0;
}
8 changes: 4 additions & 4 deletions src/Models/Document/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class View extends \BNETDocs\Models\ActiveUser
{
public $acl_allowed;
public $comments;
public $document;
public $document_id;
public bool $acl_allowed = false;
public ?array $comments = null;
public ?\BNETDocs\Libraries\Document $document = null;
public ?int $document_id = null;
}
15 changes: 7 additions & 8 deletions src/Models/EventLog/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

class Index extends \BNETDocs\Models\ActiveUser
{
public $acl_allowed;
public $events;
public $limit;
public $order;
public $page;
public $pages;
public $sum_events;
public $user;
public bool $acl_allowed = false;
public ?array $events = null;
public int $limit = 0;
public string $order = '';
public int $page = 0;
public int $pages = 0;
public int $sum_events = 0;
}
10 changes: 5 additions & 5 deletions src/Models/News/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class Delete extends \BNETDocs\Models\ActiveUser
{
public bool $acl_allowed;
public ?int $id;
public ?\BNETDocs\Libraries\NewsPost $news_post;
public string $title;
public ?\BNETDocs\Libraries\User $user;
public bool $acl_allowed = false;
public ?int $id = null;
public ?\BNETDocs\Libraries\NewsPost $news_post = null;
public string $title = '';
public ?\BNETDocs\Libraries\User $user = null;
}
2 changes: 1 addition & 1 deletion src/Models/News/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Edit extends \BNETDocs\Models\ActiveUser
public ?string $content = null;
public bool $markdown = false;
public ?array $news_categories = null;
public ?\BNETDocs\Libraries\NewsPost $news_post;
public ?\BNETDocs\Libraries\NewsPost $news_post = null;
public ?int $news_post_id = null;
public bool $published = false;
public bool $rss_exempt = true;
Expand Down
8 changes: 4 additions & 4 deletions src/Models/News/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class View extends \BNETDocs\Models\ActiveUser
{
public bool $acl_allowed;
public ?array $comments;
public ?\BNETDocs\Libraries\NewsPost $news_post;
public ?int $news_post_id;
public bool $acl_allowed = false;
public ?array $comments = null;
public ?\BNETDocs\Libraries\NewsPost $news_post = null;
public ?int $news_post_id = null;
}
9 changes: 4 additions & 5 deletions src/Models/Packet/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
class Index extends \BNETDocs\Models\ActiveUser
{
public $application_layers;
public $order;
public $packets;
public $pktapplayer;
public $timestamp;
public $user;
public array|string|null $order = null;
public array|false $packets = false;
public array $pktapplayer = [];
public ?\DateTimeInterface $timestamp = null;
}
4 changes: 2 additions & 2 deletions src/Models/Server/UpdateJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class UpdateJob extends \BNETDocs\Models\ActiveUser
{
public $old_status_bitmask;
public $server;
public int $old_status_bitmask = 0;
public ?\BNETDocs\Libraries\Server $server = null;
}

0 comments on commit 52ce09c

Please sign in to comment.