Skip to content

Commit e40f777

Browse files
committed
Turned return type annotations of private methods into php return types.
1 parent c841909 commit e40f777

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

FormFieldRegistry.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,8 @@ private static function create($base, array $values)
162162

163163
/**
164164
* Transforms a PHP array in a list of fully qualified name / value.
165-
*
166-
* @return array The list of fields as [string] Fully qualified name => (mixed) value)
167165
*/
168-
private function walk(array $array, ?string $base = '', array &$output = [])
166+
private function walk(array $array, ?string $base = '', array &$output = []): array
169167
{
170168
foreach ($array as $k => $v) {
171169
$path = empty($base) ? $k : sprintf('%s[%s]', $base, $k);
@@ -186,7 +184,7 @@ private function walk(array $array, ?string $base = '', array &$output = [])
186184
*
187185
* @return string[] The list of segments
188186
*/
189-
private function getSegments(string $name)
187+
private function getSegments(string $name): array
190188
{
191189
if (preg_match('/^(?P<base>[^[]+)(?P<extra>(\[.*)|$)/', $name, $m)) {
192190
$segments = [$m['base']];

0 commit comments

Comments
 (0)