mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
7d36c3b0b9
a80cf5292d
revert to working scoper 0.14
14 lines
511 B
PHP
14 lines
511 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\DowngradePhp70\NodeFactory;
|
|
|
|
use PhpParser\Node\Stmt\Class_;
|
|
final class ClassFromAnonymousFactory
|
|
{
|
|
public function create(string $className, \PhpParser\Node\Stmt\Class_ $newClass) : \PhpParser\Node\Stmt\Class_
|
|
{
|
|
return new \PhpParser\Node\Stmt\Class_($className, ['flags' => $newClass->flags, 'extends' => $newClass->extends, 'implements' => $newClass->implements, 'stmts' => $newClass->stmts, 'attrGroups' => $newClass->attrGroups]);
|
|
}
|
|
}
|