PHP 8.2.31
Preview: FuncCallManipulator.php Size: 1.08 KB
/opt/cpanel/ea-wappspector/vendor/rector/rector/src/NodeManipulator/FuncCallManipulator.php

<?php

declare (strict_types=1);
namespace Rector\NodeManipulator;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\FuncCall;
use Rector\PhpParser\Node\Value\ValueResolver;
final class FuncCallManipulator
{
    /**
     * @readonly
     * @var \Rector\PhpParser\Node\Value\ValueResolver
     */
    private $valueResolver;
    public function __construct(ValueResolver $valueResolver)
    {
        $this->valueResolver = $valueResolver;
    }
    /**
     * @param FuncCall[] $compactFuncCalls
     * @return string[]
     */
    public function extractArgumentsFromCompactFuncCalls(array $compactFuncCalls) : array
    {
        $arguments = [];
        foreach ($compactFuncCalls as $compactFuncCall) {
            foreach ($compactFuncCall->args as $arg) {
                if (!$arg instanceof Arg) {
                    continue;
                }
                $value = $this->valueResolver->getValue($arg->value);
                if ($value === null) {
                    continue;
                }
                $arguments[] = $value;
            }
        }
        return $arguments;
    }
}

Directory Contents

Dirs: 0 × Files: 15

Name Size Perms Modified Actions
2.92 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
4.83 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.61 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
9.08 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.61 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.79 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.85 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.18 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
4.25 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.08 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
755 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
6.19 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.46 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
8.65 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
3.08 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).