-
-
Notifications
You must be signed in to change notification settings - Fork 333
/
ArrayFuncCallToMethodCall.php
47 lines (39 loc) · 1.12 KB
/
ArrayFuncCallToMethodCall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
declare(strict_types=1);
namespace Rector\Transform\ValueObject;
use Rector\Core\Validation\RectorAssert;
use Rector\Transform\Contract\ValueObject\ArgumentFuncCallToMethodCallInterface;
final class ArrayFuncCallToMethodCall implements ArgumentFuncCallToMethodCallInterface
{
/**
* @param non-empty-string $function
* @param non-empty-string $class
* @param non-empty-string $arrayMethod
* @param non-empty-string $nonArrayMethod
*/
public function __construct(
private readonly string $function,
private readonly string $class,
private readonly string $arrayMethod,
private readonly string $nonArrayMethod
) {
RectorAssert::className($class);
RectorAssert::functionName($function);
}
public function getFunction(): string
{
return $this->function;
}
public function getClass(): string
{
return $this->class;
}
public function getArrayMethod(): string
{
return $this->arrayMethod;
}
public function getNonArrayMethod(): string
{
return $this->nonArrayMethod;
}
}