Skip to content

Commit 50cb99f

Browse files
And the rest
1 parent 9292486 commit 50cb99f

File tree

12 files changed

+95
-95
lines changed

12 files changed

+95
-95
lines changed

src/Model/Project.php

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

src/Model/ProjectHook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function fromArray(Client $client, Project $project, array $data)
5959
*
6060
* @return void
6161
*/
62-
public function __construct(Project $project, $id, Client $client = null)
62+
public function __construct(Project $project, int $id, Client $client = null)
6363
{
6464
$this->setClient($client);
6565
$this->setData('project', $project);

src/Model/ProjectNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function fromArray(Client $client, array $data)
5252
*
5353
* @return void
5454
*/
55-
public function __construct($id = null, Client $client = null)
55+
public function __construct(int $id = null, Client $client = null)
5656
{
5757
$this->setClient($client);
5858
$this->setData('id', $id);

src/Model/Schedule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function fromArray(Client $client, Project $project, array $data)
5959
*
6060
* @return void
6161
*/
62-
public function __construct(Project $project, $id = null, Client $client = null)
62+
public function __construct(Project $project, ?int $id = null, Client $client = null)
6363
{
6464
$this->setClient($client);
6565
$this->setData('project', $project);

src/Model/Snippet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function fromArray(Client $client, Project $project, array $data)
5555
*
5656
* @return void
5757
*/
58-
public function __construct(Project $project, $id = null, Client $client = null)
58+
public function __construct(Project $project, int $id = null, Client $client = null)
5959
{
6060
$this->setClient($client);
6161
$this->setData('project', $project);
@@ -107,7 +107,7 @@ public function remove()
107107
*
108108
* @return Note
109109
*/
110-
public function addNote($body)
110+
public function addNote(string $body)
111111
{
112112
$data = $this->client->snippets()->addNote($this->project->id, $this->id, $body);
113113

src/Model/Stateful.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Stateful
1111
*
1212
* @return static
1313
*/
14-
public function close($note = null);
14+
public function close(?string $note = null);
1515

1616
/**
1717
* @return static

src/Model/Tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function fromArray(Client $client, Project $project, array $data)
5757
*
5858
* @return void
5959
*/
60-
public function __construct(Project $project, $name = null, Client $client = null)
60+
public function __construct(Project $project, ?string $name = null, Client $client = null)
6161
{
6262
$this->setClient($client);
6363
$this->setData('project', $project);

src/Model/Trigger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function fromArray(Client $client, Project $project, array $data)
5555
* @param int|null $id
5656
* @param Client|null $client
5757
*/
58-
public function __construct(Project $project, $id = null, Client $client = null)
58+
public function __construct(Project $project, ?int $id = null, Client $client = null)
5959
{
6060
$this->setClient($client);
6161
$this->setData('project', $project);

src/Model/User.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function fromArray(Client $client, array $data)
8989
*
9090
* @return User
9191
*/
92-
public static function create(Client $client, $email, $password, array $params = [])
92+
public static function create(Client $client, string $email, string $password, array $params = [])
9393
{
9494
$data = $client->users()->create($email, $password, $params);
9595

@@ -102,7 +102,7 @@ public static function create(Client $client, $email, $password, array $params =
102102
*
103103
* @return void
104104
*/
105-
public function __construct($id = null, Client $client = null)
105+
public function __construct(?int $id = null, Client $client = null)
106106
{
107107
$this->setClient($client);
108108
$this->setData('id', $id);
@@ -181,7 +181,7 @@ public function keys()
181181
*
182182
* @return Key
183183
*/
184-
public function createKey($title, $key)
184+
public function createKey(string $title, string $key)
185185
{
186186
$data = $this->client->users()->createKey($title, $key);
187187

@@ -195,7 +195,7 @@ public function createKey($title, $key)
195195
*
196196
* @return Key
197197
*/
198-
public function createKeyForUser($user_id, $title, $key)
198+
public function createKeyForUser(int $user_id, string $title, string $key)
199199
{
200200
$data = $this->client->users()->createKeyForUser($user_id, $title, $key);
201201

@@ -207,7 +207,7 @@ public function createKeyForUser($user_id, $title, $key)
207207
*
208208
* @return bool
209209
*/
210-
public function removeKey($id)
210+
public function removeKey(int $id)
211211
{
212212
$this->client->users()->removeKey($id);
213213

@@ -220,7 +220,7 @@ public function removeKey($id)
220220
*
221221
* @return User
222222
*/
223-
public function addToGroup($group_id, $access_level)
223+
public function addToGroup(int $group_id, int $access_level)
224224
{
225225
$group = new Group($group_id, $this->getClient());
226226

@@ -232,7 +232,7 @@ public function addToGroup($group_id, $access_level)
232232
*
233233
* @return bool
234234
*/
235-
public function removeFromGroup($group_id)
235+
public function removeFromGroup(int $group_id)
236236
{
237237
$group = new Group($group_id, $this->getClient());
238238

src/Model/Uncyclo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function fromArray(Client $client, Project $project, array $data)
4747
*
4848
* @return void
4949
*/
50-
public function __construct(Project $project, $slug = null, Client $client = null)
50+
public function __construct(Project $project, ?string $slug = null, Client $client = null)
5151
{
5252
$this->setClient($client);
5353
$this->setData('project', $project);

tests/Api/RepositoriesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function shouldGetCommitRefs()
358358
* @param string $type
359359
* @param array $expectedArray
360360
*/
361-
public function shouldGetCommitRefsWithParams($type, array $expectedArray)
361+
public function shouldGetCommitRefsWithParams(string $type, array $expectedArray)
362362
{
363363
$api = $this->getApiMock();
364364
$api->expects($this->once())

tests/Api/TagsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function shouldRemoveTag()
9292
* @param string $description
9393
* @param array $expectedResult
9494
*/
95-
public function shouldCreateRelease($releaseName, $description, $expectedResult)
95+
public function shouldCreateRelease(string $releaseName, string $description, array $expectedResult)
9696
{
9797
$params = [
9898
'description' => $description,
@@ -115,7 +115,7 @@ public function shouldCreateRelease($releaseName, $description, $expectedResult)
115115
* @param string $description
116116
* @param array $expectedResult
117117
*/
118-
public function shouldUpdateRelease($releaseName, $description, $expectedResult)
118+
public function shouldUpdateRelease(string $releaseName, string $description, array $expectedResult)
119119
{
120120
$params = [
121121
'description' => $description,

0 commit comments

Comments
 (0)