mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
54 lines
1.0 KiB
PHP
54 lines
1.0 KiB
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Rector\Defluent\ValueObject;
|
||
|
|
||
|
use PhpParser\Node\Expr\MethodCall;
|
||
|
|
||
|
final class FluentMethodCalls
|
||
|
{
|
||
|
/**
|
||
|
* @var MethodCall[]
|
||
|
*/
|
||
|
private $fluentMethodCalls = [];
|
||
|
|
||
|
/**
|
||
|
* @var MethodCall
|
||
|
*/
|
||
|
private $rootMethodCall;
|
||
|
|
||
|
/**
|
||
|
* @var MethodCall
|
||
|
*/
|
||
|
private $lastMethodCall;
|
||
|
|
||
|
/**
|
||
|
* @param MethodCall[] $fluentMethodCalls
|
||
|
*/
|
||
|
public function __construct(MethodCall $rootMethodCall, array $fluentMethodCalls, MethodCall $lastMethodCall)
|
||
|
{
|
||
|
$this->rootMethodCall = $rootMethodCall;
|
||
|
$this->fluentMethodCalls = $fluentMethodCalls;
|
||
|
$this->lastMethodCall = $lastMethodCall;
|
||
|
}
|
||
|
|
||
|
public function getRootMethodCall(): MethodCall
|
||
|
{
|
||
|
return $this->rootMethodCall;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return MethodCall[]
|
||
|
*/
|
||
|
public function getFluentMethodCalls(): array
|
||
|
{
|
||
|
return $this->fluentMethodCalls;
|
||
|
}
|
||
|
|
||
|
public function getLastMethodCall(): MethodCall
|
||
|
{
|
||
|
return $this->lastMethodCall;
|
||
|
}
|
||
|
}
|