@@ -13,7 +13,7 @@ class FileBackendEntryDtoTest extends BaseTestCase
1313{
1414 /**
1515 */
16- public function validEntryConstructorParameters ()
16+ public static function validEntryConstructorParameters (): array
1717 {
1818 return [
1919 ['data ' , [], 0 ],
@@ -29,13 +29,8 @@ public function validEntryConstructorParameters()
2929 /**
3030 * @dataProvider validEntryConstructorParameters
3131 * @test
32- *
33- * @param string $data
34- * @param array $tags
35- * @param int $expiryTime
36- * @return void
3732 */
38- public function canBeCreatedWithConstructor ($ data , $ tags , $ expiryTime )
33+ public function canBeCreatedWithConstructor (string $ data , array $ tags , int $ expiryTime ): void
3934 {
4035 $ entryDto = new FileBackendEntryDto ($ data , $ tags , $ expiryTime );
4136 self ::assertInstanceOf (FileBackendEntryDto::class, $ entryDto );
@@ -44,13 +39,8 @@ public function canBeCreatedWithConstructor($data, $tags, $expiryTime)
4439 /**
4540 * @dataProvider validEntryConstructorParameters
4641 * @test
47- *
48- * @param $data
49- * @param $tags
50- * @param $expiryTime
51- * @return void
5242 */
53- public function gettersReturnDataProvidedToConstructor ($ data , $ tags , $ expiryTime )
43+ public function gettersReturnDataProvidedToConstructor (string $ data , array $ tags , int $ expiryTime ): void
5444 {
5545 $ entryDto = new FileBackendEntryDto ($ data , $ tags , $ expiryTime );
5646 self ::assertEquals ($ data , $ entryDto ->getData ());
@@ -60,19 +50,17 @@ public function gettersReturnDataProvidedToConstructor($data, $tags, $expiryTime
6050
6151 /**
6252 * @test
63- * @return void
6453 */
65- public function isExpiredReturnsFalseIfExpiryTimeIsInFuture ()
54+ public function isExpiredReturnsFalseIfExpiryTimeIsInFuture (): void
6655 {
6756 $ entryDto = new FileBackendEntryDto ('data ' , [], time () + 10 );
6857 self ::assertFalse ($ entryDto ->isExpired ());
6958 }
7059
7160 /**
7261 * @test
73- * @return void
7462 */
75- public function isExpiredReturnsTrueIfExpiryTimeIsInPast ()
63+ public function isExpiredReturnsTrueIfExpiryTimeIsInPast (): void
7664 {
7765 $ entryDto = new FileBackendEntryDto ('data ' , [], time () - 10 );
7866 self ::assertTrue ($ entryDto ->isExpired ());
@@ -81,9 +69,8 @@ public function isExpiredReturnsTrueIfExpiryTimeIsInPast()
8169 /**
8270 * @dataProvider validEntryConstructorParameters
8371 * @test
84- * @return void
8572 */
86- public function isIdempotent ($ data , $ tags , $ expiryTime )
73+ public function isIdempotent (string $ data , array $ tags , int $ expiryTime ): void
8774 {
8875 $ entryDto = new FileBackendEntryDto ($ data , $ tags , $ expiryTime );
8976 $ entryString = (string )$ entryDto ;
0 commit comments