REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.35 KB
Close
//opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/rector/rector-phpunit/src/NodeFactory/MatcherInvocationCountMethodCallNodeFactory.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\PHPUnit\NodeFactory; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; use Rector\PHPUnit\Composer\ProjectPackageVersionResolver; use Rector\PHPUnit\Enum\ConsecutiveVariable; final class MatcherInvocationCountMethodCallNodeFactory { /** * @readonly * @var \Rector\PHPUnit\Composer\ProjectPackageVersionResolver */ private $projectPackageVersionResolver; public function __construct(ProjectPackageVersionResolver $projectPackageVersionResolver) { $this->projectPackageVersionResolver = $projectPackageVersionResolver; } public function create() : MethodCall { $invocationMethodName = $this->getInvocationMethodName(); $matcherVariable = new Variable(ConsecutiveVariable::MATCHER); return new MethodCall($matcherVariable, new Identifier($invocationMethodName)); } private function getInvocationMethodName() : string { $projectPHPUnitVersion = $this->projectPackageVersionResolver->findPackageVersion('phpunit/phpunit'); if ($projectPHPUnitVersion === null || \version_compare($projectPHPUnitVersion, '10.0', '>=')) { // phpunit 10 naming return 'numberOfInvocations'; } // phpunit 9 naming return 'getInvocationCount'; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AssertCallFactory.php
588 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ConsecutiveIfsFactory.php
5.26 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ExpectExceptionMethodCallFactory.php
2.20 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MatcherInvocationCountMethodCallNodeFactory.php
1.35 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
UsedVariablesResolver.php
1.95 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).