Skip to content

Commit c04fadc

Browse files
author
Greg Bowler
authored
5 callback (#6)
* test: implement unit tests * feature: introduce callable interface * feature: force non-null callback
1 parent bc7fe1f commit c04fadc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/CallbackTypeSafeGetter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
use DateTimeInterface;
55

66
interface CallbackTypeSafeGetter {
7-
public function get(string $name, ?callable $callback = null):mixed;
8-
public function getString(string $name, ?callable $callback = null):?string;
9-
public function getInt(string $name, ?callable $callback = null):?int;
10-
public function getFloat(string $name, ?callable $callback = null):?float;
11-
public function getBool(string $name, ?callable $callback = null):?bool;
12-
public function getDateTime(string $name, ?callable $callback = null):?DateTimeInterface;
7+
public function get(string $name, callable $callback):mixed;
8+
public function getString(string $name, callable $callback):?string;
9+
public function getInt(string $name, callable $callback):?int;
10+
public function getFloat(string $name, callable $callback):?float;
11+
public function getBool(string $name, callable $callback):?bool;
12+
public function getDateTime(string $name, callable $callback):?DateTimeInterface;
1313
}

0 commit comments

Comments
 (0)