Skip to content

Commit

Permalink
infection#654 fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
majkel89 committed Mar 13, 2019
1 parent f6f7ff4 commit 6643309
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Mutator/Extensions/MBString.php
Expand Up @@ -111,7 +111,7 @@ private function setupConverters(array $functionsMap): void
'mb_convert_case' => $this->mapConvertCase(),
];

$functionsToRemove = \array_filter($functionsMap, function($isOn) {
$functionsToRemove = \array_filter($functionsMap, function ($isOn) {
return !$isOn;
});

Expand All @@ -120,21 +120,21 @@ private function setupConverters(array $functionsMap): void

private function mapName(string $functionName): callable
{
return function(Node\Expr\FuncCall $node) use ($functionName): Generator {
return function (Node\Expr\FuncCall $node) use ($functionName): Generator {
yield $this->createNode($node, $functionName, $node->args);
};
}

private function mapNameSkipArg(string $functionName, int $skipArgs): callable
{
return function(Node\Expr\FuncCall $node) use ($functionName, $skipArgs): Generator {
return function (Node\Expr\FuncCall $node) use ($functionName, $skipArgs): Generator {
yield $this->createNode($node, $functionName, \array_slice($node->args, 0, $skipArgs));
};
}

private function mapEreg(callable $baseConverter, string $prefix = '', string $suffix = '', callable $warp = null): callable
private function mapEreg(callable $baseConverter, string $prefix = '', string $modifiers = '', callable $warp = null): callable
{
return function (Node\Expr\FuncCall $node) use ($baseConverter, $prefix, $suffix, $warp): Generator {
return function (Node\Expr\FuncCall $node) use ($baseConverter, $prefix, $modifiers, $warp): Generator {
foreach ($baseConverter($node) as $newNode) {
/* @var Node\Expr\FuncCall $newNode */
$newNode->args[0] = new Node\Arg(
Expand All @@ -150,7 +150,7 @@ private function mapEreg(callable $baseConverter, string $prefix = '', string $s
]
)
),
new Node\Scalar\String_("/$suffix")
new Node\Scalar\String_("/$modifiers")
)
);

Expand Down Expand Up @@ -178,7 +178,7 @@ private function warpTernary(Node\Expr\FuncCall $node): Node

private function mapConvertCase(): callable
{
return function(Node\Expr\FuncCall $node): Generator {
return function (Node\Expr\FuncCall $node): Generator {
$modeValue = $this->getConvertCaseModeValue($node);

if ($modeValue === null) {
Expand Down

0 comments on commit 6643309

Please sign in to comment.