PHP 8.2.31
Preview: AssertCallFactory.php Size: 588 B
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/rector/rector-phpunit/src/NodeFactory/AssertCallFactory.php

<?php

declare (strict_types=1);
namespace Rector\PHPUnit\NodeFactory;

use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
final class AssertCallFactory
{
    /**
     * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall $node
     * @return \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall
     */
    public function createCallWithName($node, string $name)
    {
        if ($node instanceof MethodCall) {
            return new MethodCall($node->var, $name);
        }
        return new StaticCall($node->class, $name);
    }
}

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
588 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
5.26 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.20 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.35 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.95 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download

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