Skip to content

Commit 33dde96

Browse files
committed
[TypeDeclaration] Skip integer index on string on AddArrowFunctionParamArrayWhereDimFetchRector
1 parent bca27c3 commit 33dde96

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclaration\Rector\FuncCall\AddArrowFunctionParamArrayWhereDimFetchRector\Fixture;
4+
5+
final class SkipFilledType
6+
{
7+
public function run()
8+
{
9+
$username = 'john.doe';
10+
11+
$initials = implode(
12+
'',
13+
array_map(
14+
static fn ($name): string => strtoupper((string) $name[0]),
15+
explode('.', $username),
16+
),
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)