Skip to content

Commit 808f7cf

Browse files
committed
use types
1 parent f8f41c6 commit 808f7cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/MatchesSnapshots.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function markTestIncompleteIfSnapshotsHaveChanged()
4242
$this->markTestIncomplete($formattedMessages);
4343
}
4444

45-
public function assertMatchesSnapshot($actual, Driver $driver = null)
45+
public function assertMatchesSnapshot($actual, Driver $driver = null): void
4646
{
4747
if (! is_null($driver)) {
4848
$this->doSnapshotAssertion($actual, $driver);
@@ -59,7 +59,7 @@ public function assertMatchesSnapshot($actual, Driver $driver = null)
5959
$this->doSnapshotAssertion($actual, new ObjectDriver());
6060
}
6161

62-
public function assertMatchesFileHashSnapshot($filePath)
62+
public function assertMatchesFileHashSnapshot($filePath): void
6363
{
6464
if (! file_exists($filePath)) {
6565
$this->fail('File does not exist');
@@ -255,21 +255,21 @@ protected function doFileSnapshotAssertion(string $filePath): void
255255
$this->assertTrue(true);
256256
}
257257

258-
protected function createSnapshotAndMarkTestIncomplete(Snapshot $snapshot, $actual)
258+
protected function createSnapshotAndMarkTestIncomplete(Snapshot $snapshot, $actual): void
259259
{
260260
$snapshot->create($actual);
261261

262262
$this->registerSnapshotChange("Snapshot created for {$snapshot->id()}");
263263
}
264264

265-
protected function updateSnapshotAndMarkTestIncomplete(Snapshot $snapshot, $actual)
265+
protected function updateSnapshotAndMarkTestIncomplete(Snapshot $snapshot, $actual): void
266266
{
267267
$snapshot->create($actual);
268268

269269
$this->registerSnapshotChange("Snapshot updated for {$snapshot->id()}");
270270
}
271271

272-
protected function rethrowExpectationFailedExceptionWithUpdateSnapshotsPrompt($exception)
272+
protected function rethrowExpectationFailedExceptionWithUpdateSnapshotsPrompt($exception): void
273273
{
274274
$newMessage = $exception->getMessage()."\n\n".
275275
'Snapshots can be updated by passing '.
@@ -284,7 +284,7 @@ protected function rethrowExpectationFailedExceptionWithUpdateSnapshotsPrompt($e
284284
throw $exception;
285285
}
286286

287-
protected function registerSnapshotChange(string $message)
287+
protected function registerSnapshotChange(string $message): void
288288
{
289289
$this->snapshotChanges[] = $message;
290290
}

0 commit comments

Comments
 (0)