Skip to content

Commit 5bbec5a

Browse files
committed
Improve code to phpstan level 5
1 parent 6f4ec2e commit 5bbec5a

4 files changed

Lines changed: 18 additions & 13 deletions

File tree

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 4
2+
level: 5
33
paths:
44
- src/
55
- tests/

tests/Parameters/CreateMeetingParametersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testCreateBreakoutMeeting()
126126

127127
$this->assertStringContainsString('isBreakout=' . urlencode($createBreakoutMeetingParams->isBreakout() ? 'true' : 'false'), $params);
128128
$this->assertStringContainsString('parentMeetingID=' . urlencode($createBreakoutMeetingParams->getParentMeetingId()), $params);
129-
$this->assertStringContainsString('sequence=' . urlencode($createBreakoutMeetingParams->getSequence()), $params);
129+
$this->assertStringContainsString('sequence=' . urlencode((string) $createBreakoutMeetingParams->getSequence()), $params);
130130
$this->assertStringContainsString('freeJoin=' . urlencode($createBreakoutMeetingParams->isFreeJoin() ? 'true' : 'false'), $params);
131131
}
132132

tests/Parameters/GetMeetingInfoParametersTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ public function testGetMeetingInfoParameters()
3636
$this->assertEquals($meetingId, $getMeetingInfoParams->getMeetingId());
3737

3838
// Test setters that are ignored by the constructor
39-
$newId = $this->faker->uuid;
39+
$newId = $this->faker->uuid;
40+
$limit = $this->faker->numberBetween(1, 99);
41+
$offset = $this->faker->numberBetween(1, 99);
4042

4143
$getMeetingInfoParams->setMeetingId($newId);
42-
$getMeetingInfoParams->setMeetingId($limit = $this->faker->numberBetween(1, 99));
43-
$getMeetingInfoParams->setMeetingId($offset = $this->faker->numberBetween(1, 99));
44+
$getMeetingInfoParams->setLimit($limit);
45+
$getMeetingInfoParams->setOffset($offset);
4446

45-
$this->assertNotEquals($newId, $getMeetingInfoParams->getMeetingId());
46-
$this->assertNull($getMeetingInfoParams->getLimit());
47-
$this->assertNull($getMeetingInfoParams->getOffset());
47+
$this->assertEquals($newId, $getMeetingInfoParams->getMeetingId());
48+
$this->assertEquals($limit, $getMeetingInfoParams->getLimit());
49+
$this->assertEquals($offset, $getMeetingInfoParams->getOffset());
4850
}
4951
}

tests/Parameters/PublishRecordingsParametersTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,20 @@ class PublishRecordingsParametersTest extends TestCase
3131
{
3232
public function testPublishRecordingsParameters()
3333
{
34-
$recordingId = $this->faker->uuid;
35-
$publish = $this->faker->boolean(50);
34+
$recordingId = $this->faker->uuid;
35+
$publish = $this->faker->boolean(50);
36+
$newRecordingId = $this->faker->uuid;
37+
$newPublish = !$publish;
38+
3639
$publishRecording = new PublishRecordingsParameters($recordingId, $publish);
3740

3841
$this->assertEquals($recordingId, $publishRecording->getRecordingId());
3942
$this->assertEquals($publish, $publishRecording->isPublish());
4043

4144
// Test setters that are ignored by the constructor
42-
$publishRecording->setRecordingId($newRecordingId = !$this->faker->uuid);
43-
$publishRecording->setPublish($publish = !$publish);
45+
$publishRecording->setRecordingId($newRecordingId);
46+
$publishRecording->setPublish($newPublish);
4447
$this->assertEquals($newRecordingId, $publishRecording->getRecordingId());
45-
$this->assertEquals($publish, $publishRecording->isPublish());
48+
$this->assertEquals($newPublish, $publishRecording->isPublish());
4649
}
4750
}

0 commit comments

Comments
 (0)