Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 9bb2f65

Browse files
aloiret-edfredemmott
authored andcommitted
Add type hints to lambda parameters.
Summary: required for .hhconfig disallow_ambiguous_lambda. Signed-off-by: Arthur Loiret <arthur.loiret@emerton-data.com>
1 parent 8a88ee1 commit 9bb2f65

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bin/naive-benchmark.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ private static function testImplementation(
8282
$expected_responder,
8383
$responder,
8484
);
85-
$pretty_data = $dict ==> \var_export($dict, true)
85+
$pretty_data = (
86+
dict<string, string> $dict
87+
) ==> \var_export($dict, true)
8688
|> Str\split($$, "\n")
8789
|> Vec\map($$, $line ==> ' '.$line)
8890
|> Str\join($$, "\n");

src/request-parameters/RequestParametersBase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ public function __construct(
2424
KeyedTraversable<string, string> $values,
2525
) {
2626
$this->values = new ImmMap($values);
27-
$spec_vector_to_map = $specs ==>
28-
Dict\pull($specs, $it ==> $it, $it ==> $it->getName());
27+
$spec_vector_to_map = (
28+
Traversable<RequestParameter> $specs
29+
) ==> Dict\pull($specs, $it ==> $it, $it ==> $it->getName());
2930

3031
$this->requiredSpecs = $spec_vector_to_map($required_specs);
3132
$this->optionalSpecs = $spec_vector_to_map($optional_specs);

0 commit comments

Comments
 (0)