2020-08-11 12:59:04 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2020-08-11 12:59:04 +02:00
|
|
|
namespace Rector\CodingStyle\ValueObject;
|
|
|
|
|
2020-10-11 16:17:43 +02:00
|
|
|
use PhpParser\Node\Expr;
|
2020-08-11 12:59:04 +02:00
|
|
|
final class ConcatStringAndPlaceholders
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $content;
|
|
|
|
/**
|
2021-08-23 00:20:32 +00:00
|
|
|
* @var \PhpParser\Node\Expr[]
|
2020-08-11 12:59:04 +02:00
|
|
|
*/
|
2021-05-10 23:39:21 +00:00
|
|
|
private $placeholderNodes;
|
2020-10-11 16:17:43 +02:00
|
|
|
/**
|
|
|
|
* @param Expr[] $placeholderNodes
|
|
|
|
*/
|
2020-08-11 12:59:04 +02:00
|
|
|
public function __construct(string $content, array $placeholderNodes)
|
|
|
|
{
|
|
|
|
$this->content = $content;
|
|
|
|
$this->placeholderNodes = $placeholderNodes;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getContent() : string
|
2020-08-11 12:59:04 +02:00
|
|
|
{
|
|
|
|
return $this->content;
|
|
|
|
}
|
2020-09-01 19:56:30 +02:00
|
|
|
/**
|
2020-10-11 16:17:43 +02:00
|
|
|
* @return Expr[]
|
2020-09-01 19:56:30 +02:00
|
|
|
*/
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getPlaceholderNodes() : array
|
2020-08-11 12:59:04 +02:00
|
|
|
{
|
|
|
|
return $this->placeholderNodes;
|
|
|
|
}
|
|
|
|
}
|