Skip to content

Commit d09ada4

Browse files
author
Nikita Sapogov
committed
bumped interface and requirements to php7
1 parent 1b66960 commit d09ada4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DummyObject implements ToArrayInterface {
3131
*
3232
* @return array
3333
*/
34-
public function toArray() {
34+
public function toArray(): array {
3535
return array(
3636
'hash' => sha1(time())
3737
);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
}
2020
},
2121
"require": {
22-
"php": ">=5.0"
22+
"php": ">=7.0"
2323
}
2424
}

src/ToArrayInterface.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
declare(strict_types=1);
23

34
namespace Imponeer;
45

@@ -7,12 +8,10 @@
78
*/
89
interface ToArrayInterface
910
{
10-
1111
/**
1212
* Converts object to array
1313
*
1414
* @return array
1515
*/
16-
public function toArray();
17-
18-
}
16+
public function toArray(): array;
17+
}

0 commit comments

Comments
 (0)