Skip to content

Commit 3f3c394

Browse files
committed
Better nullable types
1 parent cd49a14 commit 3f3c394

File tree

672 files changed

+18248
-3690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

672 files changed

+18248
-3690
lines changed

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\ActionsMeta;
4+
5+
final class RerunInfo
6+
{
7+
public const SCHEMA_JSON = '{"type":"object","properties":{"plan_id":{"type":"string"},"job_ids":{"type":"array","items":{"type":"string"}}}}';
8+
public const SCHEMA_TITLE = 'ActionsMeta\\RerunInfo';
9+
public const SCHEMA_DESCRIPTION = '';
10+
private string $plan_id;
11+
/**
12+
* @var array<\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\RerunInfo\JobIds>
13+
* @\WyriHaximus\Hydrator\Attribute\HydrateArray(\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\RerunInfo\JobIds::class)
14+
*/
15+
private array $job_ids = array();
16+
public function plan_id() : string
17+
{
18+
return $this->plan_id;
19+
}
20+
/**
21+
* @return array<\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\RerunInfo\JobIds>
22+
*/
23+
public function job_ids() : array
24+
{
25+
return $this->job_ids;
26+
}
27+
}

src/OpenAPI/ApiGitHubCom/Schema/Actor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ final class Actor
1010
private int $id;
1111
private string $login;
1212
private ?string $display_login = null;
13-
private $gravatar_id;
13+
private ?string $gravatar_id;
1414
private string $url;
1515
private string $avatar_url;
1616
public function id() : int
@@ -25,7 +25,7 @@ public function display_login() : ?string
2525
{
2626
return $this->display_login;
2727
}
28-
public function gravatar_id()
28+
public function gravatar_id() : ?string
2929
{
3030
return $this->gravatar_id;
3131
}

src/OpenAPI/ApiGitHubCom/Schema/AddedToProjectIssueEvent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ final class AddedToProjectIssueEvent
1616
*/
1717
private \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\SimpleUser $actor;
1818
private string $event;
19-
private $commit_id;
20-
private $commit_url;
19+
private ?string $commit_id;
20+
private ?string $commit_url;
2121
private string $created_at;
2222
/**
2323
* @\WyriHaximus\Hydrator\Attribute\Hydrate(\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\AddedToProjectIssueEvent\PerformedViaGithubApp::class)
@@ -50,11 +50,11 @@ public function event() : string
5050
{
5151
return $this->event;
5252
}
53-
public function commit_id()
53+
public function commit_id() : ?string
5454
{
5555
return $this->commit_id;
5656
}
57-
public function commit_url()
57+
public function commit_url() : ?string
5858
{
5959
return $this->commit_url;
6060
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\Alert;
4+
5+
final class DismissedBy
6+
{
7+
public const SCHEMA_JSON = '{"type":["object","null"]}';
8+
public const SCHEMA_TITLE = 'Alert\\DismissedBy';
9+
public const SCHEMA_DESCRIPTION = '';
10+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?php
2+
3+
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\Alert;
4+
5+
final class Dismisser
6+
{
7+
public const SCHEMA_JSON = '{"title":"User","required":["login","id"],"type":["object","null"],"properties":{"avatar_url":{"type":"string","format":"uri"},"deleted":{"type":"boolean"},"email":{"type":["string","null"]},"events_url":{"type":"string","format":"uri-template"},"followers_url":{"type":"string","format":"uri"},"following_url":{"type":"string","format":"uri-template"},"gists_url":{"type":"string","format":"uri-template"},"gravatar_id":{"type":"string"},"html_url":{"type":"string","format":"uri"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"},"node_id":{"type":"string"},"organizations_url":{"type":"string","format":"uri"},"received_events_url":{"type":"string","format":"uri"},"repos_url":{"type":"string","format":"uri"},"site_admin":{"type":"boolean"},"starred_url":{"type":"string","format":"uri-template"},"subscriptions_url":{"type":"string","format":"uri"},"type":{"enum":["Bot","User","Organization"],"type":"string"},"url":{"type":"string","format":"uri"}}}';
8+
public const SCHEMA_TITLE = 'User';
9+
public const SCHEMA_DESCRIPTION = '';
10+
private ?string $avatar_url = null;
11+
private ?bool $deleted = null;
12+
private ?string $email = null;
13+
private ?string $events_url = null;
14+
private ?string $followers_url = null;
15+
private ?string $following_url = null;
16+
private ?string $gists_url = null;
17+
private ?string $gravatar_id = null;
18+
private ?string $html_url = null;
19+
private int $id;
20+
private string $login;
21+
private ?string $name = null;
22+
private ?string $node_id = null;
23+
private ?string $organizations_url = null;
24+
private ?string $received_events_url = null;
25+
private ?string $repos_url = null;
26+
private ?bool $site_admin = null;
27+
private ?string $starred_url = null;
28+
private ?string $subscriptions_url = null;
29+
private ?string $type = null;
30+
private ?string $url = null;
31+
public function avatar_url() : ?string
32+
{
33+
return $this->avatar_url;
34+
}
35+
public function deleted() : ?bool
36+
{
37+
return $this->deleted;
38+
}
39+
public function email() : ?string
40+
{
41+
return $this->email;
42+
}
43+
public function events_url() : ?string
44+
{
45+
return $this->events_url;
46+
}
47+
public function followers_url() : ?string
48+
{
49+
return $this->followers_url;
50+
}
51+
public function following_url() : ?string
52+
{
53+
return $this->following_url;
54+
}
55+
public function gists_url() : ?string
56+
{
57+
return $this->gists_url;
58+
}
59+
public function gravatar_id() : ?string
60+
{
61+
return $this->gravatar_id;
62+
}
63+
public function html_url() : ?string
64+
{
65+
return $this->html_url;
66+
}
67+
public function id() : int
68+
{
69+
return $this->id;
70+
}
71+
public function login() : string
72+
{
73+
return $this->login;
74+
}
75+
public function name() : ?string
76+
{
77+
return $this->name;
78+
}
79+
public function node_id() : ?string
80+
{
81+
return $this->node_id;
82+
}
83+
public function organizations_url() : ?string
84+
{
85+
return $this->organizations_url;
86+
}
87+
public function received_events_url() : ?string
88+
{
89+
return $this->received_events_url;
90+
}
91+
public function repos_url() : ?string
92+
{
93+
return $this->repos_url;
94+
}
95+
public function site_admin() : ?bool
96+
{
97+
return $this->site_admin;
98+
}
99+
public function starred_url() : ?string
100+
{
101+
return $this->starred_url;
102+
}
103+
public function subscriptions_url() : ?string
104+
{
105+
return $this->subscriptions_url;
106+
}
107+
public function type() : ?string
108+
{
109+
return $this->type;
110+
}
111+
public function url() : ?string
112+
{
113+
return $this->url;
114+
}
115+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?php
2+
3+
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\Alert;
4+
5+
final class MostRecentInstance
6+
{
7+
public const SCHEMA_JSON = '{"title":"Alert Instance","required":["ref","analysis_key","environment","state"],"type":["object","null"],"properties":{"analysis_key":{"type":"string","description":"Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."},"classifications":{"type":"array","items":{"type":"string"}},"commit_sha":{"type":"string"},"environment":{"type":"string","description":"Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed."},"location":{"type":"object","properties":{"end_column":{"type":"integer"},"end_line":{"type":"integer"},"path":{"type":"string"},"start_column":{"type":"integer"},"start_line":{"type":"integer"}}},"message":{"type":"object","properties":{"text":{"type":"string"}}},"ref":{"type":"string","description":"The full Git reference, formatted as `refs\\/heads\\/<branch name>`."},"state":{"enum":["open","dismissed","fixed"],"type":"string","description":"State of a code scanning alert."}}}';
8+
public const SCHEMA_TITLE = 'Alert Instance';
9+
public const SCHEMA_DESCRIPTION = '';
10+
/**
11+
* Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.
12+
*/
13+
private string $analysis_key;
14+
/**
15+
* @var array<\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Classifications>
16+
* @\WyriHaximus\Hydrator\Attribute\HydrateArray(\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Classifications::class)
17+
*/
18+
private array $classifications = array();
19+
private ?string $commit_sha = null;
20+
/**
21+
* Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.
22+
*/
23+
private string $environment;
24+
/**
25+
* @\WyriHaximus\Hydrator\Attribute\Hydrate(\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Location::class)
26+
*/
27+
private ?\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Location $location = null;
28+
/**
29+
* @\WyriHaximus\Hydrator\Attribute\Hydrate(\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Message::class)
30+
*/
31+
private ?\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Message $message = null;
32+
/**
33+
* The full Git reference, formatted as `refs/heads/<branch name>`.
34+
*/
35+
private string $ref;
36+
/**
37+
* State of a code scanning alert.
38+
*/
39+
private string $state;
40+
/**
41+
* Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.
42+
*/
43+
public function analysis_key() : string
44+
{
45+
return $this->analysis_key;
46+
}
47+
/**
48+
* @return array<\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Classifications>
49+
*/
50+
public function classifications() : array
51+
{
52+
return $this->classifications;
53+
}
54+
public function commit_sha() : ?string
55+
{
56+
return $this->commit_sha;
57+
}
58+
/**
59+
* Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.
60+
*/
61+
public function environment() : string
62+
{
63+
return $this->environment;
64+
}
65+
public function location() : ?\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Location
66+
{
67+
return $this->location;
68+
}
69+
public function message() : ?\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\MostRecentInstance\Message
70+
{
71+
return $this->message;
72+
}
73+
/**
74+
* The full Git reference, formatted as `refs/heads/<branch name>`.
75+
*/
76+
public function ref() : string
77+
{
78+
return $this->ref;
79+
}
80+
/**
81+
* State of a code scanning alert.
82+
*/
83+
public function state() : string
84+
{
85+
return $this->state;
86+
}
87+
}

src/OpenAPI/ApiGitHubCom/Schema/Alert/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class Rule
1818
/**
1919
* The severity of the alert.
2020
*/
21-
private $severity;
21+
private ?string $severity;
2222
/**
2323
* A short description of the rule used to detect the alert.
2424
*/
@@ -36,7 +36,7 @@ public function id() : string
3636
/**
3737
* The severity of the alert.
3838
*/
39-
public function severity()
39+
public function severity() : ?string
4040
{
4141
return $this->severity;
4242
}

src/OpenAPI/ApiGitHubCom/Schema/Alert/Tool.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class Tool
1414
/**
1515
* The version of the tool used to detect the alert.
1616
*/
17-
private $version;
17+
private ?string $version;
1818
/**
1919
* The name of the tool used to generate the code scanning analysis alert.
2020
*/
@@ -25,7 +25,7 @@ public function name() : string
2525
/**
2626
* The version of the tool used to detect the alert.
2727
*/
28-
public function version()
28+
public function version() : ?string
2929
{
3030
return $this->version;
3131
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\Aliases;
4+
5+
final class TopicRelation
6+
{
7+
public const SCHEMA_JSON = '{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"topic_id":{"type":"integer"},"relation_type":{"type":"string"}}}';
8+
public const SCHEMA_TITLE = 'Aliases\\TopicRelation';
9+
public const SCHEMA_DESCRIPTION = '';
10+
private int $id;
11+
private string $name;
12+
private int $topic_id;
13+
private string $relation_type;
14+
public function id() : int
15+
{
16+
return $this->id;
17+
}
18+
public function name() : string
19+
{
20+
return $this->name;
21+
}
22+
public function topic_id() : int
23+
{
24+
return $this->topic_id;
25+
}
26+
public function relation_type() : string
27+
{
28+
return $this->relation_type;
29+
}
30+
}

0 commit comments

Comments
 (0)