mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-13 22:52:23 +00:00
* re-enable rectify and ecs * [Rectify] [Php81] Enable Rectify on Readonly Property only * comment * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify Co-authored-by: GitHub Action <action@github.com>
35 lines
696 B
PHP
35 lines
696 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Rector\FileSystemRector\ValueObject;
|
|
|
|
use PhpParser\Node;
|
|
use Rector\FileSystemRector\Contract\AddedFileInterface;
|
|
use Rector\FileSystemRector\Contract\FileWithNodesInterface;
|
|
|
|
final class AddedFileWithNodes implements AddedFileInterface, FileWithNodesInterface
|
|
{
|
|
/**
|
|
* @param Node\Stmt[] $nodes
|
|
*/
|
|
public function __construct(
|
|
private readonly string $filePath,
|
|
private readonly array $nodes
|
|
) {
|
|
}
|
|
|
|
public function getFilePath(): string
|
|
{
|
|
return $this->filePath;
|
|
}
|
|
|
|
/**
|
|
* @return Node\Stmt[]
|
|
*/
|
|
public function getNodes(): array
|
|
{
|
|
return $this->nodes;
|
|
}
|
|
}
|